mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-10-28 04:17:38 +00:00
Bump to Forge 1.12.2
Nobody is still using 1.12, so we might as well update to the latest - it makes it easier to test mod compatibility at least.
This commit is contained in:
@@ -126,22 +126,8 @@ public class WorldUtil
|
||||
}
|
||||
|
||||
public static Vec3d getRayEnd( EntityPlayer player) {
|
||||
double reach = 4.5;
|
||||
if( player instanceof EntityPlayerMP )
|
||||
{
|
||||
reach = ((EntityPlayerMP) player).interactionManager.getBlockReachDistance();
|
||||
}
|
||||
else if( player.getEntityWorld().isRemote )
|
||||
{
|
||||
reach = Minecraft.getMinecraft().playerController.getBlockReachDistance();
|
||||
}
|
||||
else if( player.capabilities.isCreativeMode )
|
||||
{
|
||||
reach = 5.0;
|
||||
}
|
||||
|
||||
double reach = player.getEntityAttribute(EntityPlayer.REACH_DISTANCE).getAttributeValue();
|
||||
Vec3d look = player.getLookVec();
|
||||
|
||||
return getRayStart( player ).addVector( look.x * reach, look.y * reach, look.z * reach );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user