Fixed Reactor Port not accepting items
This commit is contained in:
parent
0efbd28c8f
commit
c03c7e0f7a
2 changed files with 11 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -310,6 +310,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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue