Fixes chainsaw not working on some wooden blocks, closes #1467

This commit is contained in:
modmuss50 2018-03-29 11:00:17 +01:00
parent 54a7e338c5
commit b0e79aa1e6
No known key found for this signature in database
GPG key ID: 773D17BE8BF49C82

View file

@ -24,6 +24,7 @@
package techreborn.items.tools;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.EntityLivingBase;
@ -85,7 +86,7 @@ public class ItemChainsaw extends ItemAxe implements IEnergyItemInfo, IEnergyInt
@Override
public float getDestroySpeed(ItemStack stack, IBlockState state) {
if (PoweredItem.canUseEnergy(cost, stack) && state.getBlock().isToolEffective("axe", state)) {
if (PoweredItem.canUseEnergy(cost, stack) && (state.getBlock().isToolEffective("axe", state) || state.getMaterial() == Material.WOOD)) {
return this.poweredSpeed;
}
else {