Skip to content

Commit

Permalink
Fix rotation
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaming32 committed Jul 22, 2024
1 parent a47df9b commit 37bfdcc
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,13 @@ public void renderWidget(
pose(context).translate(getX() + getWidth() / 2f, getY() + getHeight(), Z_OFFSET);
final float scale = getHeight() / MODEL_HEIGHT;
pose(context).scale(scale, scale, scale);
pose(context).translate(0f, -MODEL_OFFSET, 0f);
//#if MC >= 1.20.0
pose(context).translate(0f, -MODEL_OFFSET, 0f);
pose(context).rotateAround(XP.rotationDegrees(rotationX), 0f, -1f - MODEL_OFFSET, 0f);
//#else
//$$ pose(context).translate(0f, -1f - 2 * MODEL_OFFSET, 0f);
//$$ pose(context).mulPose(XP.rotationDegrees(rotationX));
//$$ pose(context).translate(0f, 1f + MODEL_OFFSET, 0f);
//#endif
pose(context).mulPose(YP.rotationDegrees(rotationY));
flush(context);
Expand Down

0 comments on commit 37bfdcc

Please sign in to comment.