mirror of
https://github.com/GTNewHorizons/CodeChickenCore.git
synced 2026-11-11 07:47:47 +00:00
Fix RayTracer with non EntityPlayerMP instances on server worlds.
This commit is contained in:
1 parent
a7637ca787
commit
dd297d6e42
1 file changed
+3
-2
@@ -209,7 +209,7 @@ public class RayTracer
|
||||
|
||||
public static MovingObjectPosition reTrace(World world, EntityPlayer player)
|
||||
{
|
||||
return reTrace(world, player, world.isRemote ? getBlockReachDistance_client() : getBlockReachDistance_server((EntityPlayerMP) player));
|
||||
return reTrace(world, player, getBlockReachDistance(player));
|
||||
}
|
||||
|
||||
public static MovingObjectPosition reTrace(World world, EntityPlayer player, double reach)
|
||||
@@ -238,7 +238,8 @@ public class RayTracer
|
||||
|
||||
public static double getBlockReachDistance(EntityPlayer player)
|
||||
{
|
||||
return player.worldObj.isRemote ? getBlockReachDistance_client() : getBlockReachDistance_server((EntityPlayerMP) player);
|
||||
return player.worldObj.isRemote ? getBlockReachDistance_client() :
|
||||
player instanceof EntityPlayerMP ? getBlockReachDistance_server((EntityPlayerMP) player) : 5D;
|
||||
}
|
||||
|
||||
public static Vec3 getEndVec(EntityPlayer player)
|
||||
|
||||
Reference in new issue
Block a user