diff --git a/src/main/java/slimeknights/tconstruct/library/recipe/tinkerstation/repairing/ModifierMaterialRepairRecipe.java b/src/main/java/slimeknights/tconstruct/library/recipe/tinkerstation/repairing/ModifierMaterialRepairRecipe.java index e644ee346fb..b7dc65d5b1b 100644 --- a/src/main/java/slimeknights/tconstruct/library/recipe/tinkerstation/repairing/ModifierMaterialRepairRecipe.java +++ b/src/main/java/slimeknights/tconstruct/library/recipe/tinkerstation/repairing/ModifierMaterialRepairRecipe.java @@ -2,13 +2,16 @@ import lombok.Getter; import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.crafting.RecipeSerializer; import net.minecraft.world.level.Level; +import slimeknights.tconstruct.common.TinkerTags; import slimeknights.tconstruct.library.materials.definition.LazyMaterial; import slimeknights.tconstruct.library.materials.definition.MaterialId; import slimeknights.tconstruct.library.modifiers.ModifierId; import slimeknights.tconstruct.library.recipe.tinkerstation.ITinkerStationContainer; import slimeknights.tconstruct.library.recipe.tinkerstation.repairing.ModifierMaterialRepairSerializer.IModifierMaterialRepairRecipe; +import slimeknights.tconstruct.library.tools.helper.ModifierUtil; import slimeknights.tconstruct.library.tools.nbt.IToolStackView; import slimeknights.tconstruct.library.tools.nbt.ToolStack; import slimeknights.tconstruct.tables.recipe.TinkerStationRepairRecipe; @@ -45,7 +48,8 @@ public boolean matches(ITinkerStationContainer inv, Level world) { return false; } // must have the modifier - if (ToolStack.from(inv.getTinkerableStack()).getModifierLevel(modifier) == 0) { + ItemStack tinkerable = inv.getTinkerableStack(); + if (!tinkerable.is(TinkerTags.Items.MODIFIABLE) || ModifierUtil.getModifierLevel(tinkerable, modifier) == 0) { return false; } return SpecializedRepairRecipe.findMaterialItem(inv, repairMaterial);