Added effects to staves.

This commit is contained in:
allstar69 2013-06-28 20:32:19 -07:00
commit ce3ecced88

View file

@ -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);
}