Update CraftBukkit to Minecraft 1.5.1

This commit is contained in:
Travis Watkins
2013-03-20 15:09:23 -05:00
parent 6aaa1e83df
commit 696543cf3f
21 changed files with 307 additions and 231 deletions

View File

@@ -12,11 +12,14 @@ import org.bukkit.craftbukkit.entity.CraftHumanEntity;
public class TileEntityFurnace extends TileEntity implements IWorldInventory {
private static final int[] d = new int[] { 0};
private static final int[] e = new int[] { 2, 1};
private static final int[] f = new int[] { 1};
private ItemStack[] items = new ItemStack[3];
public int burnTime = 0;
public int ticksForCurrentFuel = 0;
public int cookTime = 0;
private String e;
private String h;
// CraftBukkit start
private int lastTick = (int) (System.currentTimeMillis() / 50);
@@ -94,15 +97,15 @@ public class TileEntityFurnace extends TileEntity implements IWorldInventory {
}
public String getName() {
return this.c() ? this.e : "container.furnace";
return this.c() ? this.h : "container.furnace";
}
public boolean c() {
return this.e != null && this.e.length() > 0;
return this.h != null && this.h.length() > 0;
}
public void a(String s) {
this.e = s;
this.h = s;
}
public void a(NBTTagCompound nbttagcompound) {
@@ -124,7 +127,7 @@ public class TileEntityFurnace extends TileEntity implements IWorldInventory {
this.cookTime = nbttagcompound.getShort("CookTime");
this.ticksForCurrentFuel = fuelTime(this.items[1]);
if (nbttagcompound.hasKey("CustomName")) {
this.e = nbttagcompound.getString("CustomName");
this.h = nbttagcompound.getString("CustomName");
}
}
@@ -146,7 +149,7 @@ public class TileEntityFurnace extends TileEntity implements IWorldInventory {
nbttagcompound.set("Items", nbttaglist);
if (this.c()) {
nbttagcompound.setString("CustomName", this.e);
nbttagcompound.setString("CustomName", this.h);
}
}
@@ -319,11 +322,15 @@ public class TileEntityFurnace extends TileEntity implements IWorldInventory {
return i == 2 ? false : (i == 1 ? isFuel(itemstack) : true);
}
public int c(int i) {
return i == 0 ? 2 : (i == 1 ? 0 : 1);
public int[] getSlotsForFace(int i) {
return i == 0 ? e : (i == 1 ? d : f);
}
public int d(int i) {
return 1;
public boolean canPlaceItemThroughFace(int i, ItemStack itemstack, int j) {
return this.b(i, itemstack);
}
public boolean canTakeItemThroughFace(int i, ItemStack itemstack, int j) {
return j != 0 || i != 1 || itemstack.id == Item.BUCKET.id;
}
}