File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
src/main/java/gregtech/common/tools Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 55import net .minecraft .block .Block ;
66import net .minecraft .block .material .Material ;
77import net .minecraft .block .state .IBlockState ;
8+ import net .minecraft .enchantment .Enchantment ;
89import net .minecraft .entity .EntityLivingBase ;
910import net .minecraft .init .Blocks ;
11+ import net .minecraft .init .Enchantments ;
1012import net .minecraft .item .ItemStack ;
1113
1214import java .util .Collections ;
@@ -50,6 +52,11 @@ public void onStatsAddedToTool(MetaValueItem item) {
5052 item .addComponents (new WrenchBehaviour (DamageValues .DAMAGE_FOR_WRENCH ));
5153 }
5254
55+ @ Override
56+ public boolean canApplyEnchantment (ItemStack stack , Enchantment enchantment ) {
57+ return enchantment == Enchantments .UNBREAKING || enchantment == Enchantments .EFFICIENCY ;
58+ }
59+
5360 @ Override
5461 public Set <String > getToolClasses (ItemStack stack ) {
5562 return WRENCH_TOOL_CLASSES ;
You can’t perform that action at this time.
0 commit comments