Custom Model Loader
This commit is contained in:
@@ -225,11 +225,11 @@ public class ContainerCellWorkbench extends ContainerUpgradeable
|
||||
final IItemHandler inv = this.getUpgradeable().getInventoryByName( "config" );
|
||||
|
||||
final ItemStack is = this.getUpgradeable().getInventoryByName( "cell" ).getStackInSlot( 0 );
|
||||
final IStorageChannel channel = is.getItem() instanceof IStorageCell ? ( (IStorageCell) is.getItem() ).getChannel() : AEApi.instance()
|
||||
final IStorageChannel channel = is.getItem() instanceof IStorageCell ? ( (IStorageCell) is.getItem() ).getChannel() : Api.INSTANCE
|
||||
.storage()
|
||||
.getStorageChannel( IItemStorageChannel.class );
|
||||
|
||||
final IMEInventory cellInv = AEApi.instance().registries().cell().getCellInventory( is, null, channel );
|
||||
final IMEInventory cellInv = Api.INSTANCE.registries().cell().getCellInventory( is, null, channel );
|
||||
|
||||
Iterator<IAEStack> i = new NullIterator<>();
|
||||
if( cellInv != null )
|
||||
|
||||
@@ -209,7 +209,7 @@ public class ContainerCraftConfirm extends AEBaseContainer
|
||||
final PacketMEInventoryUpdate b = new PacketMEInventoryUpdate( (byte) 1 );
|
||||
final PacketMEInventoryUpdate c = this.result.isSimulation() ? new PacketMEInventoryUpdate( (byte) 2 ) : null;
|
||||
|
||||
final IItemList<IAEItemStack> plan = AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ).createList();
|
||||
final IItemList<IAEItemStack> plan = Api.INSTANCE.storage().getStorageChannel( IItemStorageChannel.class ).createList();
|
||||
this.result.populatePlan( plan );
|
||||
|
||||
this.setUsedBytes( this.result.getByteTotal() );
|
||||
@@ -226,7 +226,7 @@ public class ContainerCraftConfirm extends AEBaseContainer
|
||||
p.setStackSize( out.getCountRequestable() );
|
||||
|
||||
final IStorageGrid sg = this.getGrid().getCache( IStorageGrid.class );
|
||||
final IMEInventory<IAEItemStack> items = sg.getInventory( AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ) );
|
||||
final IMEInventory<IAEItemStack> items = sg.getInventory( Api.INSTANCE.storage().getStorageChannel( IItemStorageChannel.class ) );
|
||||
|
||||
IAEItemStack m = null;
|
||||
if( c != null && this.result.isSimulation() )
|
||||
|
||||
@@ -53,7 +53,7 @@ import appeng.util.Platform;
|
||||
public class ContainerCraftingCPU extends AEBaseContainer implements IMEMonitorHandlerReceiver<IAEItemStack>, ICustomNameObject
|
||||
{
|
||||
|
||||
private final IItemList<IAEItemStack> list = AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ).createList();
|
||||
private final IItemList<IAEItemStack> list = Api.INSTANCE.storage().getStorageChannel( IItemStorageChannel.class ).createList();
|
||||
private IGrid network;
|
||||
private CraftingCPUCluster monitor = null;
|
||||
private String cpuName = null;
|
||||
|
||||
@@ -120,14 +120,14 @@ public class ContainerInscriber extends ContainerUpgradeable implements IProgres
|
||||
|
||||
if( s == this.middle )
|
||||
{
|
||||
IItemDefinition press = AEApi.instance().definitions().materials().namePress();
|
||||
IItemDefinition press = Api.INSTANCE.definitions().materials().namePress();
|
||||
if( press.isSameAs( top ) || press.isSameAs( bot ) )
|
||||
{
|
||||
return !press.isSameAs( is );
|
||||
}
|
||||
|
||||
boolean matches = false;
|
||||
for( final IInscriberRecipe recipe : AEApi.instance().registries().inscriber().getRecipes() )
|
||||
for( final IInscriberRecipe recipe : Api.INSTANCE.registries().inscriber().getRecipes() )
|
||||
{
|
||||
final boolean matchA = !top
|
||||
.isEmpty() && ( Platform.itemComparisons().isSameItem( top, recipe.getTopOptional().orElse( ItemStack.EMPTY ) ) || Platform
|
||||
@@ -168,14 +168,14 @@ public class ContainerInscriber extends ContainerUpgradeable implements IProgres
|
||||
}
|
||||
|
||||
// name presses
|
||||
final IItemDefinition namePress = AEApi.instance().definitions().materials().namePress();
|
||||
final IItemDefinition namePress = Api.INSTANCE.definitions().materials().namePress();
|
||||
if( namePress.isSameAs( otherSlot ) )
|
||||
{
|
||||
return namePress.isSameAs( is );
|
||||
}
|
||||
|
||||
// everything else
|
||||
for( final IInscriberRecipe recipe : AEApi.instance().registries().inscriber().getRecipes() )
|
||||
for( final IInscriberRecipe recipe : Api.INSTANCE.registries().inscriber().getRecipes() )
|
||||
{
|
||||
boolean isValid = false;
|
||||
if( Platform.itemComparisons().isSameItem( otherSlot, recipe.getTopOptional().orElse( ItemStack.EMPTY ) ) )
|
||||
|
||||
@@ -78,7 +78,7 @@ public class ContainerMEMonitorable extends AEBaseContainer implements IConfigMa
|
||||
|
||||
private final SlotRestrictedInput[] cellView = new SlotRestrictedInput[5];
|
||||
private final IMEMonitor<IAEItemStack> monitor;
|
||||
private final IItemList<IAEItemStack> items = AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ).createList();
|
||||
private final IItemList<IAEItemStack> items = Api.INSTANCE.storage().getStorageChannel( IItemStorageChannel.class ).createList();
|
||||
private final IConfigManager clientCM;
|
||||
private final ITerminalHost host;
|
||||
@GuiSync( 99 )
|
||||
@@ -109,7 +109,7 @@ public class ContainerMEMonitorable extends AEBaseContainer implements IConfigMa
|
||||
{
|
||||
this.serverCM = monitorable.getConfigManager();
|
||||
|
||||
this.monitor = monitorable.getInventory( AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ) );
|
||||
this.monitor = monitorable.getInventory( Api.INSTANCE.storage().getStorageChannel( IItemStorageChannel.class ) );
|
||||
if( this.monitor != null )
|
||||
{
|
||||
this.monitor.addListener( this, null );
|
||||
@@ -189,7 +189,7 @@ public class ContainerMEMonitorable extends AEBaseContainer implements IConfigMa
|
||||
{
|
||||
if( Platform.isServer() )
|
||||
{
|
||||
if( this.monitor != this.host.getInventory( AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ) ) )
|
||||
if( this.monitor != this.host.getInventory( Api.INSTANCE.storage().getStorageChannel( IItemStorageChannel.class ) ) )
|
||||
{
|
||||
this.setValidContainer( false );
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ public class ContainerNetworkStatus extends AEBaseContainer
|
||||
|
||||
for( final Class<? extends IGridHost> machineClass : this.network.getMachinesClasses() )
|
||||
{
|
||||
final IItemList<IAEItemStack> list = AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ).createList();
|
||||
final IItemList<IAEItemStack> list = Api.INSTANCE.storage().getStorageChannel( IItemStorageChannel.class ).createList();
|
||||
for( final IGridNode machine : this.network.getMachines( machineClass ) )
|
||||
{
|
||||
final IGridBlock blk = machine.getGridBlock();
|
||||
|
||||
@@ -237,7 +237,7 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
|
||||
}
|
||||
|
||||
// add a new encoded pattern.
|
||||
Optional<ItemStack> maybePattern = AEApi.instance().definitions().items().encodedPattern().maybeStack( 1 );
|
||||
Optional<ItemStack> maybePattern = Api.INSTANCE.definitions().items().encodedPattern().maybeStack( 1 );
|
||||
if( maybePattern.isPresent() )
|
||||
{
|
||||
output = maybePattern.get();
|
||||
@@ -334,7 +334,7 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
|
||||
return false;
|
||||
}
|
||||
|
||||
final IDefinitions definitions = AEApi.instance().definitions();
|
||||
final IDefinitions definitions = Api.INSTANCE.definitions();
|
||||
|
||||
boolean isPattern = definitions.items().encodedPattern().isSameAs( output );
|
||||
isPattern |= definitions.materials().blankPattern().isSameAs( output );
|
||||
@@ -419,7 +419,7 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
|
||||
}
|
||||
|
||||
final IMEMonitor<IAEItemStack> storage = this.getPatternTerminal()
|
||||
.getInventory( AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ) );
|
||||
.getInventory( Api.INSTANCE.storage().getStorageChannel( IItemStorageChannel.class ) );
|
||||
final IItemList<IAEItemStack> all = storage.getStorageList();
|
||||
|
||||
final ItemStack is = r.getCraftingResult( ic );
|
||||
|
||||
@@ -121,7 +121,7 @@ public class ContainerQuartzKnife extends AEBaseContainer
|
||||
{
|
||||
if( ContainerQuartzKnife.this.myName.length() > 0 )
|
||||
{
|
||||
return AEApi.instance().definitions().materials().namePress().maybeStack( 1 ).map( namePressStack ->
|
||||
return Api.INSTANCE.definitions().materials().namePress().maybeStack( 1 ).map( namePressStack ->
|
||||
{
|
||||
final CompoundNBT compound = namePressStack.getOrCreateTag();
|
||||
compound.putString("InscribeName", ContainerQuartzKnife.this.myName);
|
||||
|
||||
@@ -156,7 +156,7 @@ public class ContainerSecurityStation extends ContainerMEMonitorable implements
|
||||
networkEncodable = (INetworkEncodable) term.getItem();
|
||||
}
|
||||
|
||||
final IWirelessTermHandler wTermHandler = AEApi.instance().registries().wireless().getWirelessTerminalHandler( term );
|
||||
final IWirelessTermHandler wTermHandler = Api.INSTANCE.registries().wireless().getWirelessTerminalHandler( term );
|
||||
if( wTermHandler != null )
|
||||
{
|
||||
networkEncodable = wTermHandler;
|
||||
|
||||
@@ -159,7 +159,7 @@ public class ContainerStorageBus extends ContainerUpgradeable
|
||||
if( cellInv != null )
|
||||
{
|
||||
final IItemList<IAEItemStack> list = cellInv
|
||||
.getAvailableItems( AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ).createList() );
|
||||
.getAvailableItems( Api.INSTANCE.storage().getStorageChannel( IItemStorageChannel.class ).createList() );
|
||||
i = list.iterator();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user