The height of leaves destroyed now changes with tool material
This commit is contained in:
parent
70d33a8f8b
commit
de7b5c50d1
1 changed files with 32 additions and 3 deletions
|
@ -44,20 +44,48 @@ public class ItemBOPScythe extends Item
|
|||
|
||||
if (toolMaterial == EnumToolMaterial.IRON || toolMaterial == EnumToolMaterial.GOLD)
|
||||
{
|
||||
if (block != null)
|
||||
{
|
||||
if (block.isLeaves(world, x, y, z))
|
||||
height = 2;
|
||||
}
|
||||
|
||||
radius = 2;
|
||||
}
|
||||
else if (toolMaterial == EnumToolMaterial.EMERALD)
|
||||
{
|
||||
if (block != null)
|
||||
{
|
||||
if (block.isLeaves(world, x, y, z))
|
||||
height = 3;
|
||||
}
|
||||
|
||||
radius = 3;
|
||||
}
|
||||
else if (toolMaterial == BOPItems.EnumToolMaterialAmethyst)
|
||||
{
|
||||
if (block != null)
|
||||
{
|
||||
if (block.isLeaves(world, x, y, z))
|
||||
height = 4;
|
||||
}
|
||||
|
||||
radius = 4;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (block != null)
|
||||
{
|
||||
if (block.isLeaves(world, x, y, z))
|
||||
height = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (block != null)
|
||||
{
|
||||
if (block.isLeaves(world, x, y, z))
|
||||
{
|
||||
if (height > 0)
|
||||
{
|
||||
trimLeaves(world, x, y, z, height, radius);
|
||||
|
||||
|
@ -65,6 +93,7 @@ public class ItemBOPScythe extends Item
|
|||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
trimCutCorner(world, x, y, z, height, radius);
|
||||
|
|
Loading…
Reference in a new issue