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
@@ -27,10 +27,10 @@ import net.minecraft.nbt.CompoundNBT;
import net.minecraftforge.items.IItemHandlerModifiable;
import net.minecraftforge.items.ItemHandlerHelper;
import appeng.api.AEApi;
import appeng.api.storage.channels.IItemStorageChannel;
import appeng.api.storage.data.IAEItemStack;
import appeng.core.AELog;
import appeng.core.Api;
import appeng.util.Platform;
import appeng.util.inv.IAEAppEngInventory;
import appeng.util.inv.InvOperation;
@@ -145,7 +145,7 @@ public class AppEngInternalAEInventory implements IItemHandlerModifiable, Iterab
if (!simulate) {
if (existing.isEmpty()) {
this.inv[slot] = AEApi.instance().storage().getStorageChannel(IItemStorageChannel.class)
this.inv[slot] = Api.instance().storage().getStorageChannel(IItemStorageChannel.class)
.createStack(reachedLimit ? ItemHandlerHelper.copyStackWithSize(stack, limit) : stack);
} else {
existing.grow(reachedLimit ? limit : stack.getCount());
@@ -182,7 +182,7 @@ public class AppEngInternalAEInventory implements IItemHandlerModifiable, Iterab
@Override
public void setStackInSlot(final int slot, final ItemStack newItemStack) {
ItemStack oldStack = this.getStackInSlot(slot).copy();
this.inv[slot] = AEApi.instance().storage().getStorageChannel(IItemStorageChannel.class)
this.inv[slot] = Api.instance().storage().getStorageChannel(IItemStorageChannel.class)
.createStack(newItemStack);
if (this.te != null && Platform.isServer()) {