Made a small change to RayTracer to potentially add support for eye-height changing mods.

This commit is contained in:
Chicken-Bomes committed 2013-11-21 12:49:26 +10:00
1 parent 3e65888097
commit 699221214c
1 file changed
+3 -1
+3 -1
View File
@@ -223,7 +223,9 @@ public class RayTracer
public static Vec3 getCorrectedHeadVec(EntityPlayer player)
{
Vec3 v = Vec3.createVectorHelper(player.posX, player.posY, player.posZ);
if(!player.worldObj.isRemote) {
if(player.worldObj.isRemote) {
v.yCoord+=player.getEyeHeight()-player.getDefaultEyeHeight();//compatibility with eye height changing mods
} else {
v.yCoord+=player.getEyeHeight();
if(player instanceof EntityPlayerMP && player.isSneaking())
v.yCoord-=0.08;