Revert using internal API
This commit is contained in:
@@ -78,7 +78,6 @@ import appeng.api.util.AECableType;
|
||||
import appeng.api.util.AEPartLocation;
|
||||
import appeng.api.util.IConfigManager;
|
||||
import appeng.capabilities.Capabilities;
|
||||
import appeng.core.Api;
|
||||
import appeng.core.AppEng;
|
||||
import appeng.core.settings.TickRates;
|
||||
|
||||
@@ -266,7 +265,7 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
|
||||
{
|
||||
this.getProxy()
|
||||
.getStorage()
|
||||
.postAlterationOfStoredItems( Api.INSTANCE.storage().getStorageChannel( IItemStorageChannel.class ), change,
|
||||
.postAlterationOfStoredItems( AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ), change,
|
||||
this.mySrc );
|
||||
}
|
||||
}
|
||||
@@ -354,7 +353,7 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
|
||||
this.resetCacheLogic = 0;
|
||||
|
||||
final IMEInventory<IAEItemStack> in = this.getInternalHandler();
|
||||
IItemList<IAEItemStack> before = Api.INSTANCE.storage().getStorageChannel( IItemStorageChannel.class ).createList();
|
||||
IItemList<IAEItemStack> before = AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ).createList();
|
||||
if( in != null )
|
||||
{
|
||||
before = in.getAvailableItems( before );
|
||||
@@ -370,7 +369,7 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
|
||||
|
||||
if( in != out )
|
||||
{
|
||||
IItemList<IAEItemStack> after = Api.INSTANCE.storage().getStorageChannel( IItemStorageChannel.class ).createList();
|
||||
IItemList<IAEItemStack> after = AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ).createList();
|
||||
if( out != null )
|
||||
{
|
||||
after = out.getAvailableItems( after );
|
||||
@@ -393,7 +392,7 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
|
||||
IStorageMonitorable inventory = accessor.getInventory( this.mySrc );
|
||||
if( inventory != null )
|
||||
{
|
||||
return inventory.getInventory( Api.INSTANCE.storage().getStorageChannel( IItemStorageChannel.class ) );
|
||||
return inventory.getInventory( AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ) );
|
||||
}
|
||||
|
||||
// So this could / can be a design decision. If the tile does support our custom capability,
|
||||
@@ -484,13 +483,13 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
|
||||
{
|
||||
this.checkInterfaceVsStorageBus( target, this.getSide().getOpposite() );
|
||||
|
||||
this.handler = new MEInventoryHandler<IAEItemStack>( inv, Api.INSTANCE.storage().getStorageChannel( IItemStorageChannel.class ) );
|
||||
this.handler = new MEInventoryHandler<IAEItemStack>( inv, AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ) );
|
||||
|
||||
this.handler.setBaseAccess( (AccessRestriction) this.getConfigManager().getSetting( Settings.ACCESS ) );
|
||||
this.handler.setWhitelist( this.getInstalledUpgrades( Upgrades.INVERTER ) > 0 ? IncludeExclude.BLACKLIST : IncludeExclude.WHITELIST );
|
||||
this.handler.setPriority( this.priority );
|
||||
|
||||
final IItemList<IAEItemStack> priorityList = Api.INSTANCE.storage().getStorageChannel( IItemStorageChannel.class ).createList();
|
||||
final IItemList<IAEItemStack> priorityList = AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ).createList();
|
||||
|
||||
final int slotsToUse = 18 + this.getInstalledUpgrades( Upgrades.CAPACITY ) * 9;
|
||||
for( int x = 0; x < this.Config.getSlots() && x < slotsToUse; x++ )
|
||||
@@ -583,7 +582,7 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
|
||||
@Override
|
||||
public List<IMEInventoryHandler> getCellArray( final IStorageChannel channel )
|
||||
{
|
||||
if( channel == Api.INSTANCE.storage().getStorageChannel( IItemStorageChannel.class ) )
|
||||
if( channel == AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ) )
|
||||
{
|
||||
final IMEInventoryHandler<IAEItemStack> out = this.getProxy().isActive() ? this.getInternalHandler() : null;
|
||||
if( out != null )
|
||||
@@ -648,7 +647,7 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
|
||||
@Override
|
||||
public ItemStack getItemStackRepresentation()
|
||||
{
|
||||
return Api.INSTANCE.definitions().parts().storageBus().maybeStack( 1 ).orElse( ItemStack.EMPTY );
|
||||
return AEApi.instance().definitions().parts().storageBus().maybeStack( 1 ).orElse( ItemStack.EMPTY );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user