Revert using internal API

This commit is contained in:
yueh
2020-06-07 17:21:20 +02:00
parent 7715f605eb
commit 23b6e195ac
148 changed files with 472 additions and 498 deletions
+4 -5
View File
@@ -77,7 +77,6 @@ import appeng.api.storage.channels.IItemStorageChannel;
import appeng.api.storage.data.IAEItemStack;
import appeng.api.storage.data.IAEStack;
import appeng.api.storage.data.IItemList;
import appeng.core.Api;
import appeng.crafting.CraftingJob;
import appeng.crafting.CraftingLink;
import appeng.crafting.CraftingLinkNexus;
@@ -251,7 +250,7 @@ public class CraftingGridCache implements ICraftingGrid, ICraftingProviderHelper
this.emitableItems.clear();
// update the stuff that was in the list...
this.storageGrid.postAlterationOfStoredItems( Api.INSTANCE.storage().getStorageChannel( IItemStorageChannel.class ), oldItems.keySet(),
this.storageGrid.postAlterationOfStoredItems( AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ), oldItems.keySet(),
new BaseActionSource() );
// re-create list..
@@ -288,7 +287,7 @@ public class CraftingGridCache implements ICraftingGrid, ICraftingProviderHelper
this.craftableItems.put( e.getKey(), ImmutableList.copyOf( e.getValue() ) );
}
this.storageGrid.postAlterationOfStoredItems( Api.INSTANCE.storage().getStorageChannel( IItemStorageChannel.class ), this.craftableItems.keySet(),
this.storageGrid.postAlterationOfStoredItems( AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ), this.craftableItems.keySet(),
new BaseActionSource() );
}
@@ -368,7 +367,7 @@ public class CraftingGridCache implements ICraftingGrid, ICraftingProviderHelper
{
final List<IMEInventoryHandler> list = new ArrayList<>( 1 );
if( channel == Api.INSTANCE.storage().getStorageChannel( IItemStorageChannel.class ) )
if( channel == AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ) )
{
list.add( this );
}
@@ -457,7 +456,7 @@ public class CraftingGridCache implements ICraftingGrid, ICraftingProviderHelper
@Override
public IStorageChannel<IAEItemStack> getChannel()
{
return Api.INSTANCE.storage().getStorageChannel( IItemStorageChannel.class );
return AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class );
}
@Override
+1 -2
View File
@@ -50,7 +50,6 @@ import appeng.api.storage.IStorageChannel;
import appeng.api.storage.data.IAEItemStack;
import appeng.api.storage.data.IAEStack;
import appeng.api.storage.data.IItemList;
import appeng.core.Api;
import appeng.me.helpers.BaseActionSource;
import appeng.me.helpers.GenericInterestManager;
import appeng.me.helpers.MachineSource;
@@ -76,7 +75,7 @@ public class GridStorageCache implements IStorageGrid
this.storageNetworks = new IdentityHashMap<>();
this.storageMonitors = new IdentityHashMap<>();
Api.INSTANCE.storage().storageChannels().forEach( channel -> this.storageMonitors.put( channel, new NetworkMonitor<>( this, channel ) ) );
AEApi.instance().storage().storageChannels().forEach( channel -> this.storageMonitors.put( channel, new NetworkMonitor<>( this, channel ) ) );
}
@Override
+2 -2
View File
@@ -46,8 +46,8 @@ import appeng.api.networking.pathing.IPathingGrid;
import appeng.api.util.AEPartLocation;
import appeng.api.util.DimensionalCoord;
import appeng.core.AEConfig;
import appeng.core.Api;
import appeng.core.AppEng;
import appeng.api.AEApi;
import appeng.api.features.AEFeature;
import appeng.core.stats.IAdvancementTrigger;
import appeng.me.GridConnection;
@@ -351,7 +351,7 @@ public class PathGridCache implements IPathingGrid
{
for( final IGridNode n : this.requireChannels )
{
PlayerEntity player = Api.INSTANCE.registries().players().findPlayer( n.getPlayerID() );
PlayerEntity player = AEApi.instance().registries().players().findPlayer( n.getPlayerID() );
if( player instanceof ServerPlayerEntity )
{
currentBracket.trigger( (ServerPlayerEntity) player );