From adc100ee17b09a0a8bd754fa3764d4ea8dd7ee4d Mon Sep 17 00:00:00 2001 From: WayofTime Date: Sun, 26 Jun 2016 10:09:18 -0400 Subject: [PATCH] (Possibly) further helped eliminate the memory leak issue. --- .../api/alchemyCrafting/AlchemyArrayEffectCrafting.java | 1 + .../bloodmagic/item/armour/ItemLivingArmour.java | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/src/main/java/WayofTime/bloodmagic/api/alchemyCrafting/AlchemyArrayEffectCrafting.java b/src/main/java/WayofTime/bloodmagic/api/alchemyCrafting/AlchemyArrayEffectCrafting.java index 594f107e..c8d815fd 100644 --- a/src/main/java/WayofTime/bloodmagic/api/alchemyCrafting/AlchemyArrayEffectCrafting.java +++ b/src/main/java/WayofTime/bloodmagic/api/alchemyCrafting/AlchemyArrayEffectCrafting.java @@ -37,6 +37,7 @@ public class AlchemyArrayEffectCrafting extends AlchemyArrayEffect BlockPos pos = tile.getPos(); ItemStack output = outputStack.copy(); + output.onCrafting(tile.getWorld(), null, output.stackSize); EntityItem outputEntity = new EntityItem(tile.getWorld(), pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, output); tile.getWorld().spawnEntityInWorld(outputEntity); diff --git a/src/main/java/WayofTime/bloodmagic/item/armour/ItemLivingArmour.java b/src/main/java/WayofTime/bloodmagic/item/armour/ItemLivingArmour.java index 1f04a802..cc26a443 100644 --- a/src/main/java/WayofTime/bloodmagic/item/armour/ItemLivingArmour.java +++ b/src/main/java/WayofTime/bloodmagic/item/armour/ItemLivingArmour.java @@ -67,6 +67,15 @@ public class ItemLivingArmour extends ItemArmor implements ISpecialArmor, IMeshP setCreativeTab(BloodMagic.tabBloodMagic); } + @Override + public void onCreated(ItemStack stack, World world, EntityPlayer player) + { + if (stack != null && !world.isRemote && stack.getItem() == ModItems.livingArmourChest) + { + Utils.setUUID(stack); + } + } + @Override public String getArmorTexture(ItemStack stack, Entity entity, EntityEquipmentSlot slot, String type) {