The height of leaves destroyed now changes with tool material

This commit is contained in:
Adubbz G 2013-06-18 19:31:22 +10:00
parent 70d33a8f8b
commit de7b5c50d1
1 changed files with 32 additions and 3 deletions

View File

@ -44,20 +44,48 @@ public class ItemBOPScythe extends Item
if (toolMaterial == EnumToolMaterial.IRON || toolMaterial == EnumToolMaterial.GOLD) if (toolMaterial == EnumToolMaterial.IRON || toolMaterial == EnumToolMaterial.GOLD)
{ {
if (block != null)
{
if (block.isLeaves(world, x, y, z))
height = 2;
}
radius = 2; radius = 2;
} }
else if (toolMaterial == EnumToolMaterial.EMERALD) else if (toolMaterial == EnumToolMaterial.EMERALD)
{ {
if (block != null)
{
if (block.isLeaves(world, x, y, z))
height = 3;
}
radius = 3; radius = 3;
} }
else if (toolMaterial == BOPItems.EnumToolMaterialAmethyst) else if (toolMaterial == BOPItems.EnumToolMaterialAmethyst)
{ {
if (block != null)
{
if (block.isLeaves(world, x, y, z))
height = 4;
}
radius = 4; radius = 4;
} }
else
{
if (block != null)
{
if (block.isLeaves(world, x, y, z))
height = 0;
}
}
if (block != null) if (block != null)
{ {
if (block.isLeaves(world, x, y, z)) if (block.isLeaves(world, x, y, z))
{
if (height > 0)
{ {
trimLeaves(world, x, y, z, height, radius); trimLeaves(world, x, y, z, height, radius);
@ -65,6 +93,7 @@ public class ItemBOPScythe extends Item
return true; return true;
} }
}
else else
{ {
trimCutCorner(world, x, y, z, height, radius); trimCutCorner(world, x, y, z, height, radius);