mirror of
https://github.com/GTNewHorizons/CodeChickenCore.git
synced 2026-11-11 15:57:42 +00:00
Made a small change to RayTracer to potentially add support for eye-height changing mods.
This commit is contained in:
1 parent
3e65888097
commit
699221214c
1 file changed
+3
-1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user