diff --git a/src/main/java/net/minecraft/server/TileEntityChest.java b/src/main/java/net/minecraft/server/TileEntityChest.java index 4e03b29599..0616be1828 100644 --- a/src/main/java/net/minecraft/server/TileEntityChest.java +++ b/src/main/java/net/minecraft/server/TileEntityChest.java @@ -159,7 +159,11 @@ public class TileEntityChest extends TileEntity implements IInventory { if (entity instanceof TileEntityChest) { return (TileEntityChest)entity; } else { - world.getServer().getLogger().severe("Block at " + x + "," + y + "," + z + " is a chest but has a " + entity.getClass().getName()); + String name = "null"; + if (entity != null) { + name = entity.toString(); + } + world.getServer().getLogger().severe("Block at " + x + "," + y + "," + z + " is a chest but has a " + name); return null; } }