From 6c3c3cc1293533853d78e387f1d063b9c63fb79b Mon Sep 17 00:00:00 2001 From: Adubbz Date: Sat, 19 Mar 2016 22:03:23 +1100 Subject: [PATCH] Drastically improved the usefulness of scythes. Previously they weren't breaking as many blocks as they should --- build.properties | 2 +- .../biomesoplenty/common/item/ItemBOPScythe.java | 15 ++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/build.properties b/build.properties index 269b0292b..75ee437e6 100644 --- a/build.properties +++ b/build.properties @@ -1,4 +1,4 @@ minecraft_version=1.9 -forge_version=12.16.0.1766-1.9 +forge_version=12.16.0.1770-1.9 mod_version=4.0.0 mappings_version=snapshot_nodoc_20160318 \ No newline at end of file diff --git a/src/main/java/biomesoplenty/common/item/ItemBOPScythe.java b/src/main/java/biomesoplenty/common/item/ItemBOPScythe.java index cdef3174e..ec4f6b75a 100644 --- a/src/main/java/biomesoplenty/common/item/ItemBOPScythe.java +++ b/src/main/java/biomesoplenty/common/item/ItemBOPScythe.java @@ -13,6 +13,7 @@ import biomesoplenty.common.block.BlockBOPFlower; import biomesoplenty.common.block.BlockBOPPlant; import biomesoplenty.common.enums.BOPPlants; import net.minecraft.block.Block; +import net.minecraft.block.BlockBush; import net.minecraft.block.BlockFlower; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; @@ -172,16 +173,14 @@ public class ItemBOPScythe extends Item { switch ((BOPPlants) state.getValue(((BlockBOPPlant)block).variantProperty)) { - case SHORTGRASS: - block.dropBlockAsItem(world, pos, state, fortune); - world.setBlockToAir(pos); - return true; case MEDIUMGRASS: block.dropBlockAsItem(world, pos, state, fortune); world.setBlockState(pos, BlockBOPPlant.paging.getVariantState(BOPPlants.SHORTGRASS)); return true; default: - return false; + block.dropBlockAsItem(world, pos, state, fortune); + world.setBlockToAir(pos); + return true; } } else if (block == Blocks.tallgrass) @@ -190,6 +189,12 @@ public class ItemBOPScythe extends Item world.setBlockState(pos, BlockBOPPlant.paging.getVariantState(BOPPlants.MEDIUMGRASS)); return true; } + else if (block instanceof BlockBush && block.isReplaceable(world, pos)) + { + block.dropBlockAsItem(world, pos, state, fortune); + world.setBlockToAir(pos); + return true; + } else if ((block instanceof BlockFlower) || (block instanceof BlockBOPFlower)) { block.dropBlockAsItem(world, pos, state, fortune);