Fixed Reactor Port not accepting items

This commit is contained in:
aidancbrady 2016-01-13 16:21:08 -05:00
parent 0efbd28c8f
commit c03c7e0f7a
2 changed files with 11 additions and 0 deletions

View file

@ -55,19 +55,24 @@ public final class TransporterUtils
public static boolean isValidAcceptorOnSide(TileEntity tile, ForgeDirection side)
{
if(tile instanceof ITransmitterTile || !(tile instanceof IInventory))
{
return false;
}
IInventory inventory = (IInventory)tile;
if(inventory.getSizeInventory() > 0)
{
if(!(inventory instanceof ISidedInventory))
{
return true;
}
int[] slots = ((ISidedInventory)inventory).getAccessibleSlotsFromSide(side.getOpposite().ordinal());
return (slots != null && slots.length > 0);
}
return false;
}

View file

@ -309,6 +309,12 @@ public class TileEntityReactorPort extends TileEntityReactorBlock implements IFl
{
return getReactor() != null && getReactor().isFormed() ? getReactor().getInventory()[slotID] : null;
}
@Override
public int getSizeInventory()
{
return getReactor() != null && getReactor().isFormed() ? 1 : 0;
}
@Override
public void setInventorySlotContents(int slotID, ItemStack itemstack)