Skip to content

Commit

Permalink
Don't teleport players into walls if they sleep in negative x or z co…
Browse files Browse the repository at this point in the history
…ordinates.
  • Loading branch information
YannickMG committed Jan 19, 2025
1 parent 44bf728 commit cc36bb9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ private static void storeOriginalPosition(final EntityPlayer entity, final int x
final ExtendedPlayer ep = ExtendedPlayer.get(entity);
ep.setSleepingFlag(1);
ep.setBedCoord(new ChunkCoordinates(x, y, z));
ep.setLastCoord(new ChunkCoordinates((int) entity.posX, (int) entity.posY, (int) entity.posZ));
ep.setLastCoord(new ChunkCoordinates((int) Math.floor(entity.posX), (int) entity.posY, (int) Math.floor(entity.posZ)));
ep.setlastSpawnCoord(entity.getBedLocation(entity.worldObj.provider.dimensionId));
}
}
Expand Down

0 comments on commit cc36bb9

Please sign in to comment.