API Update.
This commit is contained in:
parent
d5cfa12f76
commit
1b207a17e9
7 changed files with 11 additions and 10 deletions
|
@ -5,6 +5,7 @@ import java.util.List;
|
|||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import appeng.api.networking.security.BaseActionSource;
|
||||
import appeng.api.storage.IExternalStorageHandler;
|
||||
import appeng.api.storage.IExternalStorageRegistry;
|
||||
import appeng.api.storage.StorageChannel;
|
||||
|
@ -21,15 +22,15 @@ public class ExternalStorageRegistry implements IExternalStorageRegistry
|
|||
}
|
||||
|
||||
@Override
|
||||
public IExternalStorageHandler getHandler(TileEntity te, ForgeDirection d, StorageChannel chan)
|
||||
public IExternalStorageHandler getHandler(TileEntity te, ForgeDirection d, StorageChannel chan, BaseActionSource mySrc)
|
||||
{
|
||||
for (IExternalStorageHandler x : Handlers)
|
||||
{
|
||||
if ( x.canHandle( te, d, chan ) )
|
||||
if ( x.canHandle( te, d, chan, mySrc ) )
|
||||
return x;
|
||||
}
|
||||
|
||||
if ( lastHandler.canHandle( te, d, chan ) )
|
||||
if ( lastHandler.canHandle( te, d, chan, mySrc ) )
|
||||
return lastHandler;
|
||||
|
||||
return null;
|
||||
|
|
|
@ -14,7 +14,7 @@ public class ExternalIInv implements IExternalStorageHandler
|
|||
{
|
||||
|
||||
@Override
|
||||
public boolean canHandle(TileEntity te, ForgeDirection d, StorageChannel channel)
|
||||
public boolean canHandle(TileEntity te, ForgeDirection d, StorageChannel channel, BaseActionSource mySrc)
|
||||
{
|
||||
return channel == StorageChannel.ITEMS && te instanceof IInventory;
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ public class BCPipeHandler implements IExternalStorageHandler
|
|||
{
|
||||
|
||||
@Override
|
||||
public boolean canHandle(TileEntity te, ForgeDirection d, StorageChannel chan)
|
||||
public boolean canHandle(TileEntity te, ForgeDirection d, StorageChannel chan, BaseActionSource mySrc)
|
||||
{
|
||||
return chan == StorageChannel.ITEMS && BC.instance.isPipe( te, d );
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ public class FactorizationHandler implements IExternalStorageHandler
|
|||
{
|
||||
|
||||
@Override
|
||||
public boolean canHandle(TileEntity te, ForgeDirection d, StorageChannel chan)
|
||||
public boolean canHandle(TileEntity te, ForgeDirection d, StorageChannel chan, BaseActionSource mySrc)
|
||||
{
|
||||
return chan == StorageChannel.ITEMS && FZ.instance.isBarrel( te );
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ public class MFRDSUHandler implements IExternalStorageHandler
|
|||
{
|
||||
|
||||
@Override
|
||||
public boolean canHandle(TileEntity te, ForgeDirection d, StorageChannel chan)
|
||||
public boolean canHandle(TileEntity te, ForgeDirection d, StorageChannel chan, BaseActionSource mySrc)
|
||||
{
|
||||
return chan == StorageChannel.ITEMS && DSU.instance.isDSU( te );
|
||||
}
|
||||
|
|
|
@ -16,10 +16,10 @@ public class AEExternalHandler implements IExternalStorageHandler
|
|||
{
|
||||
|
||||
@Override
|
||||
public boolean canHandle(TileEntity te, ForgeDirection d, StorageChannel channel)
|
||||
public boolean canHandle(TileEntity te, ForgeDirection d, StorageChannel channel, BaseActionSource mySrc)
|
||||
{
|
||||
if ( channel == StorageChannel.ITEMS && te instanceof ITileStorageMonitorable )
|
||||
return true;
|
||||
return ((ITileStorageMonitorable) te).getMonitorable( d, mySrc ) != null;
|
||||
|
||||
return te instanceof TileCondenser;
|
||||
}
|
||||
|
|
|
@ -241,7 +241,7 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
|
|||
monitor = null;
|
||||
if ( target != null )
|
||||
{
|
||||
IExternalStorageHandler esh = AEApi.instance().registries().externalStorage().getHandler( target, side.getOpposite(), StorageChannel.ITEMS );
|
||||
IExternalStorageHandler esh = AEApi.instance().registries().externalStorage().getHandler( target, side.getOpposite(), StorageChannel.ITEMS, mySrc );
|
||||
if ( esh != null )
|
||||
{
|
||||
IMEInventory inv = esh.getInventory( target, side.getOpposite(), StorageChannel.ITEMS, mySrc );
|
||||
|
|
Loading…
Reference in a new issue