A few crash fixes

This commit is contained in:
Aidan C. Brady 2015-04-01 09:06:23 -04:00
parent fe8cc9d1e0
commit dc0a90921a
2 changed files with 7 additions and 2 deletions

View file

@ -59,6 +59,11 @@ public class InventoryNetwork extends DynamicNetwork<IInventory, InventoryNetwor
for(Coord4D coord : possibleAcceptors.keySet())
{
if(coord == null)
{
continue;
}
EnumSet<ForgeDirection> sides = acceptorDirections.get(coord);
IInventory acceptor = (IInventory)coord.getTileEntity(getWorld());

View file

@ -79,13 +79,13 @@ public abstract class TileEntityContainerBlock extends TileEntityBasicBlock impl
@Override
public int getSizeInventory()
{
return inventory.length;
return inventory != null ? inventory.length : 0;
}
@Override
public ItemStack getStackInSlot(int slotID)
{
return inventory[slotID];
return inventory != null ? inventory[slotID] : null;
}
@Override