diff options
author | Erik Broes <erikbroes@grum.nl> | 2012-01-12 23:10:13 +0100 |
---|---|---|
committer | Erik Broes <erikbroes@grum.nl> | 2012-01-12 23:10:13 +0100 |
commit | 7219d4dd858b405f34ea66c67f8ab7d4c07fb4ee (patch) | |
tree | a1ca024b03aadf4b687f442b33bf713aecd511f7 /src/main/java/net/minecraft/server/ItemFood.java | |
parent | dd5ef8725c699e0b2946dc0f6d523ca482404043 (diff) | |
download | craftbukkit-7219d4dd858b405f34ea66c67f8ab7d4c07fb4ee.tar craftbukkit-7219d4dd858b405f34ea66c67f8ab7d4c07fb4ee.tar.gz craftbukkit-7219d4dd858b405f34ea66c67f8ab7d4c07fb4ee.tar.lz craftbukkit-7219d4dd858b405f34ea66c67f8ab7d4c07fb4ee.tar.xz craftbukkit-7219d4dd858b405f34ea66c67f8ab7d4c07fb4ee.zip |
Updated to Minecraft 1.1
Diffstat (limited to 'src/main/java/net/minecraft/server/ItemFood.java')
-rw-r--r-- | src/main/java/net/minecraft/server/ItemFood.java | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/src/main/java/net/minecraft/server/ItemFood.java b/src/main/java/net/minecraft/server/ItemFood.java index 755e13c8..c0dc28bc 100644 --- a/src/main/java/net/minecraft/server/ItemFood.java +++ b/src/main/java/net/minecraft/server/ItemFood.java @@ -6,20 +6,20 @@ public class ItemFood extends Item { public final int a; private final int b; - private final float bR; - private final boolean bS; - private boolean bT; - private int bU; + private final float bS; + private final boolean bT; + private boolean bU; private int bV; private int bW; - private float bX; + private int bX; + private float bY; public ItemFood(int i, int j, float f, boolean flag) { super(i); this.a = 32; this.b = j; - this.bS = flag; - this.bR = f; + this.bT = flag; + this.bS = f; } public ItemFood(int i, int j, boolean flag) { @@ -31,16 +31,16 @@ public class ItemFood extends Item { // CraftBukkit start int oldFoodLevel = entityhuman.getFoodData().foodLevel; - FoodLevelChangeEvent event = new FoodLevelChangeEvent(entityhuman.getBukkitEntity(), Math.min(this.n() + entityhuman.getFoodData().foodLevel, 20)); + FoodLevelChangeEvent event = new FoodLevelChangeEvent(entityhuman.getBukkitEntity(), Math.min(this.o() + entityhuman.getFoodData().foodLevel, 20)); entityhuman.world.getServer().getPluginManager().callEvent(event); if (!event.isCancelled()) { - entityhuman.getFoodData().a(event.getFoodLevel() - oldFoodLevel, this.o()); + entityhuman.getFoodData().a(event.getFoodLevel() - oldFoodLevel, this.p()); } // CraftBukkit end - if (!world.isStatic && this.bU > 0 && world.random.nextFloat() < this.bX) { - entityhuman.addEffect(new MobEffect(this.bU, this.bV * 20, this.bW)); + if (!world.isStatic && this.bV > 0 && world.random.nextFloat() < this.bY) { + entityhuman.addEffect(new MobEffect(this.bV, this.bW * 20, this.bX)); } return itemstack; @@ -55,35 +55,35 @@ public class ItemFood extends Item { } public ItemStack a(ItemStack itemstack, World world, EntityHuman entityhuman) { - if (entityhuman.b(this.bT)) { + if (entityhuman.b(this.bU)) { entityhuman.a(itemstack, this.c(itemstack)); } return itemstack; } - public int n() { + public int o() { return this.b; } - public float o() { - return this.bR; + public float p() { + return this.bS; } - public boolean p() { - return this.bS; + public boolean q() { + return this.bT; } public ItemFood a(int i, int j, int k, float f) { - this.bU = i; - this.bV = j; - this.bW = k; - this.bX = f; + this.bV = i; + this.bW = j; + this.bX = k; + this.bY = f; return this; } - public ItemFood q() { - this.bT = true; + public ItemFood r() { + this.bU = true; return this; } |