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
@@ -128,10 +128,10 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
private final AppEngInternalAEInventory config = new AppEngInternalAEInventory( this, NUMBER_OF_CONFIG_SLOTS );
private final AppEngInternalInventory storage = new AppEngInternalInventory( this, NUMBER_OF_STORAGE_SLOTS );
private final AppEngInternalInventory patterns = new AppEngInternalInventory( this, NUMBER_OF_PATTERN_SLOTS );
private final MEMonitorPassThrough<IAEItemStack> items = new MEMonitorPassThrough<>( new NullInventory<IAEItemStack>(), AEApi.instance()
private final MEMonitorPassThrough<IAEItemStack> items = new MEMonitorPassThrough<>( new NullInventory<IAEItemStack>(), Api.INSTANCE
.storage()
.getStorageChannel( IItemStorageChannel.class ) );
private final MEMonitorPassThrough<IAEFluidStack> fluids = new MEMonitorPassThrough<>( new NullInventory<IAEFluidStack>(), AEApi.instance()
private final MEMonitorPassThrough<IAEFluidStack> fluids = new MEMonitorPassThrough<>( new NullInventory<IAEFluidStack>(), Api.INSTANCE
.storage()
.getStorageChannel( IFluidStorageChannel.class ) );
private final UpgradeInventory upgrades;
@@ -419,7 +419,7 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
if( req == null && !stored.isEmpty() )
{
final IAEItemStack work = AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ).createStack( stored );
final IAEItemStack work = Api.INSTANCE.storage().getStorageChannel( IItemStorageChannel.class ).createStack( stored );
this.requireWork[slot] = work.setStackSize( -work.getStackSize() );
return;
}
@@ -442,7 +442,7 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
else
// Stored != null; dispose!
{
final IAEItemStack work = AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ).createStack( stored );
final IAEItemStack work = Api.INSTANCE.storage().getStorageChannel( IItemStorageChannel.class ).createStack( stored );
this.requireWork[slot] = work.setStackSize( -work.getStackSize() );
return;
}
@@ -507,7 +507,7 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
@Override
public boolean canInsert( final ItemStack stack )
{
final IAEItemStack out = this.destination.injectItems( AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ).createStack( stack ),
final IAEItemStack out = this.destination.injectItems( Api.INSTANCE.storage().getStorageChannel( IItemStorageChannel.class ).createStack( stack ),
Actionable.SIMULATE, null );
if( out == null )
{
@@ -534,8 +534,8 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
{
try
{
this.items.setInternal( this.gridProxy.getStorage().getInventory( AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ) ) );
this.fluids.setInternal( this.gridProxy.getStorage().getInventory( AEApi.instance().storage().getStorageChannel( IFluidStorageChannel.class ) ) );
this.items.setInternal( this.gridProxy.getStorage().getInventory( Api.INSTANCE.storage().getStorageChannel( IItemStorageChannel.class ) ) );
this.fluids.setInternal( this.gridProxy.getStorage().getInventory( Api.INSTANCE.storage().getStorageChannel( IFluidStorageChannel.class ) ) );
}
catch( final GridAccessException gae )
{
@@ -663,7 +663,7 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
boolean changed = false;
try
{
this.destination = this.gridProxy.getStorage().getInventory( AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ) );
this.destination = this.gridProxy.getStorage().getInventory( Api.INSTANCE.storage().getStorageChannel( IItemStorageChannel.class ) );
final IEnergySource src = this.gridProxy.getEnergy();
if( this.craftingTracker.isBusy( x ) )
@@ -790,7 +790,7 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
@Override
public <T extends IAEStack<T>> IMEMonitor<T> getInventory( IStorageChannel<T> channel )
{
if( channel == AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ) )
if( channel == Api.INSTANCE.storage().getStorageChannel( IItemStorageChannel.class ) )
{
if( this.hasConfig() )
{
@@ -799,7 +799,7 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
return (IMEMonitor<T>) this.items;
}
else if( channel == AEApi.instance().storage().getStorageChannel( IFluidStorageChannel.class ) )
else if( channel == Api.INSTANCE.storage().getStorageChannel( IFluidStorageChannel.class ) )
{
if( this.hasConfig() )
{
@@ -884,7 +884,7 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
@Override
public <T extends IAEStack<T>> IMEMonitor<T> getInventory( IStorageChannel<T> channel )
{
if( channel == AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ) )
if( channel == Api.INSTANCE.storage().getStorageChannel( IItemStorageChannel.class ) )
{
return (IMEMonitor<T>) new InterfaceInventory( di );
}
@@ -61,7 +61,7 @@ public class MultiCraftingTracker
if( link != null && !link.isEmpty() )
{
this.setLink( x, AEApi.instance().storage().loadCraftingLink( link, this.owner ) );
this.setLink( x, Api.INSTANCE.storage().loadCraftingLink( link, this.owner ) );
}
}
}
@@ -104,7 +104,7 @@ public class PatternHelper implements ICraftingPatternDetails, Comparable<Patter
this.markItemAs( x, gs, TestStatus.ACCEPT );
}
in.add( AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ).createStack( gs ) );
in.add( Api.INSTANCE.storage().getStorageChannel( IItemStorageChannel.class ).createStack( gs ) );
this.testFrame.setInventorySlotContents( x, gs );
}
@@ -115,7 +115,7 @@ public class PatternHelper implements ICraftingPatternDetails, Comparable<Patter
if( this.standardRecipe != null )
{
this.correctOutput = this.standardRecipe.getCraftingResult( this.crafting );
out.add( AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ).createStack( this.correctOutput ) );
out.add( Api.INSTANCE.storage().getStorageChannel( IItemStorageChannel.class ).createStack( this.correctOutput ) );
}
else
{
@@ -139,7 +139,7 @@ public class PatternHelper implements ICraftingPatternDetails, Comparable<Patter
if( !gs.isEmpty() )
{
out.add( AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ).createStack( gs ) );
out.add( Api.INSTANCE.storage().getStorageChannel( IItemStorageChannel.class ).createStack( gs ) );
}
}
}
@@ -78,7 +78,7 @@ public class WirelessTerminalGuiObject implements IPortableCell, IActionHost, II
try
{
final long encKey = Long.parseLong( this.encryptionKey );
obj = AEApi.instance().registries().locatable().getLocatableBy( encKey );
obj = Api.INSTANCE.registries().locatable().getLocatableBy( encKey );
}
catch( final NumberFormatException err )
{
@@ -96,7 +96,7 @@ public class WirelessTerminalGuiObject implements IPortableCell, IActionHost, II
this.sg = this.targetGrid.getCache( IStorageGrid.class );
if( this.sg != null )
{
this.itemStorage = this.sg.getInventory( AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ) );
this.itemStorage = this.sg.getInventory( Api.INSTANCE.storage().getStorageChannel( IItemStorageChannel.class ) );
}
}
}
@@ -235,7 +235,7 @@ public class WirelessTerminalGuiObject implements IPortableCell, IActionHost, II
{
return this.itemStorage.getChannel();
}
return AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class );
return Api.INSTANCE.storage().getStorageChannel( IItemStorageChannel.class );
}
@Override