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
@@ -38,7 +38,7 @@ import appeng.util.item.AEItemStack;
public class CreativeCellInventory implements IMEInventoryHandler<IAEItemStack>
{
private final IItemList<IAEItemStack> itemListCache = AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ).createList();
private final IItemList<IAEItemStack> itemListCache = Api.INSTANCE.storage().getStorageChannel( IItemStorageChannel.class ).createList();
protected CreativeCellInventory( final ItemStack o )
{
@@ -56,7 +56,7 @@ public class CreativeCellInventory implements IMEInventoryHandler<IAEItemStack>
public static ICellInventoryHandler getCell( final ItemStack o )
{
return new BasicCellInventoryHandler( new CreativeCellInventory( o ), AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ) );
return new BasicCellInventoryHandler( new CreativeCellInventory( o ), Api.INSTANCE.storage().getStorageChannel( IItemStorageChannel.class ) );
}
@Override
@@ -96,7 +96,7 @@ public class CreativeCellInventory implements IMEInventoryHandler<IAEItemStack>
@Override
public IStorageChannel getChannel()
{
return AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class );
return Api.INSTANCE.storage().getStorageChannel( IItemStorageChannel.class );
}
@Override
@@ -48,7 +48,7 @@ import appeng.api.storage.data.IItemList;
public class MEMonitorIFluidHandler implements IMEMonitor<IAEFluidStack>, ITickingMonitor
{
private final IFluidHandler handler;
private final IItemList<IAEFluidStack> list = AEApi.instance().storage().getStorageChannel( IFluidStorageChannel.class ).createList();
private final IItemList<IAEFluidStack> list = Api.INSTANCE.storage().getStorageChannel( IFluidStorageChannel.class ).createList();
private final HashMap<IMEMonitorHandlerReceiver<IAEFluidStack>, Object> listeners = new HashMap<>();
private final NavigableMap<Integer, CachedFluidStack> memory;
private IActionSource mySource;
@@ -120,7 +120,7 @@ public class MEMonitorIFluidHandler implements IMEMonitor<IAEFluidStack>, ITicki
@Override
public IStorageChannel getChannel()
{
return AEApi.instance().storage().getStorageChannel( IFluidStorageChannel.class );
return Api.INSTANCE.storage().getStorageChannel( IFluidStorageChannel.class );
}
@Override
@@ -169,7 +169,7 @@ public class MEMonitorIFluidHandler implements IMEMonitor<IAEFluidStack>, ITicki
if( newIS != null )
{
stack = ( old == null || old.aeStack == null ? AEApi.instance()
stack = ( old == null || old.aeStack == null ? Api.INSTANCE
.storage()
.getStorageChannel( IFluidStorageChannel.class )
.createStack( newIS ) : old.aeStack.copy() );
@@ -342,7 +342,7 @@ public class MEMonitorIFluidHandler implements IMEMonitor<IAEFluidStack>, ITicki
else
{
this.fluidStack = is.copy();
this.aeStack = AEApi.instance().storage().getStorageChannel( IFluidStorageChannel.class ).createStack( is );
this.aeStack = Api.INSTANCE.storage().getStorageChannel( IFluidStorageChannel.class ).createStack( is );
}
}
}
@@ -50,7 +50,7 @@ public class MEMonitorIInventory implements IMEMonitor<IAEItemStack>, ITickingMo
{
private final InventoryAdaptor adaptor;
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 final HashMap<IMEMonitorHandlerReceiver<IAEItemStack>, Object> listeners = new HashMap<>();
private final NavigableMap<Integer, CachedItemStack> memory;
private IActionSource mySource;
@@ -138,7 +138,7 @@ public class MEMonitorIInventory implements IMEMonitor<IAEItemStack>, ITickingMo
@Override
public IStorageChannel getChannel()
{
return AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class );
return Api.INSTANCE.storage().getStorageChannel( IItemStorageChannel.class );
}
@Override
@@ -182,7 +182,7 @@ public class MEMonitorIInventory implements IMEMonitor<IAEItemStack>, ITickingMo
final int newSize = ( newIS.isEmpty() ? 0 : newIS.getCount() );
final int diff = newSize - ( oldIS.isEmpty() ? 0 : oldIS.getCount() );
final IAEItemStack stack = ( old == null || old.aeStack == null ? AEApi.instance()
final IAEItemStack stack = ( old == null || old.aeStack == null ? Api.INSTANCE
.storage()
.getStorageChannel( IItemStorageChannel.class )
.createStack( newIS ) : old.aeStack.copy() );
@@ -357,7 +357,7 @@ public class MEMonitorIInventory implements IMEMonitor<IAEItemStack>, ITickingMo
else
{
this.itemStack = is.copy();
this.aeStack = AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ).createStack( is );
this.aeStack = Api.INSTANCE.storage().getStorageChannel( IItemStorageChannel.class ).createStack( is );
}
}
}
@@ -54,7 +54,7 @@ public class NullInventory<T extends IAEStack<T>> implements IMEInventoryHandler
@Override
public IStorageChannel getChannel()
{
return AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class );
return Api.INSTANCE.storage().getStorageChannel( IItemStorageChannel.class );
}
@Override
@@ -39,7 +39,7 @@ import appeng.tile.misc.TileSecurityStation;
public class SecurityStationInventory implements IMEInventoryHandler<IAEItemStack>
{
private final IItemList<IAEItemStack> storedItems = AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ).createList();
private final IItemList<IAEItemStack> storedItems = Api.INSTANCE.storage().getStorageChannel( IItemStorageChannel.class ).createList();
private final TileSecurityStation securityTile;
public SecurityStationInventory( final TileSecurityStation ts )
@@ -52,7 +52,7 @@ public class SecurityStationInventory implements IMEInventoryHandler<IAEItemStac
{
if( this.hasPermission( src ) )
{
if( AEApi.instance().definitions().items().biometricCard().isSameAs( input.createItemStack() ) )
if( Api.INSTANCE.definitions().items().biometricCard().isSameAs( input.createItemStack() ) )
{
if( this.canAccept( input ) )
{
@@ -123,7 +123,7 @@ public class SecurityStationInventory implements IMEInventoryHandler<IAEItemStac
@Override
public IStorageChannel getChannel()
{
return AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class );
return Api.INSTANCE.storage().getStorageChannel( IItemStorageChannel.class );
}
@Override
@@ -146,7 +146,7 @@ public class SecurityStationInventory implements IMEInventoryHandler<IAEItemStac
final IBiometricCard tbc = (IBiometricCard) input.getItem();
final GameProfile newUser = tbc.getProfile( input.createItemStack() );
final int PlayerID = AEApi.instance().registries().players().getID( newUser );
final int PlayerID = Api.INSTANCE.registries().players().getID( newUser );
if( this.securityTile.getOwner() == PlayerID )
{
return false;