From 919ebfde353fa51894cb6fe503566f686dbf781f Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Thu, 22 Dec 2016 21:18:27 +0100 Subject: [PATCH] Make the leaf blower work on all shearable things --- .../de/ellpeck/actuallyadditions/mod/items/ItemLeafBlower.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemLeafBlower.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemLeafBlower.java index 568b7eaed..ea1dccb95 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemLeafBlower.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemLeafBlower.java @@ -29,6 +29,7 @@ import net.minecraft.util.SoundCategory; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.MathHelper; import net.minecraft.world.World; +import net.minecraftforge.common.IShearable; import java.util.ArrayList; import java.util.Collections; @@ -105,7 +106,7 @@ public class ItemLeafBlower extends ItemBase implements IDisplayStandItem{ //The current Block to break BlockPos pos = new BlockPos(x+reachX, y+reachY, z+reachZ); Block block = world.getBlockState(pos).getBlock(); - if(block != null && (block instanceof BlockBush || (this.isAdvanced && block.isLeaves(world.getBlockState(pos), world, pos)))){ + if(block != null && ((block instanceof BlockBush || block instanceof IShearable) && (this.isAdvanced || !block.isLeaves(world.getBlockState(pos), world, pos)))){ breakPositions.add(pos); } }