A few crash fixes
This commit is contained in:
parent
fe8cc9d1e0
commit
dc0a90921a
2 changed files with 7 additions and 2 deletions
|
@ -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());
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue