Not Remote check for NPC Swing

This commit is contained in:
Kam committed 2024-03-29 21:50:52 -04:00
1 parent e2028dfd36
commit 675267c5b1
1 file changed
+5 -3
@@ -288,9 +288,11 @@ public abstract class EntityNPCInterface extends EntityCreature implements IEnti
if (this.worldObj instanceof WorldServer)
{
NpcEvent.SwingEvent event = new NpcEvent.SwingEvent(wrappedNPC, stack);
if(EventHooks.onNPCMeleeSwing(this, event))
return;
if(!isRemote()){
NpcEvent.SwingEvent event = new NpcEvent.SwingEvent(wrappedNPC, stack);
if(EventHooks.onNPCMeleeSwing(this, event))
return;
}
((WorldServer)this.worldObj).getEntityTracker().func_151247_a(this, new S0BPacketAnimation(this, 0));
}