summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server/TileEntityChest.java
diff options
context:
space:
mode:
authorTahg <tahgtahv@gmail.com>2011-09-21 08:38:41 -0400
committerTahg <tahgtahv@gmail.com>2011-09-21 08:38:41 -0400
commit751ab82be07aec65151d7a0a76b90d8fc12974f6 (patch)
tree714baee2cc7f4932e59a9a8be90c7bed0d63fb9f /src/main/java/net/minecraft/server/TileEntityChest.java
parentf6ab0f8611b14fa1ac426ac416719a07d4a7b4bd (diff)
downloadcraftbukkit-751ab82be07aec65151d7a0a76b90d8fc12974f6.tar
craftbukkit-751ab82be07aec65151d7a0a76b90d8fc12974f6.tar.gz
craftbukkit-751ab82be07aec65151d7a0a76b90d8fc12974f6.tar.lz
craftbukkit-751ab82be07aec65151d7a0a76b90d8fc12974f6.tar.xz
craftbukkit-751ab82be07aec65151d7a0a76b90d8fc12974f6.zip
stopgap build - mostly stable
Diffstat (limited to 'src/main/java/net/minecraft/server/TileEntityChest.java')
-rw-r--r--src/main/java/net/minecraft/server/TileEntityChest.java31
1 files changed, 18 insertions, 13 deletions
diff --git a/src/main/java/net/minecraft/server/TileEntityChest.java b/src/main/java/net/minecraft/server/TileEntityChest.java
index ba09f8e7..bf16c5c2 100644
--- a/src/main/java/net/minecraft/server/TileEntityChest.java
+++ b/src/main/java/net/minecraft/server/TileEntityChest.java
@@ -114,37 +114,42 @@ public class TileEntityChest extends TileEntity implements IInventory {
public void h() {
if (!this.a) {
- // CraftBukkit start
- if (this.world == null) return; // CraftBukkit
- TileEntityChest otherChest = null;
- BlockChest chest = (BlockChest) Block.byId[Block.CHEST.id];
- chest.b(this.world, this.x, this.y, this.z);
this.a = true;
this.b = null;
this.c = null;
this.d = null;
this.e = null;
if (this.world.getTypeId(this.x - 1, this.y, this.z) == Block.CHEST.id) {
- otherChest = this.d = getTileEntity(this.x - 1, this.y, this.z); // CraftBukkit
+ this.d = (TileEntityChest) this.world.getTileEntity(this.x - 1, this.y, this.z);
}
if (this.world.getTypeId(this.x + 1, this.y, this.z) == Block.CHEST.id) {
- otherChest = this.c = getTileEntity(this.x + 1, this.y, this.z); // CraftBukkit
+ this.c = (TileEntityChest) this.world.getTileEntity(this.x + 1, this.y, this.z);
}
if (this.world.getTypeId(this.x, this.y, this.z - 1) == Block.CHEST.id) {
- otherChest = this.b = getTileEntity(this.x, this.y, this.z - 1); // CraftBukkit
+ this.b = (TileEntityChest) this.world.getTileEntity(this.x, this.y, this.z - 1);
}
if (this.world.getTypeId(this.x, this.y, this.z + 1) == Block.CHEST.id) {
- otherChest = this.e = getTileEntity(this.x, this.y, this.z + 1); // CraftBukkit
+ this.e = (TileEntityChest) this.world.getTileEntity(this.x, this.y, this.z + 1);
}
- if (otherChest != null) {
- otherChest.g();
- chest.b(otherChest.world, otherChest.x, otherChest.y, otherChest.z);
+ if (this.b != null) {
+ this.b.g();
+ }
+
+ if (this.e != null) {
+ this.e.g();
+ }
+
+ if (this.c != null) {
+ this.c.g();
+ }
+
+ if (this.d != null) {
+ this.d.g();
}
- // CraftBukkit end
}
}