diff options
author | Travis Watkins <amaranth@ubuntu.com> | 2013-03-20 15:09:23 -0500 |
---|---|---|
committer | Travis Watkins <amaranth@ubuntu.com> | 2013-03-20 15:09:23 -0500 |
commit | 696543cf3f43756dfc2d4c1d18b2b461badcb107 (patch) | |
tree | c01929bbcf4f052df46c267226c529869042ad78 /src/main/java/net/minecraft/server/TileEntityBrewingStand.java | |
parent | 6aaa1e83df796b7d380a22af3842f3aa4b367f4d (diff) | |
download | craftbukkit-696543cf3f43756dfc2d4c1d18b2b461badcb107.tar craftbukkit-696543cf3f43756dfc2d4c1d18b2b461badcb107.tar.gz craftbukkit-696543cf3f43756dfc2d4c1d18b2b461badcb107.tar.lz craftbukkit-696543cf3f43756dfc2d4c1d18b2b461badcb107.tar.xz craftbukkit-696543cf3f43756dfc2d4c1d18b2b461badcb107.zip |
Update CraftBukkit to Minecraft 1.5.1
Diffstat (limited to 'src/main/java/net/minecraft/server/TileEntityBrewingStand.java')
-rw-r--r-- | src/main/java/net/minecraft/server/TileEntityBrewingStand.java | 42 |
1 files changed, 24 insertions, 18 deletions
diff --git a/src/main/java/net/minecraft/server/TileEntityBrewingStand.java b/src/main/java/net/minecraft/server/TileEntityBrewingStand.java index 8d77f12d..88039bc3 100644 --- a/src/main/java/net/minecraft/server/TileEntityBrewingStand.java +++ b/src/main/java/net/minecraft/server/TileEntityBrewingStand.java @@ -10,11 +10,13 @@ import org.bukkit.event.inventory.BrewEvent; public class TileEntityBrewingStand extends TileEntity implements IWorldInventory { - public ItemStack[] items = new ItemStack[4]; // CraftBukkit private -> public - public int brewTime; // CraftBukkit private -> public - private int c; - private int d; - private String e; + private static final int[] a = new int[] { 3}; + private static final int[] b = new int[] { 0, 1, 2}; + public ItemStack[] items = new ItemStack[4]; // CraftBukkit - private -> public + public int brewTime; // CraftBukkit - private -> public + private int e; + private int f; + private String g; public TileEntityBrewingStand() {} @@ -44,15 +46,15 @@ public class TileEntityBrewingStand extends TileEntity implements IWorldInventor // CraftBukkit end public String getName() { - return this.c() ? this.e : "container.brewing"; + return this.c() ? this.g : "container.brewing"; } public boolean c() { - return this.e != null && this.e.length() > 0; + return this.g != null && this.g.length() > 0; } public void a(String s) { - this.e = s; + this.g = s; } public int getSize() { @@ -68,19 +70,19 @@ public class TileEntityBrewingStand extends TileEntity implements IWorldInventor } else if (!this.l()) { this.brewTime = 0; this.update(); - } else if (this.d != this.items[3].id) { + } else if (this.f != this.items[3].id) { this.brewTime = 0; this.update(); } } else if (this.l()) { this.brewTime = 400; - this.d = this.items[3].id; + this.f = this.items[3].id; } int i = this.j(); - if (i != this.c) { - this.c = i; + if (i != this.e) { + this.e = i; this.world.setData(this.x, this.y, this.z, i, 2); } @@ -190,7 +192,7 @@ public class TileEntityBrewingStand extends TileEntity implements IWorldInventor this.brewTime = nbttagcompound.getShort("BrewTime"); if (nbttagcompound.hasKey("CustomName")) { - this.e = nbttagcompound.getString("CustomName"); + this.g = nbttagcompound.getString("CustomName"); } } @@ -211,7 +213,7 @@ public class TileEntityBrewingStand extends TileEntity implements IWorldInventor nbttagcompound.set("Items", nbttaglist); if (this.c()) { - nbttagcompound.setString("CustomName", this.e); + nbttagcompound.setString("CustomName", this.g); } } @@ -275,11 +277,15 @@ public class TileEntityBrewingStand extends TileEntity implements IWorldInventor return i; } - public int c(int i) { - return i == 1 ? 3 : 0; + public int[] getSlotsForFace(int i) { + return i == 1 ? a : b; } - public int d(int i) { - return i == 1 ? 1 : 3; + public boolean canPlaceItemThroughFace(int i, ItemStack itemstack, int j) { + return this.b(i, itemstack); + } + + public boolean canTakeItemThroughFace(int i, ItemStack itemstack, int j) { + return true; } } |