Fix teleport bugging

Teleporting forcibly rounds locations because @fullwall edited the roundLocation function to return the original, now modified location, rather than clone it as is necessary to avoid trouble. This restores the original roundLocation which will avoid that error.
This commit is contained in:
mcmonkey 2014-12-09 14:46:12 -08:00
parent 7ff6cfb364
commit 674bb60287

View File

@ -408,10 +408,8 @@ public class EventListen implements Listener {
}
private Location roundLocation(Location input) {
input.setX(input.getBlockX());
input.setY(input.getBlockY());
input.setZ(input.getBlockZ());
return input;
return new Location(input.getWorld(), Math.floor(input.getX()),
Math.floor(input.getY()), Math.floor(input.getZ()));
}
private boolean spawn(NPC npc) {