Remove useless stuff

This commit is contained in:
GotoLink 2014-03-22 03:16:35 +01:00
commit 0cd1169e50
8 changed files with 6 additions and 14 deletions

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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