From 65c8220d7a494b69d7f824cec1366ffa2b91376c Mon Sep 17 00:00:00 2001 From: Sollace Date: Sat, 28 Jul 2018 13:27:49 +0200 Subject: [PATCH] More rendering shenanigans --- src/hdskins/java/com/voxelmodpack/hdskins/gui/GuiSkins.java | 4 +--- .../com/voxelmodpack/hdskins/gui/RenderPlayerModel.java | 6 ++++++ .../com/minelittlepony/hdskins/gui/RenderPonyModel.java | 1 + 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/hdskins/java/com/voxelmodpack/hdskins/gui/GuiSkins.java b/src/hdskins/java/com/voxelmodpack/hdskins/gui/GuiSkins.java index 4dff104a..5e1c45eb 100644 --- a/src/hdskins/java/com/voxelmodpack/hdskins/gui/GuiSkins.java +++ b/src/hdskins/java/com/voxelmodpack/hdskins/gui/GuiSkins.java @@ -486,11 +486,9 @@ public class GuiSkins extends GameGui { rotate(((updateCounter + partialTick) * 2.5F) % 360, 0, 1, 0); - thePlayer.rotationYawHead = (float)Math.atan(mouseX / 20) * -30; + thePlayer.rotationYawHead = (float)Math.atan(mouseX / 20) * 30; thePlayer.rotationPitch = (float)Math.atan(mouseY / 40) * -20; - translate(0, thePlayer.getYOffset(), 0); - mc.getRenderManager().renderEntity(thePlayer, 0, 0, 0, 0, 1, false); popMatrix(); diff --git a/src/hdskins/java/com/voxelmodpack/hdskins/gui/RenderPlayerModel.java b/src/hdskins/java/com/voxelmodpack/hdskins/gui/RenderPlayerModel.java index 26506fad..acca285b 100644 --- a/src/hdskins/java/com/voxelmodpack/hdskins/gui/RenderPlayerModel.java +++ b/src/hdskins/java/com/voxelmodpack/hdskins/gui/RenderPlayerModel.java @@ -104,16 +104,22 @@ public class RenderPlayerModel extends RenderLiving player.leftArmPose = ArmPose.EMPTY; player.rightArmPose = ArmPose.EMPTY; + double offset = entity.getYOffset() + 0.01; + + pushMatrix(); enableBlend(); color(1, 1, 1, 0.3F); + translate(0, offset, 0); super.doRender(entity, x, y, z, entityYaw, partialTicks); color(1, 1, 1, 1); disableBlend(); + popMatrix(); pushMatrix(); scale(1, -1, 1); + translate(0, offset, 0); super.doRender(entity, x, y, z, entityYaw, partialTicks); popMatrix(); diff --git a/src/main/java/com/minelittlepony/hdskins/gui/RenderPonyModel.java b/src/main/java/com/minelittlepony/hdskins/gui/RenderPonyModel.java index 94417479..1e04bdc4 100644 --- a/src/main/java/com/minelittlepony/hdskins/gui/RenderPonyModel.java +++ b/src/main/java/com/minelittlepony/hdskins/gui/RenderPonyModel.java @@ -53,6 +53,7 @@ public class RenderPonyModel extends RenderPlayerModel implemen if (renderingAsHuman) { super.preRenderCallback(entity, ticks); } else { + //GlStateManager.scale(1.1, 1.1, 1.1); renderPony.preRenderCallback(entity, ticks); GlStateManager.translate(0, 0, -entity.width / 2); // move us to the center of the shadow