Made NPC custom item update scripts also launch only every 10 ticks

This commit is contained in:
Luis C.M committed 2023-06-02 23:13:36 -05:00
1 parent dd7714350d
commit e4a953f1cc
1 file changed
+1 -1
@@ -26,7 +26,7 @@ public class ScriptItemEventHandler {
@SubscribeEvent
public void invoke(LivingEvent.LivingUpdateEvent event) {
if(event.entityLiving == null || event.entityLiving.worldObj == null || event.entityLiving instanceof EntityPlayer)
if(event.entityLiving == null || event.entityLiving.worldObj == null || event.entityLiving instanceof EntityPlayer || event.entityLiving.ticksExisted%10 != 0)
return;
if (event.entityLiving instanceof EntityCustomNpc) {