From 9fc207642bb277fae02733a95d490322af8a07b6 Mon Sep 17 00:00:00 2001 From: LAX1DUDE Date: Sat, 11 Jun 2022 17:39:27 -0700 Subject: [PATCH] fixed player position when using a FNAW skin and sleeping --- .../java/net/lax1dude/eaglercraft/ConfigConstants.java | 2 +- src/main/java/net/minecraft/src/RenderPlayer.java | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/lax1dude/eaglercraft/ConfigConstants.java b/src/main/java/net/lax1dude/eaglercraft/ConfigConstants.java index a7cd2dc..081da63 100644 --- a/src/main/java/net/lax1dude/eaglercraft/ConfigConstants.java +++ b/src/main/java/net/lax1dude/eaglercraft/ConfigConstants.java @@ -4,7 +4,7 @@ public class ConfigConstants { public static boolean profanity = false; - public static final String version = "22w23a"; + public static final String version = "22w23b"; public static final String mainMenuString = "eaglercraft " + version; public static final String forkMe = "https://github.com/LAX1DUDE/eaglercraft"; diff --git a/src/main/java/net/minecraft/src/RenderPlayer.java b/src/main/java/net/minecraft/src/RenderPlayer.java index 9126026..23bfe93 100644 --- a/src/main/java/net/minecraft/src/RenderPlayer.java +++ b/src/main/java/net/minecraft/src/RenderPlayer.java @@ -125,6 +125,16 @@ public class RenderPlayer extends RenderLiving { EaglerAdapter.glScalef(HighPolySkin.highPolyScale, HighPolySkin.highPolyScale, HighPolySkin.highPolyScale); msh.texture.bindTexture(); + if(par1EntityPlayer.isPlayerSleeping()) { + if(msh == HighPolySkin.LAXATIVE_DUDE || msh == HighPolySkin.WEIRD_CLIMBER_DUDE) { + EaglerAdapter.glTranslatef(0.0f, -3.7f, 0.0f); + }else if(msh == HighPolySkin.BABY_WINSTON) { + EaglerAdapter.glTranslatef(0.0f, -2.4f, 0.0f); + }else { + EaglerAdapter.glTranslatef(0.0f, -3.0f, 0.0f); + } + } + float var15 = par1EntityPlayer.prevLimbYaw + (par1EntityPlayer.limbYaw - par1EntityPlayer.prevLimbYaw) * par9; float var16 = par1EntityPlayer.limbSwing - par1EntityPlayer.limbYaw * (1.0F - par9);