mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 02:37:27 +00:00
Custom item swinging fix for multiplayer
This commit is contained in:
1 parent
a3407ed9b2
commit
487ea6ea4e
1 file changed
+2
-1
@@ -71,8 +71,9 @@ public class ItemScripted extends Item implements ItemRenderInterface {
|
||||
|
||||
@Override
|
||||
public boolean onEntitySwing(EntityLivingBase entityLivingBase, ItemStack stack){
|
||||
if(entityLivingBase instanceof EntityClientPlayerMP)
|
||||
if (entityLivingBase.worldObj.isRemote) {
|
||||
return false;
|
||||
}
|
||||
|
||||
IItemStack istack = NpcAPI.Instance().getIItemStack(stack);
|
||||
ItemEvent.AttackEvent eve = new ItemEvent.AttackEvent( (ScriptCustomItem) istack, NpcAPI.Instance().getIEntity(entityLivingBase), 2, null);
|
||||
|
||||
Reference in new issue
Block a user