Fixes chainsaw not working on some wooden blocks, closes #1467
This commit is contained in:
parent
54a7e338c5
commit
b0e79aa1e6
1 changed files with 2 additions and 1 deletions
|
@ -24,6 +24,7 @@
|
||||||
|
|
||||||
package techreborn.items.tools;
|
package techreborn.items.tools;
|
||||||
|
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.enchantment.EnchantmentHelper;
|
import net.minecraft.enchantment.EnchantmentHelper;
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
|
@ -85,7 +86,7 @@ public class ItemChainsaw extends ItemAxe implements IEnergyItemInfo, IEnergyInt
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public float getDestroySpeed(ItemStack stack, IBlockState state) {
|
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;
|
return this.poweredSpeed;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue