mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 04:57:27 +00:00
Swing Packet only on Server Side
This commit is contained in:
1 parent
91740293d9
commit
043b52ae51
1 file changed
+4
-4
@@ -283,15 +283,15 @@ public abstract class EntityNPCInterface extends EntityCreature implements IEnti
|
||||
}
|
||||
if (!this.isSwingInProgress || this.swingProgressInt >= this.getArmSwingAnimationEnd() / 2 || this.swingProgressInt < 0)
|
||||
{
|
||||
NpcEvent.SwingEvent event = new NpcEvent.SwingEvent(wrappedNPC, stack);
|
||||
if(EventHooks.onNPCMeleeSwing(this, event))
|
||||
return;
|
||||
|
||||
this.swingProgressInt = -1;
|
||||
this.isSwingInProgress = true;
|
||||
|
||||
if (this.worldObj instanceof WorldServer)
|
||||
{
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user