More work on the implementation of events
This commit is contained in:
parent
dd3a093825
commit
39b4243a82
27 changed files with 217 additions and 259 deletions
|
@ -85,7 +85,10 @@ public class EnergyBazooka extends EnergyItems
|
|||
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
this.syphonBatteries(par1ItemStack, par3EntityPlayer, this.getEnergyUsed());
|
||||
if(!this.syphonBatteries(par1ItemStack, par3EntityPlayer, this.getEnergyUsed()))
|
||||
{
|
||||
return par1ItemStack;
|
||||
}
|
||||
}
|
||||
|
||||
par2World.playSoundAtEntity(par3EntityPlayer, "random.bow", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F));
|
||||
|
@ -131,7 +134,10 @@ public class EnergyBazooka extends EnergyItems
|
|||
{
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 50);
|
||||
if(!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 50))
|
||||
{
|
||||
this.setActivated(par1ItemStack, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue