From 2fcf27d8f46bf68125d691412c94ea8a4141ac8c Mon Sep 17 00:00:00 2001 From: MachineMuse Date: Wed, 13 Mar 2013 01:26:33 -0600 Subject: [PATCH] multiplayer fix --- src/minecraft/net/machinemuse/api/MusePlayerUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/minecraft/net/machinemuse/api/MusePlayerUtils.java b/src/minecraft/net/machinemuse/api/MusePlayerUtils.java index 425dfa9..2d73407 100644 --- a/src/minecraft/net/machinemuse/api/MusePlayerUtils.java +++ b/src/minecraft/net/machinemuse/api/MusePlayerUtils.java @@ -68,13 +68,13 @@ public class MusePlayerUtils { // Somehow this destroys the playerPosition vector -.- MovingObjectPosition pickedBlock = world.rayTraceBlocks_do_do(playerPosition, playerViewOffset, collisionFlag, !collisionFlag); - playerPosition = Vec3.createVectorHelper(player.posX, player.posY + player.getEyeHeight(), player.posZ); if (pickedBlock == null) { return pickedEntity; } else if (pickedEntity == null) { return pickedBlock; } else { - double dBlock = pickedBlock.hitVec.subtract(playerPosition).lengthVector(); + playerPosition = Vec3.createVectorHelper(player.posX, player.posY + player.getEyeHeight(), player.posZ); + double dBlock = pickedBlock.hitVec.distanceTo(playerPosition); if (closestEntity < dBlock) { return pickedEntity; } else {