Skip to content

Commit

Permalink
Hey look, already caught one more case of that bug. Luckily its harml…
Browse files Browse the repository at this point in the history
…ess now
  • Loading branch information
KnightMiner committed Jan 19, 2023
1 parent 028a5c2 commit c992659
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit c992659

Please sign in to comment.