Added energy check for Atomic Disassembler hoe function

This commit is contained in:
Aidan C. Brady 2014-03-07 21:36:00 -05:00
parent 9d8a6c9e4c
commit 730ae963ff

View file

@ -169,28 +169,31 @@ public class ItemAtomicDisassembler extends ItemEnergized
}
}
switch(getEfficiency(stack))
if(getEnergy(stack) > 0)
{
case 20:
for(int x1 = x-1; x1 <= x+1; x1++)
{
for(int z1 = z-1; z1 <= z+1; z1++)
switch(getEfficiency(stack))
{
case 20:
for(int x1 = x-1; x1 <= x+1; x1++)
{
useHoe(stack, player, world, x1, y, z1, side);
for(int z1 = z-1; z1 <= z+1; z1++)
{
useHoe(stack, player, world, x1, y, z1, side);
}
}
}
break;
case 128:
for(int x1 = x-2; x1 <= x+2; x1++)
{
for(int z1 = z-2; z1 <= z+2; z1++)
break;
case 128:
for(int x1 = x-2; x1 <= x+2; x1++)
{
useHoe(stack, player, world, x1, y, z1, side);
for(int z1 = z-2; z1 <= z+2; z1++)
{
useHoe(stack, player, world, x1, y, z1, side);
}
}
}
break;
break;
}
}
return true;