diff --git a/src/main/java/gregtech/common/tools/ToolWrench.java b/src/main/java/gregtech/common/tools/ToolWrench.java index 3649dd86802..68170b8fb64 100644 --- a/src/main/java/gregtech/common/tools/ToolWrench.java +++ b/src/main/java/gregtech/common/tools/ToolWrench.java @@ -5,8 +5,10 @@ import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; +import net.minecraft.enchantment.Enchantment; import net.minecraft.entity.EntityLivingBase; import net.minecraft.init.Blocks; +import net.minecraft.init.Enchantments; import net.minecraft.item.ItemStack; import java.util.Collections; @@ -50,6 +52,11 @@ public void onStatsAddedToTool(MetaValueItem item) { item.addComponents(new WrenchBehaviour(DamageValues.DAMAGE_FOR_WRENCH)); } + @Override + public boolean canApplyEnchantment(ItemStack stack, Enchantment enchantment) { + return enchantment == Enchantments.UNBREAKING || enchantment == Enchantments.EFFICIENCY; + } + @Override public Set getToolClasses(ItemStack stack) { return WRENCH_TOOL_CLASSES;