Added in #396 and gave the sword blocking

This commit is contained in:
Arcaratus 2015-07-27 14:02:32 -04:00
parent e2db60475f
commit bc67bb8379
7 changed files with 20 additions and 2 deletions

View file

@ -117,7 +117,7 @@ public class BoundAxe extends ItemAxe implements IBindable
par1ItemStack.getTagCompound().setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200);
return par1ItemStack;
}
if (par2World.isRemote)
{
return par1ItemStack;
@ -128,6 +128,11 @@ public class BoundAxe extends ItemAxe implements IBindable
return par1ItemStack;
}
if (AlchemicalWizardry.disableBoundToolsRightClick)
{
return par1ItemStack;
}
if (par3EntityPlayer.isPotionActive(AlchemicalWizardry.customPotionInhibit))
{
return par1ItemStack;

View file

@ -131,6 +131,11 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable
return par1ItemStack;
}
if (AlchemicalWizardry.disableBoundToolsRightClick)
{
return par1ItemStack;
}
if (par3EntityPlayer.isPotionActive(AlchemicalWizardry.customPotionInhibit))
{
return par1ItemStack;

View file

@ -132,6 +132,11 @@ public class BoundShovel extends ItemSpade implements IBindable
return par1ItemStack;
}
if (AlchemicalWizardry.disableBoundToolsRightClick)
{
return par1ItemStack;
}
if (par3EntityPlayer.isPotionActive(AlchemicalWizardry.customPotionInhibit))
{
return par1ItemStack;

View file

@ -121,6 +121,7 @@ public class EnergySword extends ItemSword
@Override
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
{
super.onItemRightClick(par1ItemStack, par2World, par3EntityPlayer);
if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking())
{
this.setActivated(par1ItemStack, !getActivated(par1ItemStack));