From b1f8af7f5597d6c1d4c774f2e69e079bb43fbf54 Mon Sep 17 00:00:00 2001 From: iChun Date: Sun, 12 Jan 2014 07:59:39 +0800 Subject: [PATCH] Squash commits so Lex would stop whining. Fix erroneous position when getting player position with changed eye height. --- .../entity/player/EntityPlayer.java.patch | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/patches/minecraft/net/minecraft/entity/player/EntityPlayer.java.patch b/patches/minecraft/net/minecraft/entity/player/EntityPlayer.java.patch index 02bb0781b..4742dd7b6 100644 --- a/patches/minecraft/net/minecraft/entity/player/EntityPlayer.java.patch +++ b/patches/minecraft/net/minecraft/entity/player/EntityPlayer.java.patch @@ -479,11 +479,29 @@ chatcomponenttext.func_150256_b().func_150241_a(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, "/msg " + this.getCommandSenderName() + " ")); return chatcomponenttext; } -@@ -2096,6 +2244,101 @@ +@@ -2096,6 +2244,119 @@ FMLNetworkHandler.openGui(this, mod, modGuiId, world, x, y, z); } + /* ======================================== FORGE START =====================================*/ ++ // JAVADOC METHOD $$ func_70666_h ++ @SideOnly(Side.CLIENT) ++ @Override ++ public Vec3 getPosition(float par1) ++ { ++ if (par1 == 1.0F) ++ { ++ return this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY + (this.getEyeHeight() - this.getDefaultEyeHeight()), this.posZ); ++ } ++ else ++ { ++ double d0 = this.prevPosX + (this.posX - this.prevPosX) * (double)par1; ++ double d1 = this.prevPosY + (this.posY - this.prevPosY) * (double)par1 + (this.getEyeHeight() - this.getDefaultEyeHeight()); ++ double d2 = this.prevPosZ + (this.posZ - this.prevPosZ) * (double)par1; ++ return this.worldObj.getWorldVec3Pool().getVecFromPool(d0, d1, d2); ++ } ++ } ++ + /** + * A dimension aware version of getBedLocation. + * @param dimension The dimension to get the bed spawn for