Use getFullTime instead of getTime

This commit is contained in:
fullwall 2014-02-24 10:09:42 +08:00
parent 8700974e88
commit c651c61c37
2 changed files with 2 additions and 2 deletions

View File

@ -221,7 +221,7 @@ public class CitizensNPC extends AbstractNPC {
navigator.run(); navigator.run();
if (!getNavigator().isNavigating() if (!getNavigator().isNavigating()
&& getEntity().getWorld().getTime() % Setting.PACKET_UPDATE_DELAY.asInt() == 0) { && getEntity().getWorld().getFullTime() % Setting.PACKET_UPDATE_DELAY.asInt() == 0) {
Player player = getEntity() instanceof Player ? (Player) getEntity() : null; Player player = getEntity() instanceof Player ? (Player) getEntity() : null;
NMS.sendPacketNearby(player, getStoredLocation(), NMS.sendPacketNearby(player, getStoredLocation(),
new PacketPlayOutEntityTeleport(NMS.getHandle(getEntity()))); new PacketPlayOutEntityTeleport(NMS.getHandle(getEntity())));

View File

@ -257,7 +257,7 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder {
} }
private void updatePackets(boolean navigating) { private void updatePackets(boolean navigating) {
if (world.getWorld().getTime() % Setting.PACKET_UPDATE_DELAY.asInt() == 0) { if (world.getWorld().getFullTime() % Setting.PACKET_UPDATE_DELAY.asInt() == 0) {
Location current = getBukkitEntity().getLocation(packetLocationCache); Location current = getBukkitEntity().getLocation(packetLocationCache);
Packet[] packets = new Packet[navigating ? 6 : 7]; Packet[] packets = new Packet[navigating ? 6 : 7];
if (!navigating) { if (!navigating) {