public void updateEntity() {
TileEntity inpTile = worldObj.getBlockTileEntity(xCoord, yCoord, zCoord+1);
if ((inpTile != null) && (inpTile instanceof IInventory)){
IInventory inpInventory = (IInventory) inpTile;
if (inpInventory instanceof TileEntityChest)
{
int l = this.getWorldObj().getBlockId(xCoord, yCoord, zCoord+1);
Block block = Block.blocksList[l];
if (block instanceof BlockChest)
{
inpInventory = ((BlockChest)block).getInventory(this.getWorldObj(), xCoord, yCoord, zCoord+1);
}
}
for (int i=0; i<inpInventory.getSizeInventory();i++){
if (inpInventory.getStackInSlot(i)!=null){
ItemStack incomingStack = inpInventory.getStackInSlot(i);
//stub
}
}
}
}
But I can't really see what you would need to know why zCoord+1, since it has absolutely nothing to do with my problem.
PS: before you ask, yes, there is a chest at (xCoord, yCoord, zCoord + 1), and the tileentity returned by getBlockTileEntity is not null, it's a TileEntityChest instance.