Made the chance of scythes getting damaged related to their material
This commit is contained in:
parent
f5936e2434
commit
b58ea4369d
1 changed files with 72 additions and 9 deletions
|
@ -118,7 +118,28 @@ public class ItemBOPScythe extends Item
|
|||
|
||||
if (block != null)
|
||||
{
|
||||
if (world.rand.nextInt(6) == 0)
|
||||
if (toolMaterial == EnumToolMaterial.IRON || toolMaterial == EnumToolMaterial.GOLD)
|
||||
{
|
||||
if (world.rand.nextInt(7) == 0)
|
||||
{
|
||||
stack.damageItem(1, entity);
|
||||
}
|
||||
}
|
||||
else if (toolMaterial == EnumToolMaterial.EMERALD)
|
||||
{
|
||||
if (world.rand.nextInt(8) == 0)
|
||||
{
|
||||
stack.damageItem(1, entity);
|
||||
}
|
||||
}
|
||||
else if (toolMaterial == BOPItems.EnumToolMaterialAmethyst)
|
||||
{
|
||||
if (world.rand.nextInt(9) == 0)
|
||||
{
|
||||
stack.damageItem(1, entity);
|
||||
}
|
||||
}
|
||||
else if (world.rand.nextInt(5) == 0)
|
||||
{
|
||||
stack.damageItem(1, entity);
|
||||
}
|
||||
|
@ -174,7 +195,28 @@ public class ItemBOPScythe extends Item
|
|||
{
|
||||
if (block.isLeaves(world, x + aX, y + aY, z + aZ))
|
||||
{
|
||||
if (world.rand.nextInt(5) == 0)
|
||||
if (toolMaterial == EnumToolMaterial.IRON || toolMaterial == EnumToolMaterial.GOLD)
|
||||
{
|
||||
if (world.rand.nextInt(6) == 0)
|
||||
{
|
||||
stack.damageItem(1, entity);
|
||||
}
|
||||
}
|
||||
else if (toolMaterial == EnumToolMaterial.EMERALD)
|
||||
{
|
||||
if (world.rand.nextInt(7) == 0)
|
||||
{
|
||||
stack.damageItem(1, entity);
|
||||
}
|
||||
}
|
||||
else if (toolMaterial == BOPItems.EnumToolMaterialAmethyst)
|
||||
{
|
||||
if (world.rand.nextInt(8) == 0)
|
||||
{
|
||||
stack.damageItem(1, entity);
|
||||
}
|
||||
}
|
||||
else if (world.rand.nextInt(4) == 0)
|
||||
{
|
||||
stack.damageItem(1, entity);
|
||||
}
|
||||
|
@ -203,7 +245,28 @@ public class ItemBOPScythe extends Item
|
|||
|
||||
if (block != null)
|
||||
{
|
||||
if (world.rand.nextInt(7) == 0)
|
||||
if (toolMaterial == EnumToolMaterial.IRON || toolMaterial == EnumToolMaterial.GOLD)
|
||||
{
|
||||
if (world.rand.nextInt(8) == 0)
|
||||
{
|
||||
stack.damageItem(1, entity);
|
||||
}
|
||||
}
|
||||
else if (toolMaterial == EnumToolMaterial.EMERALD)
|
||||
{
|
||||
if (world.rand.nextInt(9) == 0)
|
||||
{
|
||||
stack.damageItem(1, entity);
|
||||
}
|
||||
}
|
||||
else if (toolMaterial == BOPItems.EnumToolMaterialAmethyst)
|
||||
{
|
||||
if (world.rand.nextInt(10) == 0)
|
||||
{
|
||||
stack.damageItem(1, entity);
|
||||
}
|
||||
}
|
||||
else if (world.rand.nextInt(5) == 0)
|
||||
{
|
||||
stack.damageItem(1, entity);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue