A few creative enhancements
This commit is contained in:
parent
1b051c0dec
commit
653aa6c30f
2 changed files with 8 additions and 3 deletions
|
@ -156,7 +156,7 @@ public class CommonPlayerTickHandler implements ITickHandler
|
||||||
{
|
{
|
||||||
ItemStack stack = player.inventory.armorInventory[2];
|
ItemStack stack = player.inventory.armorInventory[2];
|
||||||
|
|
||||||
if(stack != null)
|
if(stack != null && !player.capabilities.isCreativeMode)
|
||||||
{
|
{
|
||||||
if(stack.getItem() instanceof ItemJetpack)
|
if(stack.getItem() instanceof ItemJetpack)
|
||||||
{
|
{
|
||||||
|
|
|
@ -201,7 +201,7 @@ public class ItemAtomicDisassembler extends ItemEnergized
|
||||||
|
|
||||||
private boolean useHoe(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side)
|
private boolean useHoe(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side)
|
||||||
{
|
{
|
||||||
if(!player.canPlayerEdit(x, y, z, side, stack) || getEnergy(stack) < HOE_USAGE)
|
if(!player.canPlayerEdit(x, y, z, side, stack) || (!player.capabilities.isCreativeMode && getEnergy(stack) < HOE_USAGE))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -233,7 +233,12 @@ public class ItemAtomicDisassembler extends ItemEnergized
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
world.setBlock(x, y, z, block.blockID);
|
world.setBlock(x, y, z, block.blockID);
|
||||||
|
|
||||||
|
if(!player.capabilities.isCreativeMode)
|
||||||
|
{
|
||||||
setEnergy(stack, getEnergy(stack)-HOE_USAGE);
|
setEnergy(stack, getEnergy(stack)-HOE_USAGE);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue