multiplayer fix
This commit is contained in:
parent
327faaa9dd
commit
2fcf27d8f4
1 changed files with 2 additions and 2 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue