Skip to content

Commit

Permalink
Update ToolWrench.java (GregTechCEu#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
BraggestSage833 authored Aug 11, 2021
1 parent cdd9923 commit 41ff7ce
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/main/java/gregtech/common/tools/ToolWrench.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<String> getToolClasses(ItemStack stack) {
return WRENCH_TOOL_CLASSES;
Expand Down

0 comments on commit 41ff7ce

Please sign in to comment.