summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server/TileEntityBrewingStand.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/net/minecraft/server/TileEntityBrewingStand.java')
-rw-r--r--src/main/java/net/minecraft/server/TileEntityBrewingStand.java42
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;
}
}