From 37bfdcc82b7b73f8a6178f35dfe7350b68a9bed6 Mon Sep 17 00:00:00 2001 From: Josiah Glosson Date: Mon, 22 Jul 2024 12:09:42 -0500 Subject: [PATCH] Fix rotation --- .../gaming32/worldhost/gui/widget/WHPlayerSkinWidget.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/io/github/gaming32/worldhost/gui/widget/WHPlayerSkinWidget.java b/src/main/java/io/github/gaming32/worldhost/gui/widget/WHPlayerSkinWidget.java index dd66b26..3e6a3e6 100644 --- a/src/main/java/io/github/gaming32/worldhost/gui/widget/WHPlayerSkinWidget.java +++ b/src/main/java/io/github/gaming32/worldhost/gui/widget/WHPlayerSkinWidget.java @@ -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);