diff options
Diffstat (limited to 'src/main/java/net/minecraft/server/EntityPotion.java')
-rw-r--r-- | src/main/java/net/minecraft/server/EntityPotion.java | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/main/java/net/minecraft/server/EntityPotion.java b/src/main/java/net/minecraft/server/EntityPotion.java index cde3d7c3..72873357 100644 --- a/src/main/java/net/minecraft/server/EntityPotion.java +++ b/src/main/java/net/minecraft/server/EntityPotion.java @@ -19,7 +19,7 @@ public class EntityPotion extends EntityProjectile { } public EntityPotion(World world, EntityLiving entityliving, int i) { - this(world, entityliving, new ItemStack(Item.POTION, 1, i)); + this(world, entityliving, new ItemStack(Items.POTION, 1, i)); } public EntityPotion(World world, EntityLiving entityliving, ItemStack itemstack) { @@ -32,21 +32,21 @@ public class EntityPotion extends EntityProjectile { this.item = itemstack; } - protected float e() { + protected float i() { return 0.05F; } - protected float c() { + protected float e() { return 0.5F; } - protected float d() { + protected float f() { return -20.0F; } public void setPotionValue(int i) { if (this.item == null) { - this.item = new ItemStack(Item.POTION, 1, 0); + this.item = new ItemStack(Items.POTION, 1, 0); } this.item.setData(i); @@ -54,7 +54,7 @@ public class EntityPotion extends EntityProjectile { public int getPotionValue() { if (this.item == null) { - this.item = new ItemStack(Item.POTION, 1, 0); + this.item = new ItemStack(Items.POTION, 1, 0); } return this.item.getData(); @@ -62,7 +62,7 @@ public class EntityPotion extends EntityProjectile { protected void a(MovingObjectPosition movingobjectposition) { if (!this.world.isStatic) { - List list = Item.POTION.g(this.item); + List list = Items.POTION.g(this.item); if (true || list != null && !list.isEmpty()) { // CraftBukkit - Call event even if no effects to apply AxisAlignedBB axisalignedbb = this.boundingBox.grow(4.0D, 2.0D, 4.0D); @@ -137,7 +137,7 @@ public class EntityPotion extends EntityProjectile { public void a(NBTTagCompound nbttagcompound) { super.a(nbttagcompound); - if (nbttagcompound.hasKey("Potion")) { + if (nbttagcompound.hasKeyOfType("Potion", 10)) { this.item = ItemStack.createStack(nbttagcompound.getCompound("Potion")); } else { this.setPotionValue(nbttagcompound.getInt("potionValue")); @@ -151,7 +151,7 @@ public class EntityPotion extends EntityProjectile { public void b(NBTTagCompound nbttagcompound) { super.b(nbttagcompound); if (this.item != null) { - nbttagcompound.setCompound("Potion", this.item.save(new NBTTagCompound())); + nbttagcompound.set("Potion", this.item.save(new NBTTagCompound())); } } } |