Merge pull request #1588 from YuRaNnNzZZ/1.12-rockcutterfix

Fix for Rock Cutter getting an enchant on every re-craft
This commit is contained in:
Modmuss50 2018-08-24 18:16:56 +01:00 committed by GitHub
commit 0ea442a993
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -110,8 +110,10 @@ public class ItemRockCutter extends ItemPickaxe implements IEnergyItemInfo {
@Override @Override
public void onCreated(ItemStack stack, World worldIn, EntityPlayer playerIn) { public void onCreated(ItemStack stack, World worldIn, EntityPlayer playerIn) {
if (!stack.isItemEnchanted()) {
stack.addEnchantment(Enchantments.SILK_TOUCH, 1); stack.addEnchantment(Enchantments.SILK_TOUCH, 1);
} }
}
@Override @Override
public double getDurabilityForDisplay(ItemStack stack) { public double getDurabilityForDisplay(ItemStack stack) {