Revert using internal API
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
package appeng.util;
|
||||
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.config.*;
|
||||
import appeng.api.definitions.IItemDefinition;
|
||||
import appeng.api.features.AEFeature;
|
||||
@@ -44,7 +45,6 @@ import appeng.api.util.AEPartLocation;
|
||||
import appeng.api.util.DimensionalCoord;
|
||||
import appeng.core.AEConfig;
|
||||
import appeng.core.AELog;
|
||||
import appeng.core.Api;
|
||||
import appeng.core.stats.AeStats;
|
||||
import appeng.fluids.util.AEFluidStack;
|
||||
import appeng.hooks.TickHandler;
|
||||
@@ -1180,13 +1180,13 @@ public class Platform
|
||||
@SuppressWarnings( { "rawtypes", "unchecked" } )
|
||||
public static void postChanges(final IStorageGrid gs, final ItemStack removed, final ItemStack added, final IActionSource src )
|
||||
{
|
||||
for( final IStorageChannel<?> chan : Api.INSTANCE.storage().storageChannels() )
|
||||
for( final IStorageChannel<?> chan : AEApi.instance().storage().storageChannels() )
|
||||
{
|
||||
final IItemList<?> myChanges = chan.createList();
|
||||
|
||||
if( !removed.isEmpty() )
|
||||
{
|
||||
final IMEInventory myInv = Api.INSTANCE.registries().cell().getCellInventory( removed, null, chan );
|
||||
final IMEInventory myInv = AEApi.instance().registries().cell().getCellInventory( removed, null, chan );
|
||||
if( myInv != null )
|
||||
{
|
||||
myInv.getAvailableItems( myChanges );
|
||||
@@ -1198,7 +1198,7 @@ public class Platform
|
||||
}
|
||||
if( !added.isEmpty() )
|
||||
{
|
||||
final IMEInventory myInv = Api.INSTANCE.registries().cell().getCellInventory( added, null, chan );
|
||||
final IMEInventory myInv = AEApi.instance().registries().cell().getCellInventory( added, null, chan );
|
||||
if( myInv != null )
|
||||
{
|
||||
myInv.getAvailableItems( myChanges );
|
||||
@@ -1490,7 +1490,7 @@ public class Platform
|
||||
|
||||
if( type == AEFeature.CERTUS_QUARTZ_TOOLS )
|
||||
{
|
||||
final IItemDefinition certusQuartzCrystal = Api.INSTANCE.definitions().materials().certusQuartzCrystal();
|
||||
final IItemDefinition certusQuartzCrystal = AEApi.instance().definitions().materials().certusQuartzCrystal();
|
||||
|
||||
return certusQuartzCrystal.isSameAs( b );
|
||||
}
|
||||
@@ -1505,7 +1505,7 @@ public class Platform
|
||||
|
||||
// public static List<ItemStack> findPreferred( final ItemStack[] is )
|
||||
// {
|
||||
// final IParts parts = Api.INSTANCE.definitions().parts();
|
||||
// final IParts parts = AEApi.instance().definitions().parts();
|
||||
//
|
||||
// for( final ItemStack stack : is )
|
||||
// {
|
||||
@@ -1561,7 +1561,7 @@ public class Platform
|
||||
//
|
||||
// // public static void addStat( final int playerID, final Achievement achievement )
|
||||
// // {
|
||||
// // final EntityPlayer p = Api.INSTANCE.registries().players().findPlayer( playerID );
|
||||
// // final EntityPlayer p = AEApi.instance().registries().players().findPlayer( playerID );
|
||||
// // if( p != null )
|
||||
// // {
|
||||
// // p.addStat( achievement, 1 );
|
||||
@@ -1570,7 +1570,7 @@ public class Platform
|
||||
//
|
||||
// public static boolean isRecipePrioritized( final ItemStack what )
|
||||
// {
|
||||
// final IMaterials materials = Api.INSTANCE.definitions().materials();
|
||||
// final IMaterials materials = AEApi.instance().definitions().materials();
|
||||
//
|
||||
// boolean isPurified = materials.purifiedCertusQuartzCrystal().isSameAs( what );
|
||||
// isPurified |= materials.purifiedFluixCrystal().isSameAs( what );
|
||||
|
||||
@@ -21,7 +21,6 @@ package appeng.util.inv;
|
||||
|
||||
import java.util.Iterator;
|
||||
|
||||
import appeng.core.Api;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -65,7 +64,7 @@ public class IMEAdaptor extends InventoryAdaptor
|
||||
|
||||
private IItemList<IAEItemStack> getList()
|
||||
{
|
||||
return this.target.getAvailableItems( Api.INSTANCE.storage().getStorageChannel( IItemStorageChannel.class ).createList() );
|
||||
return this.target.getAvailableItems( AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ).createList() );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -26,7 +26,6 @@ import java.util.Objects;
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import appeng.core.Api;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -38,6 +37,7 @@ import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import net.minecraftforge.items.ItemHandlerHelper;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.config.FuzzyMode;
|
||||
import appeng.api.storage.IStorageChannel;
|
||||
import appeng.api.storage.channels.IItemStorageChannel;
|
||||
@@ -189,7 +189,7 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
|
||||
@Override
|
||||
public IStorageChannel<IAEItemStack> getChannel()
|
||||
{
|
||||
return Api.INSTANCE.storage().getStorageChannel( IItemStorageChannel.class );
|
||||
return AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -21,18 +21,18 @@ package appeng.util.item;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.config.FuzzyMode;
|
||||
import appeng.api.storage.channels.IItemStorageChannel;
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.api.storage.data.IItemContainer;
|
||||
import appeng.core.Api;
|
||||
|
||||
|
||||
public class ItemModList implements IItemContainer<IAEItemStack>
|
||||
{
|
||||
|
||||
private final IItemContainer<IAEItemStack> backingStore;
|
||||
private final IItemContainer<IAEItemStack> overrides = Api.INSTANCE.storage().getStorageChannel( IItemStorageChannel.class ).createList();
|
||||
private final IItemContainer<IAEItemStack> overrides = AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ).createList();
|
||||
|
||||
public ItemModList( final IItemContainer<IAEItemStack> backend )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user