Merge pull request #147 from mcmonkey4eva/master

Fix teleport bugging
This commit is contained in:
fullwall 2014-12-12 11:37:45 +08:00
commit fc8d7e104d
3 changed files with 4 additions and 6 deletions

View File

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

View File

@ -93,7 +93,7 @@ public class HumanController extends AbstractEntityController {
NMS.sendPlayerlistPacket(false, null, npc); NMS.sendPlayerlistPacket(false, null, npc);
} }
} }
}, 60); }, 2);
return handle.getBukkitEntity(); return handle.getBukkitEntity();
} }

View File

@ -512,7 +512,7 @@ public class NMS {
sendPlayerlistPacket(false, player, npc); sendPlayerlistPacket(false, player, npc);
} }
} }
}, 61); }, 2);
} }
public static org.bukkit.entity.Entity spawnCustomEntity(org.bukkit.World world, Location at, public static org.bukkit.entity.Entity spawnCustomEntity(org.bukkit.World world, Location at,