From daff8ece87b4c618e22422084bca00f51834b6d0 Mon Sep 17 00:00:00 2001 From: Vincent Lee Date: Tue, 25 Dec 2018 22:23:16 -0600 Subject: [PATCH] Fix spell cloth duplication glitch #2810 --- .../botania/common/crafting/recipe/SpellClothRecipe.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/vazkii/botania/common/crafting/recipe/SpellClothRecipe.java b/src/main/java/vazkii/botania/common/crafting/recipe/SpellClothRecipe.java index 206684a45..c77b3804c 100644 --- a/src/main/java/vazkii/botania/common/crafting/recipe/SpellClothRecipe.java +++ b/src/main/java/vazkii/botania/common/crafting/recipe/SpellClothRecipe.java @@ -56,6 +56,7 @@ public class SpellClothRecipe extends IForgeRegistryEntry.Impl implemen ItemStack stack = var1.getStackInSlot(i); if(!stack.isEmpty() && stack.isItemEnchanted()) { stackToDisenchant = stack.copy(); + stackToDisenchant.setCount(1); break; } } @@ -63,10 +64,7 @@ public class SpellClothRecipe extends IForgeRegistryEntry.Impl implemen if(stackToDisenchant.isEmpty()) return ItemStack.EMPTY; - NBTTagCompound cmp = stackToDisenchant.getTagCompound().copy(); - cmp.removeTag("ench"); // Remove enchantments - stackToDisenchant.setTagCompound(cmp); - + stackToDisenchant.getTagCompound().removeTag("ench"); // Remove enchantments return stackToDisenchant; }