diff options
author | mbax <matt@phozop.net> | 2013-11-04 07:07:38 -0600 |
---|---|---|
committer | Wesley Wolfe <weswolf@aol.com> | 2013-11-30 19:26:12 -0600 |
commit | 2726696652179a5ead7dc07dd39edf7dfda687f7 (patch) | |
tree | ff78e22fdd4fc01889a5f6cc482b599f965cd93a /src/main/java/net/minecraft/server/EntityPotion.java | |
parent | ff8b70fbb7a96b9d2ff078afcf3b3ff90f200981 (diff) | |
download | craftbukkit-2726696652179a5ead7dc07dd39edf7dfda687f7.tar craftbukkit-2726696652179a5ead7dc07dd39edf7dfda687f7.tar.gz craftbukkit-2726696652179a5ead7dc07dd39edf7dfda687f7.tar.lz craftbukkit-2726696652179a5ead7dc07dd39edf7dfda687f7.tar.xz craftbukkit-2726696652179a5ead7dc07dd39edf7dfda687f7.zip |
Update CraftBukkit to Minecraft 1.7.2
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())); } } } |