diff --git a/common/MysticWorld/Items/ItemStaffEarth.java b/common/MysticWorld/Items/ItemStaffEarth.java index 14c26fc..66ca166 100644 --- a/common/MysticWorld/Items/ItemStaffEarth.java +++ b/common/MysticWorld/Items/ItemStaffEarth.java @@ -61,19 +61,21 @@ public class ItemStaffEarth extends Item { return false; } } - else - { - world.playAuxSFXAtEntity((EntityPlayer)null, 1009, (int)entityPlayer.posX, (int)entityPlayer.posY, (int)entityPlayer.posZ, 0); + return true; + } - if (!world.isRemote) - { - world.spawnEntityInWorld(new EntityChargeEarth(world, entityPlayer)); - - itemStack.damageItem(1, entityPlayer); - } + public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer entityPlayer) + { + world.playAuxSFXAtEntity((EntityPlayer)null, 1009, (int)entityPlayer.posX, (int)entityPlayer.posY, (int)entityPlayer.posZ, 0); + + if (!world.isRemote) + { + world.spawnEntityInWorld(new EntityChargeEarth(world, entityPlayer)); - return true; + itemStack.damageItem(1, entityPlayer); } + + return itemStack; } public static boolean applyBonemeal(ItemStack itemStack, World par1World, int par2, int par3, int par4, EntityPlayer player) diff --git a/common/MysticWorld/Items/ItemStaffEnegy.java b/common/MysticWorld/Items/ItemStaffEnegy.java index 02ace8a..c5bdcb8 100644 --- a/common/MysticWorld/Items/ItemStaffEnegy.java +++ b/common/MysticWorld/Items/ItemStaffEnegy.java @@ -79,19 +79,21 @@ public class ItemStaffEnegy extends Item{ return true; } } - else - { - world.playAuxSFXAtEntity((EntityPlayer)null, 1009, (int)entityPlayer.posX, (int)entityPlayer.posY, (int)entityPlayer.posZ, 0); - - if (!world.isRemote) - { - world.spawnEntityInWorld(new EntityChargeEnergy(world, entityPlayer)); - - itemStack.damageItem(1, entityPlayer); - } - - return true; - } + return true; + } + + public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer entityPlayer) + { + world.playAuxSFXAtEntity((EntityPlayer)null, 1009, (int)entityPlayer.posX, (int)entityPlayer.posY, (int)entityPlayer.posZ, 0); + + if (!world.isRemote) + { + world.spawnEntityInWorld(new EntityChargeEnergy(world, entityPlayer)); + + itemStack.damageItem(1, entityPlayer); + } + + return itemStack; } } diff --git a/common/MysticWorld/Items/ItemStaffFire.java b/common/MysticWorld/Items/ItemStaffFire.java index 3beab17..dee70c1 100644 --- a/common/MysticWorld/Items/ItemStaffFire.java +++ b/common/MysticWorld/Items/ItemStaffFire.java @@ -106,19 +106,21 @@ public class ItemStaffFire extends Item { return true; } } - else - { - world.playAuxSFXAtEntity((EntityPlayer)null, 1009, (int)entityPlayer.posX, (int)entityPlayer.posY, (int)entityPlayer.posZ, 0); - - if (!world.isRemote) - { - world.spawnEntityInWorld(new EntityChargeFire(world, entityPlayer)); - - itemStack.damageItem(1, entityPlayer); - } - - return true; - } + return true; + } + + public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer entityPlayer) + { + world.playAuxSFXAtEntity((EntityPlayer)null, 1009, (int)entityPlayer.posX, (int)entityPlayer.posY, (int)entityPlayer.posZ, 0); + + if (!world.isRemote) + { + world.spawnEntityInWorld(new EntityChargeFire(world, entityPlayer)); + + itemStack.damageItem(1, entityPlayer); + } + + return itemStack; } }