summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server/TileEntityChest.java
diff options
context:
space:
mode:
authorNate Mortensen <nate.richard.mortensen@gmail.com>2014-03-20 22:26:30 -0600
committerEvilSeph <evilseph@gmail.com>2014-03-21 23:56:34 -0400
commit385ace970ee7b7912419d601b8a0867c4c2794df (patch)
tree2549da069930b488940f8a99833c396ffc7e36d1 /src/main/java/net/minecraft/server/TileEntityChest.java
parentafb3511a4a5a63007217f2dbbbbc753f3bee0aed (diff)
downloadcraftbukkit-385ace970ee7b7912419d601b8a0867c4c2794df.tar
craftbukkit-385ace970ee7b7912419d601b8a0867c4c2794df.tar.gz
craftbukkit-385ace970ee7b7912419d601b8a0867c4c2794df.tar.lz
craftbukkit-385ace970ee7b7912419d601b8a0867c4c2794df.tar.xz
craftbukkit-385ace970ee7b7912419d601b8a0867c4c2794df.zip
Update CraftBukkit to Minecraft 1.7.5
Diffstat (limited to 'src/main/java/net/minecraft/server/TileEntityChest.java')
-rw-r--r--src/main/java/net/minecraft/server/TileEntityChest.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/main/java/net/minecraft/server/TileEntityChest.java b/src/main/java/net/minecraft/server/TileEntityChest.java
index 51336f7b..4f45dba3 100644
--- a/src/main/java/net/minecraft/server/TileEntityChest.java
+++ b/src/main/java/net/minecraft/server/TileEntityChest.java
@@ -25,7 +25,7 @@ public class TileEntityChest extends TileEntity implements IInventory {
public TileEntityChest() {}
- // CraftBukkit start
+ // CraftBukkit start - add fields and methods
public List<HumanEntity> transaction = new java.util.ArrayList<HumanEntity>();
private int maxStack = MAX_STACK;
@@ -239,9 +239,13 @@ public class TileEntityChest extends TileEntity implements IInventory {
}
private boolean a(int i, int j, int k) {
- Block block = this.world.getType(i, j, k);
+ if (this.world == null) {
+ return false;
+ } else {
+ Block block = this.world.getType(i, j, k);
- return block instanceof BlockChest && ((BlockChest) block).a == this.j();
+ return block instanceof BlockChest && ((BlockChest) block).a == this.j();
+ }
}
public void h() {
@@ -254,7 +258,7 @@ public class TileEntityChest extends TileEntity implements IInventory {
if (!this.world.isStatic && this.o != 0 && (this.ticks + this.x + this.y + this.z) % 200 == 0) {
this.o = 0;
f = 5.0F;
- List list = this.world.a(EntityHuman.class, AxisAlignedBB.a().a((double) ((float) this.x - f), (double) ((float) this.y - f), (double) ((float) this.z - f), (double) ((float) (this.x + 1) + f), (double) ((float) (this.y + 1) + f), (double) ((float) (this.z + 1) + f)));
+ List list = this.world.a(EntityHuman.class, AxisAlignedBB.a((double) ((float) this.x - f), (double) ((float) this.y - f), (double) ((float) this.z - f), (double) ((float) (this.x + 1) + f), (double) ((float) (this.y + 1) + f), (double) ((float) (this.z + 1) + f)));
Iterator iterator = list.iterator();
while (iterator.hasNext()) {