From dc638cea9c3dd92cf485d29a0563b17cb5878a2a Mon Sep 17 00:00:00 2001 From: ProfessorProspector Date: Thu, 30 Mar 2017 18:02:58 -0700 Subject: [PATCH] Axes extend ItemAxe Fixes #1027 --- .../java/techreborn/items/tools/ItemTRAxe.java | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/main/java/techreborn/items/tools/ItemTRAxe.java b/src/main/java/techreborn/items/tools/ItemTRAxe.java index 929d3204e..bd4e9ad14 100644 --- a/src/main/java/techreborn/items/tools/ItemTRAxe.java +++ b/src/main/java/techreborn/items/tools/ItemTRAxe.java @@ -29,6 +29,7 @@ import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; +import net.minecraft.item.ItemAxe; import net.minecraft.item.ItemStack; import net.minecraft.item.ItemTool; import reborncore.RebornCore; @@ -36,24 +37,15 @@ import techreborn.client.TechRebornCreativeTabMisc; import java.util.Set; -public class ItemTRAxe extends ItemTool { - private static final Set EFFECTIVE_ON = Sets.newHashSet(new Block[] { Blocks.PLANKS, Blocks.BOOKSHELF, - Blocks.LOG, Blocks.LOG2, Blocks.CHEST, Blocks.PUMPKIN, Blocks.LIT_PUMPKIN, Blocks.MELON_BLOCK, - Blocks.LADDER, Blocks.WOODEN_BUTTON, Blocks.WOODEN_PRESSURE_PLATE }); +public class ItemTRAxe extends ItemAxe { private ToolMaterial material = ToolMaterial.WOOD; public ItemTRAxe(ToolMaterial material) { - super(material, EFFECTIVE_ON); + super(material); this.damageVsEntity = material.getDamageVsEntity() + 5.75F; this.attackSpeed = (material.getDamageVsEntity() + 6.75F) * -0.344444F; setUnlocalizedName(material.name().toLowerCase() + "Axe"); setCreativeTab(TechRebornCreativeTabMisc.instance); this.material = material; } - - public float getStrVsBlock(ItemStack stack, IBlockState state) { - Material material = state.getMaterial(); - return material != Material.WOOD && material != Material.PLANTS && material != Material.VINE - ? super.getStrVsBlock(stack, state) : this.efficiencyOnProperMaterial; - } }