Updated to Minecraft 1.1

This commit is contained in:
Erik Broes
2012-01-12 23:10:13 +01:00
parent dd5ef8725c
commit 7219d4dd85
82 changed files with 1472 additions and 1687 deletions

View File

@@ -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 boolean p() {
public float 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;
}