Add refreshDimensions calls to player tick()

This commit is contained in:
fullwall 2024-08-25 17:08:53 +08:00
parent 82851e673c
commit cd24ce0e61
4 changed files with 14 additions and 4 deletions

View File

@ -140,7 +140,6 @@ public class EntityHumanNPC extends ServerPlayer implements NPCHolder, Skinnable
}
ai.getJumpControl().tick();
ai.getMoveControl().tick();
detectEquipmentUpdates();
this.noPhysics = isSpectator();
if (isSpectator()) {
this.onGround = false;
@ -362,6 +361,7 @@ public class EntityHumanNPC extends ServerPlayer implements NPCHolder, Skinnable
super.tick();
if (npc == null)
return;
detectEquipmentUpdates();
noPhysics = isSpectator();
Bukkit.getServer().getPluginManager().unsubscribeFromPermission("bukkit.broadcast.user", getBukkitEntity());
updatePackets(npc.getNavigator().isNavigating());

View File

@ -141,7 +141,6 @@ public class EntityHumanNPC extends ServerPlayer implements NPCHolder, Skinnable
}
ai.getJumpControl().tick();
ai.getMoveControl().tick();
detectEquipmentUpdates();
this.noPhysics = isSpectator();
if (isSpectator()) {
this.onGround = false;
@ -360,6 +359,7 @@ public class EntityHumanNPC extends ServerPlayer implements NPCHolder, Skinnable
super.tick();
if (npc == null)
return;
detectEquipmentUpdates();
Bukkit.getServer().getPluginManager().unsubscribeFromPermission("bukkit.broadcast.user", getBukkitEntity());
updatePackets(npc.getNavigator().isNavigating());
npc.update();

View File

@ -136,7 +136,6 @@ public class EntityHumanNPC extends ServerPlayer implements NPCHolder, Skinnable
moveOnCurrentHeading();
}
tickAI();
detectEquipmentUpdatesPublic();
noPhysics = isSpectator();
if (isSpectator()) {
onGround = false;
@ -354,6 +353,12 @@ public class EntityHumanNPC extends ServerPlayer implements NPCHolder, Skinnable
if (npc == null)
return;
detectEquipmentUpdatesPublic();
float scale = this.getScale();
if (scale != this.appliedScale) {
appliedScale = scale;
refreshDimensions();
}
Bukkit.getServer().getPluginManager().unsubscribeFromPermission("bukkit.broadcast.user", getBukkitEntity());
updatePackets(npc.getNavigator().isNavigating());
npc.update();

View File

@ -137,7 +137,6 @@ public class EntityHumanNPC extends ServerPlayer implements NPCHolder, Skinnable
moveOnCurrentHeading();
}
tickAI();
detectEquipmentUpdatesPublic();
noPhysics = isSpectator();
if (isSpectator()) {
onGround = false;
@ -355,6 +354,12 @@ public class EntityHumanNPC extends ServerPlayer implements NPCHolder, Skinnable
if (npc == null)
return;
detectEquipmentUpdatesPublic();
float scale = this.getScale();
if (scale != this.appliedScale) {
appliedScale = scale;
refreshDimensions();
}
Bukkit.getServer().getPluginManager().unsubscribeFromPermission("bukkit.broadcast.user", getBukkitEntity());
updatePackets(npc.getNavigator().isNavigating());
npc.update();