Removed AEApi

Moved all internal access to the internal `Api` class using a new static
getter.
This commit is contained in:
yueh
2020-07-11 19:40:34 +02:00
parent d18eabe1fc
commit 0d43ca15be
168 changed files with 757 additions and 677 deletions
@@ -46,7 +46,6 @@ import net.minecraftforge.client.model.data.IModelData;
import net.minecraftforge.common.ToolType;
import net.minecraftforge.common.util.FakePlayerFactory;
import appeng.api.AEApi;
import appeng.api.config.Actionable;
import appeng.api.config.PowerMultiplier;
import appeng.api.networking.IGridNode;
@@ -67,6 +66,7 @@ import appeng.api.storage.channels.IItemStorageChannel;
import appeng.api.storage.data.IAEItemStack;
import appeng.api.util.AECableType;
import appeng.api.util.AEPartLocation;
import appeng.core.Api;
import appeng.core.AppEng;
import appeng.core.settings.TickRates;
import appeng.core.sync.packets.BlockTransitionEffectPacket;
@@ -324,7 +324,7 @@ public class AnnihilationPlanePart extends BasicStatePart implements IGridTickab
final IStorageGrid storage = this.getProxy().getStorage();
final IEnergyGrid energy = this.getProxy().getEnergy();
final IAEItemStack overflow = Platform.poweredInsert(energy,
storage.getInventory(AEApi.instance().storage().getStorageChannel(IItemStorageChannel.class)),
storage.getInventory(Api.instance().storage().getStorageChannel(IItemStorageChannel.class)),
itemToStore, this.mySrc);
this.isAccepting = overflow == null;
@@ -540,7 +540,7 @@ public class AnnihilationPlanePart extends BasicStatePart implements IGridTickab
for (final ItemStack itemStack : itemStacks) {
final IAEItemStack itemToTest = AEItemStack.fromItemStack(itemStack);
final IAEItemStack overflow = storage
.getInventory(AEApi.instance().storage().getStorageChannel(IItemStorageChannel.class))
.getInventory(Api.instance().storage().getStorageChannel(IItemStorageChannel.class))
.injectItems(itemToTest, Actionable.SIMULATE, this.mySrc);
if (overflow == null || itemToTest.getStackSize() > overflow.getStackSize()) {
canStore = true;