mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-10-03 18:07:26 +02:00
Use getFullTime instead of getTime
This commit is contained in:
parent
8700974e88
commit
c651c61c37
@ -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())));
|
||||||
|
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user