Drastically improved the usefulness of scythes. Previously they weren't breaking as many blocks as they should
This commit is contained in:
parent
1add1ebd34
commit
6c3c3cc129
|
@ -1,4 +1,4 @@
|
||||||
minecraft_version=1.9
|
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
|
mod_version=4.0.0
|
||||||
mappings_version=snapshot_nodoc_20160318
|
mappings_version=snapshot_nodoc_20160318
|
|
@ -13,6 +13,7 @@ import biomesoplenty.common.block.BlockBOPFlower;
|
||||||
import biomesoplenty.common.block.BlockBOPPlant;
|
import biomesoplenty.common.block.BlockBOPPlant;
|
||||||
import biomesoplenty.common.enums.BOPPlants;
|
import biomesoplenty.common.enums.BOPPlants;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.block.BlockBush;
|
||||||
import net.minecraft.block.BlockFlower;
|
import net.minecraft.block.BlockFlower;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
|
@ -172,16 +173,14 @@ public class ItemBOPScythe extends Item
|
||||||
{
|
{
|
||||||
switch ((BOPPlants) state.getValue(((BlockBOPPlant)block).variantProperty))
|
switch ((BOPPlants) state.getValue(((BlockBOPPlant)block).variantProperty))
|
||||||
{
|
{
|
||||||
case SHORTGRASS:
|
|
||||||
block.dropBlockAsItem(world, pos, state, fortune);
|
|
||||||
world.setBlockToAir(pos);
|
|
||||||
return true;
|
|
||||||
case MEDIUMGRASS:
|
case MEDIUMGRASS:
|
||||||
block.dropBlockAsItem(world, pos, state, fortune);
|
block.dropBlockAsItem(world, pos, state, fortune);
|
||||||
world.setBlockState(pos, BlockBOPPlant.paging.getVariantState(BOPPlants.SHORTGRASS));
|
world.setBlockState(pos, BlockBOPPlant.paging.getVariantState(BOPPlants.SHORTGRASS));
|
||||||
return true;
|
return true;
|
||||||
default:
|
default:
|
||||||
return false;
|
block.dropBlockAsItem(world, pos, state, fortune);
|
||||||
|
world.setBlockToAir(pos);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (block == Blocks.tallgrass)
|
else if (block == Blocks.tallgrass)
|
||||||
|
@ -190,6 +189,12 @@ public class ItemBOPScythe extends Item
|
||||||
world.setBlockState(pos, BlockBOPPlant.paging.getVariantState(BOPPlants.MEDIUMGRASS));
|
world.setBlockState(pos, BlockBOPPlant.paging.getVariantState(BOPPlants.MEDIUMGRASS));
|
||||||
return true;
|
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))
|
else if ((block instanceof BlockFlower) || (block instanceof BlockBOPFlower))
|
||||||
{
|
{
|
||||||
block.dropBlockAsItem(world, pos, state, fortune);
|
block.dropBlockAsItem(world, pos, state, fortune);
|
||||||
|
|
Loading…
Reference in New Issue