From ce3ecced8838ab15741111bef0554dfa0ddc1c9c Mon Sep 17 00:00:00 2001 From: allstar69 Date: Fri, 28 Jun 2013 20:32:19 -0700 Subject: [PATCH] Added effects to staves. --- common/MysticWorld/TickHandler.java | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/common/MysticWorld/TickHandler.java b/common/MysticWorld/TickHandler.java index 0a844a0..4c892e4 100644 --- a/common/MysticWorld/TickHandler.java +++ b/common/MysticWorld/TickHandler.java @@ -38,29 +38,26 @@ public class TickHandler implements IScheduledTickHandler InventoryPlayer inventory = player.inventory; ItemStack itemstack = inventory.getCurrentItem(); - if (itemstack != null && itemstack.itemID == ItemHandler$1.fireOrb.itemID && player.isBurning()){ + if (itemstack != null && (itemstack.itemID == ItemHandler$1.fireOrb.itemID || itemstack.itemID == ItemHandler$1.fireStaff.itemID)){ player.addPotionEffect(new PotionEffect(Potion.fireResistance.getId(), 20, 0)); - } - - if (itemstack != null && itemstack.itemID == ItemHandler$1.fireOrb.itemID){ MysticWorld.proxy.fireFX(world, (player.posX - 0.5D) + rand.nextDouble(), player.posY, (player.posZ - 0.5D) + rand.nextDouble(), 1.0F); } - if (itemstack != null && itemstack.itemID == ItemHandler$1.airOrb.itemID){ + if (itemstack != null && (itemstack.itemID == ItemHandler$1.airOrb.itemID || itemstack.itemID == ItemHandler$1.airStaff.itemID)){ player.fallDistance = 0.0F; MysticWorld.proxy.airFX(world, (player.posX - 0.5D) + rand.nextDouble(), player.posY, (player.posZ - 0.5D) + rand.nextDouble(), 1.0F); } - if (itemstack != null && itemstack.itemID == ItemHandler$1.energyOrb.itemID){ + if (itemstack != null && (itemstack.itemID == ItemHandler$1.energyOrb.itemID || itemstack.itemID == ItemHandler$1.energyStaff.itemID)){ player.addPotionEffect(new PotionEffect(Potion.moveSpeed.getId(), 20, 2)); MysticWorld.proxy.energyFX(world, (player.posX - 0.5D) + rand.nextDouble(), player.posY, (player.posZ - 0.5D) + rand.nextDouble(), 1.0F); } - if (itemstack != null && itemstack.itemID == ItemHandler$1.earthOrb.itemID){ + if (itemstack != null && (itemstack.itemID == ItemHandler$1.earthOrb.itemID || itemstack.itemID == ItemHandler$1.earthStaff.itemID)){ MysticWorld.proxy.earthFX(world, (player.posX - 0.5D) + rand.nextDouble(), player.posY, (player.posZ - 0.5D) + rand.nextDouble(), 1.0F); } - if (itemstack != null && itemstack.itemID == ItemHandler$1.waterOrb.itemID){ + if (itemstack != null && (itemstack.itemID == ItemHandler$1.waterOrb.itemID || itemstack.itemID == ItemHandler$1.waterStaff.itemID)){ MysticWorld.proxy.waterFX(world, (player.posX - 0.5D) + rand.nextDouble(), player.posY, (player.posZ - 0.5D) + rand.nextDouble(), 1.0F); }