Skip to content

Commit

Permalink
Improve dupe fix with Spellbinding Cloth
Browse files Browse the repository at this point in the history
  • Loading branch information
gamerforEA committed Mar 20, 2018
1 parent 59394a9 commit 4763c1a
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/main/java/thaumic/tinkerer/common/item/SpellClothRecipe.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,19 @@ public boolean matches(InventoryCrafting var1, World var2)
if (stack != null)
{
Item item = stack.getItem();
if (stack.isItemEnchanted() && !(item instanceof INoRemoveEnchant) && !foundEnchanted)
boolean itemEnchanted = stack.isItemEnchanted();

// TODO gamerforEA code start
if (item instanceof ItemSpellCloth && (foundCloth || itemEnchanted))
return false;
// TODO gamerforEA code end

if (itemEnchanted && !(item instanceof INoRemoveEnchant) && !foundEnchanted)
{
// TODO gamerforEA code start
if (EventConfig.disableClothRecipeStack && stack.stackSize != 1)
return false;
if (!(item instanceof ItemSpellCloth) && item.hasContainerItem(stack))
if (item.hasContainerItem(stack))
return false;
// TODO gamerforEA code end

Expand Down

0 comments on commit 4763c1a

Please # to comment.