Drastically improved the usefulness of scythes. Previously they weren't breaking as many blocks as they should

This commit is contained in:
Adubbz 2016-03-19 22:03:23 +11:00
parent 1add1ebd34
commit 6c3c3cc129
2 changed files with 11 additions and 6 deletions

View File

@ -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

View File

@ -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);