Custom Model Loader

This commit is contained in:
Sebastian Hartte
2020-06-01 04:02:37 +02:00
parent 077ff17078
commit 5cdeff01be
202 changed files with 942 additions and 1017 deletions
@@ -124,7 +124,7 @@ public class PartFluidStorageBus extends PartSharedStorageBus implements IMEMoni
IStorageMonitorable inventory = accessor.getInventory( this.source );
if( inventory != null )
{
return inventory.getInventory( AEApi.instance().storage().getStorageChannel( IFluidStorageChannel.class ) );
return inventory.getInventory( Api.INSTANCE.storage().getStorageChannel( IFluidStorageChannel.class ) );
}
// So this could / can be a design decision. If the tile does support our custom capability,
@@ -167,7 +167,7 @@ public class PartFluidStorageBus extends PartSharedStorageBus implements IMEMoni
this.resetCacheLogic = 0;
final IMEInventory<IAEFluidStack> in = this.getInternalHandler();
IItemList<IAEFluidStack> before = AEApi.instance().storage().getStorageChannel( IFluidStorageChannel.class ).createList();
IItemList<IAEFluidStack> before = Api.INSTANCE.storage().getStorageChannel( IFluidStorageChannel.class ).createList();
if( in != null )
{
before = in.getAvailableItems( before );
@@ -183,7 +183,7 @@ public class PartFluidStorageBus extends PartSharedStorageBus implements IMEMoni
if( in != out )
{
IItemList<IAEFluidStack> after = AEApi.instance().storage().getStorageChannel( IFluidStorageChannel.class ).createList();
IItemList<IAEFluidStack> after = Api.INSTANCE.storage().getStorageChannel( IFluidStorageChannel.class ).createList();
if( out != null )
{
after = out.getAvailableItems( after );
@@ -269,7 +269,7 @@ public class PartFluidStorageBus extends PartSharedStorageBus implements IMEMoni
{
this.getProxy()
.getStorage()
.postAlterationOfStoredItems( AEApi.instance().storage().getStorageChannel( IFluidStorageChannel.class ), change, this.source );
.postAlterationOfStoredItems( Api.INSTANCE.storage().getStorageChannel( IFluidStorageChannel.class ), change, this.source );
}
}
catch( final GridAccessException e )
@@ -313,13 +313,13 @@ public class PartFluidStorageBus extends PartSharedStorageBus implements IMEMoni
{
this.checkInterfaceVsStorageBus( target, this.getSide().getOpposite() );
this.handler = new MEInventoryHandler<>( inv, AEApi.instance().storage().getStorageChannel( IFluidStorageChannel.class ) );
this.handler = new MEInventoryHandler<>( inv, Api.INSTANCE.storage().getStorageChannel( IFluidStorageChannel.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.getPriority() );
final IItemList<IAEFluidStack> priorityList = AEApi.instance().storage().getStorageChannel( IFluidStorageChannel.class ).createList();
final IItemList<IAEFluidStack> priorityList = Api.INSTANCE.storage().getStorageChannel( IFluidStorageChannel.class ).createList();
final int slotsToUse = 18 + this.getInstalledUpgrades( Upgrades.CAPACITY ) * 9;
for( int x = 0; x < this.config.getSlots() && x < slotsToUse; x++ )
@@ -461,7 +461,7 @@ public class PartFluidStorageBus extends PartSharedStorageBus implements IMEMoni
@Override
public IStorageChannel getStorageChannel()
{
return AEApi.instance().storage().getStorageChannel( IFluidStorageChannel.class );
return Api.INSTANCE.storage().getStorageChannel( IFluidStorageChannel.class );
}
public IAEFluidTank getConfig()
@@ -490,7 +490,7 @@ public class PartFluidStorageBus extends PartSharedStorageBus implements IMEMoni
@Override
public ItemStack getItemStackRepresentation()
{
return AEApi.instance().definitions().parts().fluidStorageBus().maybeStack( 1 ).orElse( ItemStack.EMPTY );
return Api.INSTANCE.definitions().parts().fluidStorageBus().maybeStack( 1 ).orElse( ItemStack.EMPTY );
}
@Override