diff options
author | feildmaster <admin@feildmaster.com> | 2012-12-19 22:03:52 -0600 |
---|---|---|
committer | feildmaster <admin@feildmaster.com> | 2012-12-20 10:43:00 -0600 |
commit | 23b67643741d5754af4de020a29d557078f9f81d (patch) | |
tree | 90e1a32f7eb94af49a381cb6bc34bf6247f0efe6 /src/main/java/net/minecraft/server/ItemFood.java | |
parent | 9f1bf124eec7c20f16b2034fd9fba55f70c805fd (diff) | |
download | craftbukkit-23b67643741d5754af4de020a29d557078f9f81d.tar craftbukkit-23b67643741d5754af4de020a29d557078f9f81d.tar.gz craftbukkit-23b67643741d5754af4de020a29d557078f9f81d.tar.lz craftbukkit-23b67643741d5754af4de020a29d557078f9f81d.tar.xz craftbukkit-23b67643741d5754af4de020a29d557078f9f81d.zip |
Update CraftBukkit to Minecraft 1.4.6
Diffstat (limited to 'src/main/java/net/minecraft/server/ItemFood.java')
-rw-r--r-- | src/main/java/net/minecraft/server/ItemFood.java | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/main/java/net/minecraft/server/ItemFood.java b/src/main/java/net/minecraft/server/ItemFood.java index 5a3862d2..28fbe430 100644 --- a/src/main/java/net/minecraft/server/ItemFood.java +++ b/src/main/java/net/minecraft/server/ItemFood.java @@ -5,18 +5,18 @@ public class ItemFood extends Item { public final int a; private final int b; private final float c; - private final boolean cl; - private boolean cm; - private int cn; - private int co; - private int cp; - private float cq; + private final boolean co; + private boolean cp; + private int cq; + private int cr; + private int cs; + private float ct; public ItemFood(int i, int j, float f, boolean flag) { super(i); this.a = 32; this.b = j; - this.cl = flag; + this.co = flag; this.c = f; this.a(CreativeModeTab.h); } @@ -36,7 +36,7 @@ public class ItemFood extends Item { entityhuman.getFoodData().eat(event.getFoodLevel() - oldFoodLevel, this.getSaturationModifier()); } - ((EntityPlayer) entityhuman).netServerHandler.sendPacket(new Packet8UpdateHealth(entityhuman.getHealth(), entityhuman.getFoodData().foodLevel, entityhuman.getFoodData().saturationLevel)); + ((EntityPlayer) entityhuman).playerConnection.sendPacket(new Packet8UpdateHealth(entityhuman.getHealth(), entityhuman.getFoodData().foodLevel, entityhuman.getFoodData().saturationLevel)); // CraftBukkit end world.makeSound(entityhuman, "random.burp", 0.5F, world.random.nextFloat() * 0.1F + 0.9F); @@ -45,22 +45,22 @@ public class ItemFood extends Item { } protected void c(ItemStack itemstack, World world, EntityHuman entityhuman) { - if (!world.isStatic && this.cn > 0 && world.random.nextFloat() < this.cq) { - entityhuman.addEffect(new MobEffect(this.cn, this.co * 20, this.cp)); + if (!world.isStatic && this.cq > 0 && world.random.nextFloat() < this.ct) { + entityhuman.addEffect(new MobEffect(this.cq, this.cr * 20, this.cs)); } } - public int a(ItemStack itemstack) { + public int c_(ItemStack itemstack) { return 32; } - public EnumAnimation d_(ItemStack itemstack) { + public EnumAnimation b_(ItemStack itemstack) { return EnumAnimation.b; } public ItemStack a(ItemStack itemstack, World world, EntityHuman entityhuman) { - if (entityhuman.f(this.cm)) { - entityhuman.a(itemstack, this.a(itemstack)); + if (entityhuman.g(this.cp)) { + entityhuman.a(itemstack, this.c_(itemstack)); } return itemstack; @@ -75,19 +75,19 @@ public class ItemFood extends Item { } public boolean i() { - return this.cl; + return this.co; } public ItemFood a(int i, int j, int k, float f) { - this.cn = i; - this.co = j; - this.cp = k; - this.cq = f; + this.cq = i; + this.cr = j; + this.cs = k; + this.ct = f; return this; } public ItemFood j() { - this.cm = true; + this.cp = true; return this; } } |