diff options
author | Nate Mortensen <nate.richard.mortensen@gmail.com> | 2013-07-01 06:03:00 -0500 |
---|---|---|
committer | Wesley Wolfe <weswolf@aol.com> | 2013-07-01 12:10:06 -0500 |
commit | 6c09066e224ac85b8a6464eaf8f53edfeb4beda4 (patch) | |
tree | 573e05f4b148cb1891a1d3839175e501e6257442 /src/main/java/net/minecraft/server/ItemFood.java | |
parent | f887b76a259e12468b28d82d1eced93f0b73bd6d (diff) | |
download | craftbukkit-6c09066e224ac85b8a6464eaf8f53edfeb4beda4.tar craftbukkit-6c09066e224ac85b8a6464eaf8f53edfeb4beda4.tar.gz craftbukkit-6c09066e224ac85b8a6464eaf8f53edfeb4beda4.tar.lz craftbukkit-6c09066e224ac85b8a6464eaf8f53edfeb4beda4.tar.xz craftbukkit-6c09066e224ac85b8a6464eaf8f53edfeb4beda4.zip |
Update CraftBukkit to 1.6.1
Diffstat (limited to 'src/main/java/net/minecraft/server/ItemFood.java')
-rw-r--r-- | src/main/java/net/minecraft/server/ItemFood.java | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/src/main/java/net/minecraft/server/ItemFood.java b/src/main/java/net/minecraft/server/ItemFood.java index 409addf8..5b77fc72 100644 --- a/src/main/java/net/minecraft/server/ItemFood.java +++ b/src/main/java/net/minecraft/server/ItemFood.java @@ -6,11 +6,11 @@ public class ItemFood extends Item { private final int b; private final float c; private final boolean d; - private boolean cu; - private int cv; - private int cw; - private int cx; - private float cy; + private boolean cB; + private int cC; + private int cD; + private int cE; + private float cF; public ItemFood(int i, int j, float f, boolean flag) { super(i); @@ -39,28 +39,29 @@ public class ItemFood extends Item { ((EntityPlayer) entityhuman).playerConnection.sendPacket(new Packet8UpdateHealth(entityhuman.getHealth(), entityhuman.getFoodData().foodLevel, entityhuman.getFoodData().saturationLevel)); // CraftBukkit end + entityhuman.getFoodData().a(this); world.makeSound(entityhuman, "random.burp", 0.5F, world.random.nextFloat() * 0.1F + 0.9F); this.c(itemstack, world, entityhuman); return itemstack; } protected void c(ItemStack itemstack, World world, EntityHuman entityhuman) { - if (!world.isStatic && this.cv > 0 && world.random.nextFloat() < this.cy) { - entityhuman.addEffect(new MobEffect(this.cv, this.cw * 20, this.cx)); + if (!world.isStatic && this.cC > 0 && world.random.nextFloat() < this.cF) { + entityhuman.addEffect(new MobEffect(this.cC, this.cD * 20, this.cE)); } } - public int c_(ItemStack itemstack) { + public int d_(ItemStack itemstack) { return 32; } - public EnumAnimation b_(ItemStack itemstack) { + public EnumAnimation c_(ItemStack itemstack) { return EnumAnimation.EAT; } public ItemStack a(ItemStack itemstack, World world, EntityHuman entityhuman) { - if (entityhuman.i(this.cu)) { - entityhuman.a(itemstack, this.c_(itemstack)); + if (entityhuman.g(this.cB)) { + entityhuman.a(itemstack, this.d_(itemstack)); } return itemstack; @@ -74,20 +75,20 @@ public class ItemFood extends Item { return this.c; } - public boolean i() { + public boolean j() { return this.d; } public ItemFood a(int i, int j, int k, float f) { - this.cv = i; - this.cw = j; - this.cx = k; - this.cy = f; + this.cC = i; + this.cD = j; + this.cE = k; + this.cF = f; return this; } - public ItemFood j() { - this.cu = true; + public ItemFood k() { + this.cB = true; return this; } } |