diff --git a/src/hdskins/java/com/voxelmodpack/hdskins/gui/EntityPlayerModel.java b/src/hdskins/java/com/voxelmodpack/hdskins/gui/EntityPlayerModel.java index c6d51a6c..93f465fd 100644 --- a/src/hdskins/java/com/voxelmodpack/hdskins/gui/EntityPlayerModel.java +++ b/src/hdskins/java/com/voxelmodpack/hdskins/gui/EntityPlayerModel.java @@ -110,6 +110,26 @@ public class EntityPlayerModel extends EntityLivingBase implements IBlankSkinSup } swingProgress = swingProgressInt / 8F; + + motionY *= 0.98; + if (Math.abs(motionY) < 0.003) { + motionY = 0; + } + + if (posY == 0 && isJumping) { + jump(); + } + + + motionY -= 0.08D; + motionY *= 0.9800000190734863D; + + posY += motionY; + + if (posY < 0) { + posY = 0; + } + onGround = posY == 0; } @Override diff --git a/src/hdskins/java/com/voxelmodpack/hdskins/gui/GuiSkins.java b/src/hdskins/java/com/voxelmodpack/hdskins/gui/GuiSkins.java index 5e1c45eb..f1d981f1 100644 --- a/src/hdskins/java/com/voxelmodpack/hdskins/gui/GuiSkins.java +++ b/src/hdskins/java/com/voxelmodpack/hdskins/gui/GuiSkins.java @@ -11,7 +11,6 @@ import com.minelittlepony.gui.Button; import com.minelittlepony.gui.GameGui; import com.minelittlepony.gui.IconicButton; import com.minelittlepony.gui.Label; -import com.minelittlepony.util.math.MathUtil; import com.mojang.authlib.GameProfile; import com.mojang.authlib.minecraft.MinecraftProfileTexture; import com.mojang.authlib.minecraft.MinecraftProfileTexture.Type; @@ -394,6 +393,17 @@ public class GuiSkins extends GameGui { @Override protected void drawContents(int mouseX, int mouseY, float partialTick) { + + + boolean sneak = Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT); + + localPlayer.setSneaking(sneak); + remotePlayer.setSneaking(sneak); + + boolean jump = Keyboard.isKeyDown(Keyboard.KEY_SPACE); + localPlayer.setJumping(jump); + remotePlayer.setJumping(jump); + float deltaTime = panorama.getDelta(partialTick); panorama.render(partialTick, zLevel); diff --git a/src/hdskins/java/com/voxelmodpack/hdskins/gui/RenderPlayerModel.java b/src/hdskins/java/com/voxelmodpack/hdskins/gui/RenderPlayerModel.java index acca285b..93fcbf53 100644 --- a/src/hdskins/java/com/voxelmodpack/hdskins/gui/RenderPlayerModel.java +++ b/src/hdskins/java/com/voxelmodpack/hdskins/gui/RenderPlayerModel.java @@ -104,7 +104,7 @@ public class RenderPlayerModel extends RenderLiving player.leftArmPose = ArmPose.EMPTY; player.rightArmPose = ArmPose.EMPTY; - double offset = entity.getYOffset() + 0.01; + double offset = entity.getYOffset() + entity.posY + 0.01; pushMatrix(); enableBlend();