From 0cd1169e507303e9b07791a81d492795f1f3aada Mon Sep 17 00:00:00 2001 From: GotoLink Date: Sat, 22 Mar 2014 03:16:35 +0100 Subject: [PATCH] Remove useless stuff --- common/MysticWorld/Items/ItemOrb.java | 4 ---- common/MysticWorld/Items/ItemOrbEnergy.java | 2 +- common/MysticWorld/Items/ItemOrbFire.java | 2 +- common/MysticWorld/Items/ItemOrbWater.java | 2 +- common/MysticWorld/Items/ItemStaff.java | 4 ---- common/MysticWorld/Items/ItemStaffEnegy.java | 2 +- common/MysticWorld/Items/ItemStaffFire.java | 2 +- common/MysticWorld/Items/ItemStaffWater.java | 2 +- 8 files changed, 6 insertions(+), 14 deletions(-) diff --git a/common/MysticWorld/Items/ItemOrb.java b/common/MysticWorld/Items/ItemOrb.java index 38012b1..6467c44 100644 --- a/common/MysticWorld/Items/ItemOrb.java +++ b/common/MysticWorld/Items/ItemOrb.java @@ -1,7 +1,5 @@ package mysticworld.items; -import java.util.Random; - import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -10,8 +8,6 @@ import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.Item; public class ItemOrb extends Item { - Random rand = new Random(); - public ItemOrb() { super(); this.setMaxStackSize(1); diff --git a/common/MysticWorld/Items/ItemOrbEnergy.java b/common/MysticWorld/Items/ItemOrbEnergy.java index 9202fa3..bd2b05d 100644 --- a/common/MysticWorld/Items/ItemOrbEnergy.java +++ b/common/MysticWorld/Items/ItemOrbEnergy.java @@ -53,7 +53,7 @@ public class ItemOrbEnergy extends ItemOrb { public void onUpdate(ItemStack itemStack, World world, Entity entity, int par4, boolean par5) { if (entity instanceof EntityPlayer && par5) { ((EntityPlayer)entity).addPotionEffect(new PotionEffect(Potion.moveSpeed.getId(), 20, 2)); - MysticWorld.proxy.energyFX(world, (entity.posX - 0.5D) + rand.nextDouble(), entity.posY, (entity.posZ - 0.5D) + rand.nextDouble(), 1.0F); + MysticWorld.proxy.energyFX(world, (entity.posX - 0.5D) + itemRand.nextDouble(), entity.posY, (entity.posZ - 0.5D) + itemRand.nextDouble(), 1.0F); } } } diff --git a/common/MysticWorld/Items/ItemOrbFire.java b/common/MysticWorld/Items/ItemOrbFire.java index 3c155f2..cd33300 100644 --- a/common/MysticWorld/Items/ItemOrbFire.java +++ b/common/MysticWorld/Items/ItemOrbFire.java @@ -68,7 +68,7 @@ public class ItemOrbFire extends ItemOrb { public void onUpdate(ItemStack itemStack, World world, Entity entity, int par4, boolean par5) { if (entity instanceof EntityPlayer && par5) { ((EntityPlayer)entity).addPotionEffect(new PotionEffect(Potion.fireResistance.getId(), 20, 0)); - MysticWorld.proxy.fireFX(world, (entity.posX - 0.5D) + rand.nextDouble(), entity.posY, (entity.posZ - 0.5D) + rand.nextDouble(), 1.0F); + MysticWorld.proxy.fireFX(world, (entity.posX - 0.5D) + itemRand.nextDouble(), entity.posY, (entity.posZ - 0.5D) + itemRand.nextDouble(), 1.0F); } } } diff --git a/common/MysticWorld/Items/ItemOrbWater.java b/common/MysticWorld/Items/ItemOrbWater.java index 368054a..0017449 100644 --- a/common/MysticWorld/Items/ItemOrbWater.java +++ b/common/MysticWorld/Items/ItemOrbWater.java @@ -75,7 +75,7 @@ public class ItemOrbWater extends ItemOrb { @Override public void onUpdate(ItemStack itemStack, World world, Entity entity, int par4, boolean par5) { if (par5) { - MysticWorld.proxy.waterFX(world, (entity.posX - 0.5D) + rand.nextDouble(), entity.posY, (entity.posZ - 0.5D) + rand.nextDouble(), 1.0F); + MysticWorld.proxy.waterFX(world, (entity.posX - 0.5D) + itemRand.nextDouble(), entity.posY, (entity.posZ - 0.5D) + itemRand.nextDouble(), 1.0F); } } } diff --git a/common/MysticWorld/Items/ItemStaff.java b/common/MysticWorld/Items/ItemStaff.java index 588e6f8..b86b02f 100644 --- a/common/MysticWorld/Items/ItemStaff.java +++ b/common/MysticWorld/Items/ItemStaff.java @@ -1,7 +1,5 @@ package mysticworld.items; -import java.util.Random; - import mysticworld.MysticWorld; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.Item; @@ -9,8 +7,6 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; public class ItemStaff extends Item { - Random rand = new Random(); - public ItemStaff() { super(); this.setMaxStackSize(1); diff --git a/common/MysticWorld/Items/ItemStaffEnegy.java b/common/MysticWorld/Items/ItemStaffEnegy.java index 03fad1d..734d6e0 100644 --- a/common/MysticWorld/Items/ItemStaffEnegy.java +++ b/common/MysticWorld/Items/ItemStaffEnegy.java @@ -79,7 +79,7 @@ public class ItemStaffEnegy extends ItemStaff { public void onUpdate(ItemStack itemStack, World world, Entity entity, int par4, boolean par5) { if (entity instanceof EntityPlayer && par5) { ((EntityPlayer)entity).addPotionEffect(new PotionEffect(Potion.moveSpeed.getId(), 20, 2)); - MysticWorld.proxy.energyFX(world, (entity.posX - 0.5D) + rand.nextDouble(), entity.posY, (entity.posZ - 0.5D) + rand.nextDouble(), 1.0F); + MysticWorld.proxy.energyFX(world, (entity.posX - 0.5D) + itemRand.nextDouble(), entity.posY, (entity.posZ - 0.5D) + itemRand.nextDouble(), 1.0F); } } } diff --git a/common/MysticWorld/Items/ItemStaffFire.java b/common/MysticWorld/Items/ItemStaffFire.java index 5fb97be..4054ba0 100644 --- a/common/MysticWorld/Items/ItemStaffFire.java +++ b/common/MysticWorld/Items/ItemStaffFire.java @@ -83,7 +83,7 @@ public class ItemStaffFire extends ItemStaff { public void onUpdate(ItemStack itemStack, World world, Entity entity, int par4, boolean par5) { if (entity instanceof EntityPlayer && par5) { ((EntityPlayer)entity).addPotionEffect(new PotionEffect(Potion.fireResistance.getId(), 20, 0)); - MysticWorld.proxy.fireFX(world, (entity.posX - 0.5D) + rand.nextDouble(), entity.posY, (entity.posZ - 0.5D) + rand.nextDouble(), 1.0F); + MysticWorld.proxy.fireFX(world, (entity.posX - 0.5D) + itemRand.nextDouble(), entity.posY, (entity.posZ - 0.5D) + itemRand.nextDouble(), 1.0F); } } } diff --git a/common/MysticWorld/Items/ItemStaffWater.java b/common/MysticWorld/Items/ItemStaffWater.java index 6d665e4..b70a8f3 100644 --- a/common/MysticWorld/Items/ItemStaffWater.java +++ b/common/MysticWorld/Items/ItemStaffWater.java @@ -88,7 +88,7 @@ public class ItemStaffWater extends ItemStaff { @Override public void onUpdate(ItemStack itemStack, World world, Entity entity, int par4, boolean par5) { if (par5) { - MysticWorld.proxy.waterFX(world, (entity.posX - 0.5D) + rand.nextDouble(), entity.posY, (entity.posZ - 0.5D) + rand.nextDouble(), 1.0F); + MysticWorld.proxy.waterFX(world, (entity.posX - 0.5D) + itemRand.nextDouble(), entity.posY, (entity.posZ - 0.5D) + itemRand.nextDouble(), 1.0F); } } } \ No newline at end of file