Changed NPC custom item ticking to only happen for armors and weapons.

This commit is contained in:
Luis C.M committed 2023-06-02 23:21:14 -05:00
1 parent e4a953f1cc
commit 069d9999bf
1 file changed
+1 -2
@@ -31,9 +31,8 @@ public class ScriptItemEventHandler {
if (event.entityLiving instanceof EntityCustomNpc) {
HashMap<Integer, ItemStack> armor = ((EntityCustomNpc) event.entityLiving).inventory.armor;
HashMap<Integer, ItemStack> items = ((EntityCustomNpc) event.entityLiving).inventory.items;
HashMap<Integer, ItemStack> weapons = ((EntityCustomNpc) event.entityLiving).inventory.weapons;
HashMap<Integer, ItemStack>[] inventories = new HashMap[]{armor, items, weapons};
HashMap<Integer, ItemStack>[] inventories = new HashMap[]{armor, weapons};
for (HashMap<Integer, ItemStack> inventory : inventories) {
for (ItemStack stack : inventory.values()) {