Allow security hand shakes for monitorables.

This commit is contained in:
AlgorithmX2
2014-04-17 22:33:48 -05:00
parent cb81f34db3
commit a4eb01b191
11 changed files with 75 additions and 15 deletions
+25 -2
View File
@@ -158,10 +158,10 @@ public class DualityInterface implements IGridTickable, ISegmentedInventory, ISt
IAEItemStack req = config.getAEStackInSlot( slot );
if ( req != null && req.getStackSize() <= 0 )
{
config.setInventorySlotContents(slot, null);
config.setInventorySlotContents( slot, null );
req = null;
}
ItemStack Stored = storage.getStackInSlot( slot );
if ( req == null && Stored != null )
@@ -478,6 +478,29 @@ public class DualityInterface implements IGridTickable, ISegmentedInventory, ISt
{
// TODO Auto-generated method stub
}
public IStorageMonitorable getMonitorable(ForgeDirection side, BaseActionSource src, IStorageMonitorable myInterface)
{
if ( Platform.canAccess( gridProxy, src ) )
return myInterface;
final DualityInterface di = this;
return new IStorageMonitorable() {
@Override
public IMEMonitor<IAEItemStack> getItemInventory()
{
return new InterfaceInventory( di );
}
@Override
public IMEMonitor<IAEFluidStack> getFluidInventory()
{
return null;
}
};
};
}