API compiles

This commit is contained in:
Sebastian Hartte
2020-06-27 18:09:44 +02:00
parent ba71a82288
commit 80fbb58d4f
572 changed files with 2995 additions and 3037 deletions
@@ -20,6 +20,7 @@ package appeng.container.implementations;
import java.util.Iterator;
import alexiil.mc.lib.attributes.item.ItemTransferable;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.entity.player.ServerPlayerEntity;
@@ -27,8 +28,7 @@ import net.minecraft.inventory.container.ContainerType;
import net.minecraft.inventory.container.IContainerListener;
import net.minecraft.inventory.container.Slot;
import net.minecraft.item.ItemStack;
import net.minecraft.network.PacketBuffer;
import net.minecraftforge.items.IItemHandler;
import net.minecraft.network.PacketByteBuf;
import net.minecraftforge.items.wrapper.EmptyHandler;
import appeng.api.AEApi;
@@ -72,7 +72,7 @@ public class CellWorkbenchContainer extends UpgradeableContainer {
this.workBench = te;
}
public static CellWorkbenchContainer fromNetwork(int windowId, PlayerInventory inv, PacketBuffer buf) {
public static CellWorkbenchContainer fromNetwork(int windowId, PlayerInventory inv, PacketByteBuf buf) {
return helper.fromNetwork(windowId, inv, buf);
}
@@ -102,11 +102,11 @@ public class CellWorkbenchContainer extends UpgradeableContainer {
@Override
protected void setupConfig() {
final IItemHandler cell = this.getUpgradeable().getInventoryByName("cell");
final ItemTransferable cell = this.getUpgradeable().getInventoryByName("cell");
this.addSlot(new RestrictedInputSlot(RestrictedInputSlot.PlacableItemType.WORKBENCH_CELL, cell, 0, 152, 8,
this.getPlayerInv()));
final IItemHandler inv = this.getUpgradeable().getInventoryByName("config");
final ItemTransferable inv = this.getUpgradeable().getInventoryByName("config");
final WrapperSupplierItemHandler upgradeInventory = new WrapperSupplierItemHandler(
this::getCellUpgradeInventory);
// null, 3 * 8 );
@@ -182,8 +182,8 @@ public class CellWorkbenchContainer extends UpgradeableContainer {
return idx < this.availableUpgrades();
}
public IItemHandler getCellUpgradeInventory() {
final IItemHandler upgradeInventory = this.workBench.getCellUpgradeInventory();
public ItemTransferable getCellUpgradeInventory() {
final ItemTransferable upgradeInventory = this.workBench.getCellUpgradeInventory();
return upgradeInventory == null ? EmptyHandler.INSTANCE : upgradeInventory;
}
@@ -212,7 +212,7 @@ public class CellWorkbenchContainer extends UpgradeableContainer {
public void partition() {
final IItemHandler inv = this.getUpgradeable().getInventoryByName("config");
final ItemTransferable inv = this.getUpgradeable().getInventoryByName("config");
final ItemStack is = this.getUpgradeable().getInventoryByName("cell").getStackInSlot(0);
final IStorageChannel channel = is.getItem() instanceof IStorageCell
@@ -21,7 +21,7 @@ package appeng.container.implementations;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.container.ContainerType;
import net.minecraft.network.PacketBuffer;
import net.minecraft.network.PacketByteBuf;
import appeng.api.config.SecurityPermissions;
import appeng.container.AEBaseContainer;
@@ -45,7 +45,7 @@ public class ChestContainer extends AEBaseContainer {
this.bindPlayerInventory(ip, 0, 166 - /* height of player inventory */82);
}
public static ChestContainer fromNetwork(int windowId, PlayerInventory inv, PacketBuffer buf) {
public static ChestContainer fromNetwork(int windowId, PlayerInventory inv, PacketByteBuf buf) {
return helper.fromNetwork(windowId, inv, buf);
}
@@ -21,8 +21,8 @@ package appeng.container.implementations;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.container.ContainerType;
import net.minecraft.network.PacketBuffer;
import net.minecraftforge.items.IItemHandler;
import net.minecraft.network.PacketByteBuf;
import alexiil.mc.lib.attributes.item.ItemTransferable;
import appeng.api.config.CondenserOutput;
import appeng.api.config.Settings;
@@ -54,7 +54,7 @@ public class CondenserContainer extends AEBaseContainer implements IProgressProv
super(TYPE, id, ip, condenser, null);
this.condenser = condenser;
IItemHandler inv = condenser.getInternalInventory();
ItemTransferable inv = condenser.getInternalInventory();
this.addSlot(new RestrictedInputSlot(RestrictedInputSlot.PlacableItemType.TRASH, inv, 0, 51, 52, ip));
this.addSlot(new OutputSlot(inv, 1, 105, 52, -1));
@@ -65,7 +65,7 @@ public class CondenserContainer extends AEBaseContainer implements IProgressProv
this.bindPlayerInventory(ip, 0, 197 - /* height of player inventory */82);
}
public static CondenserContainer fromNetwork(int windowId, PlayerInventory inv, PacketBuffer buf) {
public static CondenserContainer fromNetwork(int windowId, PlayerInventory inv, PacketByteBuf buf) {
return helper.fromNetwork(windowId, inv, buf);
}
@@ -6,12 +6,12 @@ import net.minecraft.entity.player.ServerPlayerEntity;
import net.minecraft.inventory.container.INamedContainerProvider;
import net.minecraft.inventory.container.SimpleNamedContainerProvider;
import net.minecraft.item.ItemStack;
import net.minecraft.network.PacketBuffer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.network.PacketByteBuf;
import net.minecraft.block.entity.BlockEntity;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.text.Text;
import net.minecraft.util.text.StringTextComponent;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraft.text.TranslatableText;
import net.minecraft.world.World;
import net.minecraftforge.fml.network.NetworkHooks;
@@ -58,7 +58,7 @@ public final class ContainerHelper<C extends AEBaseContainer, I> {
* Opens a container that is based around a single tile entity. The tile
* entity's position is encoded in the packet buffer.
*/
public C fromNetwork(int windowId, PlayerInventory inv, PacketBuffer packetBuf) {
public C fromNetwork(int windowId, PlayerInventory inv, PacketByteBuf packetBuf) {
I host = getHostFromLocator(inv.player, ContainerLocator.read(packetBuf));
if (host != null) {
return factory.create(windowId, inv, host);
@@ -83,7 +83,7 @@ public final class ContainerHelper<C extends AEBaseContainer, I> {
return false;
}
ITextComponent title = findContainerTitle(player.world, locator, accessInterface);
Text title = findContainerTitle(player.world, locator, accessInterface);
INamedContainerProvider container = new SimpleNamedContainerProvider((wnd, p, pl) -> {
C c = factory.create(wnd, p, accessInterface);
@@ -97,7 +97,7 @@ public final class ContainerHelper<C extends AEBaseContainer, I> {
return true;
}
private ITextComponent findContainerTitle(World world, ContainerLocator locator, I accessInterface) {
private Text findContainerTitle(World world, ContainerLocator locator, I accessInterface) {
if (accessInterface instanceof ICustomNameObject) {
ICustomNameObject customNameObject = (ICustomNameObject) accessInterface;
@@ -112,7 +112,7 @@ public final class ContainerHelper<C extends AEBaseContainer, I> {
// FIXME: Should move this up, because at this point, it's hard to know where
// the terminal host came from (part or tile)
if (locator.hasBlockPos()) {
return new TranslationTextComponent(
return new TranslatableText(
world.getBlockState(locator.getBlockPos()).getBlock().getTranslationKey());
}
@@ -129,7 +129,7 @@ public final class ContainerHelper<C extends AEBaseContainer, I> {
return null; // No block was clicked
}
TileEntity tileEntity = player.world.getTileEntity(locator.getBlockPos());
BlockEntity tileEntity = player.world.getTileEntity(locator.getBlockPos());
// The tile entity itself can host a terminal (i.e. Chest!)
if (interfaceClass.isInstance(tileEntity)) {
@@ -24,7 +24,7 @@ import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.container.ContainerType;
import net.minecraft.inventory.container.Slot;
import net.minecraft.network.PacketBuffer;
import net.minecraft.network.PacketByteBuf;
import net.minecraft.world.World;
import appeng.api.config.SecurityPermissions;
@@ -56,7 +56,7 @@ public class CraftAmountContainer extends AEBaseContainer {
this.addSlot(this.getCraftingItem());
}
public static CraftAmountContainer fromNetwork(int windowId, PlayerInventory inv, PacketBuffer buf) {
public static CraftAmountContainer fromNetwork(int windowId, PlayerInventory inv, PacketByteBuf buf) {
return helper.fromNetwork(windowId, inv, buf);
}
@@ -32,8 +32,8 @@ import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.entity.player.ServerPlayerEntity;
import net.minecraft.inventory.container.ContainerType;
import net.minecraft.inventory.container.IContainerListener;
import net.minecraft.network.PacketBuffer;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.network.PacketByteBuf;
import net.minecraft.text.Text;
import net.minecraft.util.text.StringTextComponent;
import net.minecraft.world.World;
@@ -74,7 +74,7 @@ public class CraftConfirmContainer extends AEBaseContainer {
private static final ContainerHelper<CraftConfirmContainer, ITerminalHost> helper = new ContainerHelper<>(
CraftConfirmContainer::new, ITerminalHost.class, SecurityPermissions.CRAFT);
public static CraftConfirmContainer fromNetwork(int windowId, PlayerInventory inv, PacketBuffer buf) {
public static CraftConfirmContainer fromNetwork(int windowId, PlayerInventory inv, PacketByteBuf buf) {
return helper.fromNetwork(windowId, inv, buf);
}
@@ -100,7 +100,7 @@ public class CraftConfirmContainer extends AEBaseContainer {
@GuiSync(6)
public boolean noCPU = true;
@GuiSync(7)
public ITextComponent myName;
public Text myName;
public CraftConfirmContainer(int id, PlayerInventory ip, ITerminalHost te) {
super(TYPE, id, ip, te);
@@ -390,11 +390,11 @@ public class CraftConfirmContainer extends AEBaseContainer {
this.selectedCpu = selectedCpu;
}
public ITextComponent getName() {
public Text getName() {
return this.myName;
}
private void setName(@Nullable final ITextComponent myName) {
private void setName(@Nullable final Text myName) {
this.myName = myName;
}
@@ -25,8 +25,8 @@ import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.entity.player.ServerPlayerEntity;
import net.minecraft.inventory.container.ContainerType;
import net.minecraft.inventory.container.IContainerListener;
import net.minecraft.network.PacketBuffer;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.network.PacketByteBuf;
import net.minecraft.text.Text;
import appeng.api.AEApi;
import appeng.api.config.SecurityPermissions;
@@ -64,7 +64,7 @@ public class CraftingCPUContainer extends AEBaseContainer
.createList();
private IGrid network;
private CraftingCPUCluster monitor = null;
private ITextComponent cpuName = null;
private Text cpuName = null;
@GuiSync(0)
public long eta = -1;
@@ -90,7 +90,7 @@ public class CraftingCPUContainer extends AEBaseContainer
}
}
public static CraftingCPUContainer fromNetwork(int windowId, PlayerInventory inv, PacketBuffer buf) {
public static CraftingCPUContainer fromNetwork(int windowId, PlayerInventory inv, PacketByteBuf buf) {
return helper.fromNetwork(windowId, inv, buf);
}
@@ -220,7 +220,7 @@ public class CraftingCPUContainer extends AEBaseContainer
}
@Override
public ITextComponent getCustomInventoryName() {
public Text getCustomInventoryName() {
return this.cpuName;
}
@@ -20,12 +20,12 @@ package appeng.container.implementations;
import javax.annotation.Nonnull;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.text.Text;
import appeng.api.networking.crafting.ICraftingCPU;
public class CraftingCPURecord implements Comparable<CraftingCPURecord> {
private final ITextComponent myName;
private final Text myName;
private final ICraftingCPU cpu;
private final long size;
private final int processors;
@@ -50,7 +50,7 @@ public class CraftingCPURecord implements Comparable<CraftingCPURecord> {
return this.cpu;
}
ITextComponent getName() {
Text getName() {
return this.myName;
}
@@ -27,8 +27,8 @@ import com.google.common.collect.ImmutableSet;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.container.ContainerType;
import net.minecraft.network.PacketBuffer;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.network.PacketByteBuf;
import net.minecraft.text.Text;
import appeng.api.config.SecurityPermissions;
import appeng.api.networking.crafting.ICraftingCPU;
@@ -45,7 +45,7 @@ public class CraftingStatusContainer extends CraftingCPUContainer {
private static final ContainerHelper<CraftingStatusContainer, ITerminalHost> helper = new ContainerHelper<>(
CraftingStatusContainer::new, ITerminalHost.class, SecurityPermissions.CRAFT);
public static CraftingStatusContainer fromNetwork(int windowId, PlayerInventory inv, PacketBuffer buf) {
public static CraftingStatusContainer fromNetwork(int windowId, PlayerInventory inv, PacketByteBuf buf) {
return helper.fromNetwork(windowId, inv, buf);
}
@@ -59,7 +59,7 @@ public class CraftingStatusContainer extends CraftingCPUContainer {
@GuiSync(6)
public boolean noCPU = true;
@GuiSync(7)
public ITextComponent myName;
public Text myName;
public CraftingStatusContainer(int id, final PlayerInventory ip, final ITerminalHost te) {
super(TYPE, id, ip, te);
@@ -18,6 +18,7 @@
package appeng.container.implementations;
import alexiil.mc.lib.attributes.item.ItemTransferable;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.CraftingInventory;
@@ -26,9 +27,8 @@ import net.minecraft.inventory.container.ContainerType;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.item.crafting.IRecipeType;
import net.minecraft.network.PacketBuffer;
import net.minecraft.network.PacketByteBuf;
import net.minecraft.world.World;
import net.minecraftforge.items.IItemHandler;
import net.minecraftforge.items.wrapper.PlayerInvWrapper;
import appeng.api.config.SecurityPermissions;
@@ -52,7 +52,7 @@ public class CraftingTermContainer extends MEMonitorableContainer
private static final ContainerHelper<CraftingTermContainer, ITerminalHost> helper = new ContainerHelper<>(
CraftingTermContainer::new, ITerminalHost.class, SecurityPermissions.CRAFT);
public static CraftingTermContainer fromNetwork(int windowId, PlayerInventory inv, PacketBuffer buf) {
public static CraftingTermContainer fromNetwork(int windowId, PlayerInventory inv, PacketByteBuf buf) {
return helper.fromNetwork(windowId, inv, buf);
}
@@ -70,7 +70,7 @@ public class CraftingTermContainer extends MEMonitorableContainer
super(TYPE, id, ip, monitorable, false);
this.ct = (CraftingTerminalPart) monitorable;
final IItemHandler crafting = this.ct.getInventoryByName("crafting");
final ItemTransferable crafting = this.ct.getInventoryByName("crafting");
for (int y = 0; y < 3; y++) {
for (int x = 0; x < 3; x++) {
@@ -120,13 +120,13 @@ public class CraftingTermContainer extends MEMonitorableContainer
}
@Override
public void onChangeInventory(final IItemHandler inv, final int slot, final InvOperation mc,
final ItemStack removedStack, final ItemStack newStack) {
public void onChangeInventory(final ItemTransferable inv, final int slot, final InvOperation mc,
final ItemStack removedStack, final ItemStack newStack) {
}
@Override
public IItemHandler getInventoryByName(final String name) {
public ItemTransferable getInventoryByName(final String name) {
if (name.equals("player")) {
return new PlayerInvWrapper(this.getPlayerInventory());
}
@@ -21,7 +21,7 @@ package appeng.container.implementations;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.container.ContainerType;
import net.minecraft.network.PacketBuffer;
import net.minecraft.network.PacketByteBuf;
import appeng.container.AEBaseContainer;
import appeng.container.ContainerLocator;
@@ -35,7 +35,7 @@ public class DriveContainer extends AEBaseContainer {
private static final ContainerHelper<DriveContainer, DriveTileEntity> helper = new ContainerHelper<>(
DriveContainer::new, DriveTileEntity.class);
public static DriveContainer fromNetwork(int windowId, PlayerInventory inv, PacketBuffer buf) {
public static DriveContainer fromNetwork(int windowId, PlayerInventory inv, PacketByteBuf buf) {
return helper.fromNetwork(windowId, inv, buf);
}
@@ -18,11 +18,11 @@
package appeng.container.implementations;
import alexiil.mc.lib.attributes.item.ItemTransferable;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.container.ContainerType;
import net.minecraft.network.PacketBuffer;
import net.minecraftforge.items.IItemHandler;
import net.minecraft.network.PacketByteBuf;
import appeng.api.config.FuzzyMode;
import appeng.api.config.SecurityPermissions;
@@ -44,7 +44,7 @@ public class FormationPlaneContainer extends UpgradeableContainer {
private static final ContainerHelper<FormationPlaneContainer, FormationPlanePart> helper = new ContainerHelper<>(
FormationPlaneContainer::new, FormationPlanePart.class, SecurityPermissions.BUILD);
public static FormationPlaneContainer fromNetwork(int windowId, PlayerInventory inv, PacketBuffer buf) {
public static FormationPlaneContainer fromNetwork(int windowId, PlayerInventory inv, PacketByteBuf buf) {
return helper.fromNetwork(windowId, inv, buf);
}
@@ -69,7 +69,7 @@ public class FormationPlaneContainer extends UpgradeableContainer {
final int xo = 8;
final int yo = 23 + 6;
final IItemHandler config = this.getUpgradeable().getInventoryByName("config");
final ItemTransferable config = this.getUpgradeable().getInventoryByName("config");
for (int y = 0; y < 7; y++) {
for (int x = 0; x < 9; x++) {
if (y < 2) {
@@ -80,7 +80,7 @@ public class FormationPlaneContainer extends UpgradeableContainer {
}
}
final IItemHandler upgrades = this.getUpgradeable().getInventoryByName("upgrades");
final ItemTransferable upgrades = this.getUpgradeable().getInventoryByName("upgrades");
this.addSlot((new RestrictedInputSlot(RestrictedInputSlot.PlacableItemType.UPGRADES, upgrades, 0, 187, 8,
this.getPlayerInventory())).setNotDraggable());
this.addSlot((new RestrictedInputSlot(RestrictedInputSlot.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18,
@@ -21,8 +21,8 @@ package appeng.container.implementations;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.container.ContainerType;
import net.minecraft.network.PacketBuffer;
import net.minecraftforge.items.IItemHandler;
import net.minecraft.network.PacketByteBuf;
import alexiil.mc.lib.attributes.item.ItemTransferable;
import appeng.container.AEBaseContainer;
import appeng.container.ContainerLocator;
@@ -38,7 +38,7 @@ public class GrinderContainer extends AEBaseContainer {
private static final ContainerHelper<GrinderContainer, GrinderTileEntity> helper = new ContainerHelper<>(
GrinderContainer::new, GrinderTileEntity.class);
public static GrinderContainer fromNetwork(int windowId, PlayerInventory inv, PacketBuffer buf) {
public static GrinderContainer fromNetwork(int windowId, PlayerInventory inv, PacketByteBuf buf) {
return helper.fromNetwork(windowId, inv, buf);
}
@@ -49,7 +49,7 @@ public class GrinderContainer extends AEBaseContainer {
public GrinderContainer(int id, final PlayerInventory ip, final GrinderTileEntity grinder) {
super(TYPE, id, ip, grinder, null);
IItemHandler inv = grinder.getInternalInventory();
ItemTransferable inv = grinder.getInternalInventory();
this.addSlot(new RestrictedInputSlot(RestrictedInputSlot.PlacableItemType.ORE, inv, 0, 12, 17,
this.getPlayerInventory()));
@@ -18,11 +18,11 @@
package appeng.container.implementations;
import alexiil.mc.lib.attributes.item.ItemTransferable;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.container.ContainerType;
import net.minecraft.network.PacketBuffer;
import net.minecraftforge.items.IItemHandler;
import net.minecraft.network.PacketByteBuf;
import appeng.api.config.FullnessMode;
import appeng.api.config.OperationMode;
@@ -43,7 +43,7 @@ public class IOPortContainer extends UpgradeableContainer {
private static final ContainerHelper<IOPortContainer, IOPortTileEntity> helper = new ContainerHelper<>(
IOPortContainer::new, IOPortTileEntity.class, SecurityPermissions.BUILD);
public static IOPortContainer fromNetwork(int windowId, PlayerInventory inv, PacketBuffer buf) {
public static IOPortContainer fromNetwork(int windowId, PlayerInventory inv, PacketByteBuf buf) {
return helper.fromNetwork(windowId, inv, buf);
}
@@ -70,7 +70,7 @@ public class IOPortContainer extends UpgradeableContainer {
int offX = 19;
int offY = 17;
final IItemHandler cells = this.getUpgradeable().getInventoryByName("cells");
final ItemTransferable cells = this.getUpgradeable().getInventoryByName("cells");
for (int y = 0; y < 3; y++) {
for (int x = 0; x < 2; x++) {
@@ -88,7 +88,7 @@ public class IOPortContainer extends UpgradeableContainer {
}
}
final IItemHandler upgrades = this.getUpgradeable().getInventoryByName("upgrades");
final ItemTransferable upgrades = this.getUpgradeable().getInventoryByName("upgrades");
this.addSlot((new RestrictedInputSlot(RestrictedInputSlot.PlacableItemType.UPGRADES, upgrades, 0, 187, 8,
this.getPlayerInventory())).setNotDraggable());
this.addSlot((new RestrictedInputSlot(RestrictedInputSlot.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18,
@@ -23,8 +23,8 @@ import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.container.ContainerType;
import net.minecraft.inventory.container.Slot;
import net.minecraft.item.ItemStack;
import net.minecraft.network.PacketBuffer;
import net.minecraftforge.items.IItemHandler;
import net.minecraft.network.PacketByteBuf;
import alexiil.mc.lib.attributes.item.ItemTransferable;
import appeng.api.AEApi;
import appeng.api.definitions.IItemDefinition;
@@ -50,7 +50,7 @@ public class InscriberContainer extends UpgradeableContainer implements IProgres
private static final ContainerHelper<InscriberContainer, InscriberTileEntity> helper = new ContainerHelper<>(
InscriberContainer::new, InscriberTileEntity.class);
public static InscriberContainer fromNetwork(int windowId, PlayerInventory inv, PacketBuffer buf) {
public static InscriberContainer fromNetwork(int windowId, PlayerInventory inv, PacketByteBuf buf) {
return helper.fromNetwork(windowId, inv, buf);
}
@@ -74,7 +74,7 @@ public class InscriberContainer extends UpgradeableContainer implements IProgres
super(TYPE, id, ip, te);
this.ti = te;
IItemHandler inv = te.getInternalInventory();
ItemTransferable inv = te.getInternalInventory();
RestrictedInputSlot top = new RestrictedInputSlot(RestrictedInputSlot.PlacableItemType.INSCRIBER_PLATE, inv, 0,
45, 16, this.getPlayerInventory());
@@ -21,7 +21,7 @@ package appeng.container.implementations;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.container.ContainerType;
import net.minecraft.network.PacketBuffer;
import net.minecraft.network.PacketByteBuf;
import appeng.api.config.SecurityPermissions;
import appeng.api.config.Settings;
@@ -42,7 +42,7 @@ public class InterfaceContainer extends UpgradeableContainer {
private static final ContainerHelper<InterfaceContainer, IInterfaceHost> helper = new ContainerHelper<>(
InterfaceContainer::new, IInterfaceHost.class, SecurityPermissions.BUILD);
public static InterfaceContainer fromNetwork(int windowId, PlayerInventory inv, PacketBuffer buf) {
public static InterfaceContainer fromNetwork(int windowId, PlayerInventory inv, PacketByteBuf buf) {
return helper.fromNetwork(windowId, inv, buf);
}
@@ -29,9 +29,9 @@ import net.minecraft.entity.player.ServerPlayerEntity;
import net.minecraft.inventory.container.ContainerType;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.PacketBuffer;
import net.minecraft.util.text.ITextComponent;
import net.minecraftforge.items.IItemHandler;
import net.minecraft.network.PacketByteBuf;
import net.minecraft.text.Text;
import alexiil.mc.lib.attributes.item.ItemTransferable;
import appeng.api.config.SecurityPermissions;
import appeng.api.config.Settings;
@@ -67,7 +67,7 @@ public final class InterfaceTerminalContainer extends AEBaseContainer {
private static final ContainerHelper<InterfaceTerminalContainer, InterfaceTerminalPart> helper = new ContainerHelper<>(
InterfaceTerminalContainer::new, InterfaceTerminalPart.class, SecurityPermissions.BUILD);
public static InterfaceTerminalContainer fromNetwork(int windowId, PlayerInventory inv, PacketBuffer buf) {
public static InterfaceTerminalContainer fromNetwork(int windowId, PlayerInventory inv, PacketByteBuf buf) {
return helper.fromNetwork(windowId, inv, buf);
}
@@ -196,7 +196,7 @@ public final class InterfaceTerminalContainer extends AEBaseContainer {
final InventoryAdaptor playerHand = new AdaptorItemHandler(new WrapperCursorItemHandler(player.inventory));
final IItemHandler theSlot = new WrapperFilteredItemHandler(
final ItemTransferable theSlot = new WrapperFilteredItemHandler(
new WrapperRangeItemHandler(inv.server, slot, slot + 1), new PatternSlotFilter());
final InventoryAdaptor interfaceSlot = new AdaptorItemHandler(theSlot);
@@ -333,7 +333,7 @@ public final class InterfaceTerminalContainer extends AEBaseContainer {
if (tag.isEmpty()) {
tag.putLong("sortBy", inv.sortBy);
tag.putString("un", ITextComponent.Serializer.toJson(inv.name));
tag.putString("un", Text.Serializer.toJson(inv.name));
}
for (int x = 0; x < length; x++) {
@@ -358,11 +358,11 @@ public final class InterfaceTerminalContainer extends AEBaseContainer {
private final long sortBy;
private final long which = autoBase++;
private final ITextComponent name;
private final IItemHandler client;
private final IItemHandler server;
private final Text name;
private final ItemTransferable client;
private final ItemTransferable server;
public InvTracker(final DualityInterface dual, final IItemHandler patterns, final ITextComponent name) {
public InvTracker(final DualityInterface dual, final ItemTransferable patterns, final Text name) {
this.server = patterns;
this.client = new AppEngInternalInventory(null, this.server.getSlots());
this.name = name;
@@ -372,12 +372,12 @@ public final class InterfaceTerminalContainer extends AEBaseContainer {
private static class PatternSlotFilter implements IAEItemFilter {
@Override
public boolean allowExtract(IItemHandler inv, int slot, int amount) {
public boolean allowExtract(ItemTransferable inv, int slot, int amount) {
return true;
}
@Override
public boolean allowInsert(IItemHandler inv, int slot, ItemStack stack) {
public boolean allowInsert(ItemTransferable inv, int slot, ItemStack stack) {
return !stack.isEmpty() && stack.getItem() instanceof EncodedPatternItem;
}
}
@@ -18,14 +18,14 @@
package appeng.container.implementations;
import alexiil.mc.lib.attributes.item.ItemTransferable;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.gui.widget.TextFieldWidget;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.container.ContainerType;
import net.minecraft.network.PacketBuffer;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.items.IItemHandler;
import net.minecraft.network.PacketByteBuf;
import appeng.api.config.FuzzyMode;
import appeng.api.config.LevelType;
@@ -47,7 +47,7 @@ public class LevelEmitterContainer extends UpgradeableContainer {
private static final ContainerHelper<LevelEmitterContainer, LevelEmitterPart> helper = new ContainerHelper<>(
LevelEmitterContainer::new, LevelEmitterPart.class, SecurityPermissions.BUILD);
public static LevelEmitterContainer fromNetwork(int windowId, PlayerInventory inv, PacketBuffer buf) {
public static LevelEmitterContainer fromNetwork(int windowId, PlayerInventory inv, PacketByteBuf buf) {
return helper.fromNetwork(windowId, inv, buf);
}
@@ -57,7 +57,7 @@ public class LevelEmitterContainer extends UpgradeableContainer {
private final LevelEmitterPart lvlEmitter;
@OnlyIn(Dist.CLIENT)
@Environment(EnvType.CLIENT)
private TextFieldWidget textField;
@GuiSync(2)
public LevelType lvType;
@@ -71,7 +71,7 @@ public class LevelEmitterContainer extends UpgradeableContainer {
this.lvlEmitter = te;
}
@OnlyIn(Dist.CLIENT)
@Environment(EnvType.CLIENT)
public void setTextField(final TextFieldWidget level) {
this.textField = level;
this.textField.setText(String.valueOf(this.EmitterValue));
@@ -84,7 +84,7 @@ public class LevelEmitterContainer extends UpgradeableContainer {
@Override
protected void setupConfig() {
final IItemHandler upgrades = this.getUpgradeable().getInventoryByName("upgrades");
final ItemTransferable upgrades = this.getUpgradeable().getInventoryByName("upgrades");
if (this.availableUpgrades() > 0) {
this.addSlot((new RestrictedInputSlot(RestrictedInputSlot.PlacableItemType.UPGRADES, upgrades, 0, 187, 8,
this.getPlayerInventory())).setNotDraggable());
@@ -102,7 +102,7 @@ public class LevelEmitterContainer extends UpgradeableContainer {
8 + 18 * 3, this.getPlayerInventory())).setNotDraggable());
}
final IItemHandler inv = this.getUpgradeable().getInventoryByName("config");
final ItemTransferable inv = this.getUpgradeable().getInventoryByName("config");
final int y = 40;
final int x = 80 + 44;
this.addSlot(new FakeTypeOnlySlot(inv, 0, x, y));
@@ -29,8 +29,8 @@ import net.minecraft.entity.player.ServerPlayerEntity;
import net.minecraft.inventory.container.ContainerType;
import net.minecraft.inventory.container.IContainerListener;
import net.minecraft.item.ItemStack;
import net.minecraft.network.PacketBuffer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.network.PacketByteBuf;
import net.minecraft.block.entity.BlockEntity;
import appeng.api.AEApi;
import appeng.api.config.Actionable;
@@ -83,7 +83,7 @@ public class MEMonitorableContainer extends AEBaseContainer
private static final ContainerHelper<MEMonitorableContainer, ITerminalHost> helper = new ContainerHelper<>(
MEMonitorableContainer::new, ITerminalHost.class);
public static MEMonitorableContainer fromNetwork(int windowId, PlayerInventory inv, PacketBuffer buf) {
public static MEMonitorableContainer fromNetwork(int windowId, PlayerInventory inv, PacketByteBuf buf) {
return helper.fromNetwork(windowId, inv, buf);
}
@@ -111,7 +111,7 @@ public class MEMonitorableContainer extends AEBaseContainer
public MEMonitorableContainer(ContainerType<?> containerType, int id, PlayerInventory ip,
final ITerminalHost monitorable, final boolean bindInventory) {
super(containerType, id, ip, monitorable instanceof TileEntity ? (TileEntity) monitorable : null,
super(containerType, id, ip, monitorable instanceof BlockEntity ? (BlockEntity) monitorable : null,
monitorable instanceof IPart ? (IPart) monitorable : null,
monitorable instanceof IGuiItemObject ? (IGuiItemObject) monitorable : null);
@@ -22,7 +22,7 @@ import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.container.ContainerType;
import net.minecraft.item.ItemStack;
import net.minecraft.network.PacketBuffer;
import net.minecraft.network.PacketByteBuf;
import appeng.api.config.Actionable;
import appeng.api.config.PowerMultiplier;
@@ -37,7 +37,7 @@ public class MEPortableCellContainer extends MEMonitorableContainer {
private static final ContainerHelper<MEPortableCellContainer, IPortableCell> helper = new ContainerHelper<>(
MEPortableCellContainer::new, IPortableCell.class);
public static MEPortableCellContainer fromNetwork(int windowId, PlayerInventory inv, PacketBuffer buf) {
public static MEPortableCellContainer fromNetwork(int windowId, PlayerInventory inv, PacketByteBuf buf) {
return helper.fromNetwork(windowId, inv, buf);
}
@@ -18,14 +18,14 @@
package appeng.container.implementations;
import alexiil.mc.lib.attributes.item.ItemTransferable;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.container.ContainerType;
import net.minecraft.inventory.container.Slot;
import net.minecraft.item.ItemStack;
import net.minecraft.network.PacketBuffer;
import net.minecraft.network.PacketByteBuf;
import net.minecraft.world.World;
import net.minecraftforge.items.IItemHandler;
import appeng.api.config.RedstoneMode;
import appeng.api.config.SecurityPermissions;
@@ -49,7 +49,7 @@ public class MolecularAssemblerContainer extends UpgradeableContainer implements
private static final ContainerHelper<MolecularAssemblerContainer, MolecularAssemblerTileEntity> helper = new ContainerHelper<>(
MolecularAssemblerContainer::new, MolecularAssemblerTileEntity.class);
public static MolecularAssemblerContainer fromNetwork(int windowId, PlayerInventory inv, PacketBuffer buf) {
public static MolecularAssemblerContainer fromNetwork(int windowId, PlayerInventory inv, PacketByteBuf buf) {
return helper.fromNetwork(windowId, inv, buf);
}
@@ -70,7 +70,7 @@ public class MolecularAssemblerContainer extends UpgradeableContainer implements
}
public boolean isValidItemForSlot(final int slotIndex, final ItemStack i) {
final IItemHandler mac = this.getUpgradeable().getInventoryByName(MolecularAssemblerTileEntity.INVENTORY_MAIN);
final ItemTransferable mac = this.getUpgradeable().getInventoryByName(MolecularAssemblerTileEntity.INVENTORY_MAIN);
final ItemStack is = mac.getStackInSlot(10);
if (is.isEmpty()) {
@@ -99,7 +99,7 @@ public class MolecularAssemblerContainer extends UpgradeableContainer implements
int offX = 29;
int offY = 30;
final IItemHandler mac = this.getUpgradeable().getInventoryByName(MolecularAssemblerTileEntity.INVENTORY_MAIN);
final ItemTransferable mac = this.getUpgradeable().getInventoryByName(MolecularAssemblerTileEntity.INVENTORY_MAIN);
for (int y = 0; y < 3; y++) {
for (int x = 0; x < 3; x++) {
@@ -120,7 +120,7 @@ public class MolecularAssemblerContainer extends UpgradeableContainer implements
offX = 122;
offY = 17;
final IItemHandler upgrades = this.getUpgradeable().getInventoryByName("upgrades");
final ItemTransferable upgrades = this.getUpgradeable().getInventoryByName("upgrades");
this.addSlot((new RestrictedInputSlot(RestrictedInputSlot.PlacableItemType.UPGRADES, upgrades, 0, 187, 8,
this.getPlayerInventory())).setNotDraggable());
this.addSlot((new RestrictedInputSlot(RestrictedInputSlot.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18,
@@ -25,7 +25,7 @@ import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.entity.player.ServerPlayerEntity;
import net.minecraft.inventory.container.ContainerType;
import net.minecraft.item.ItemStack;
import net.minecraft.network.PacketBuffer;
import net.minecraft.network.PacketByteBuf;
import appeng.api.AEApi;
import appeng.api.implementations.guiobjects.INetworkTool;
@@ -53,7 +53,7 @@ public class NetworkStatusContainer extends AEBaseContainer {
private static final ContainerHelper<NetworkStatusContainer, INetworkTool> helper = new ContainerHelper<>(
NetworkStatusContainer::new, INetworkTool.class);
public static NetworkStatusContainer fromNetwork(int windowId, PlayerInventory inv, PacketBuffer buf) {
public static NetworkStatusContainer fromNetwork(int windowId, PlayerInventory inv, PacketByteBuf buf) {
return helper.fromNetwork(windowId, inv, buf);
}
@@ -23,7 +23,7 @@ import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.container.ContainerType;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.PacketBuffer;
import net.minecraft.network.PacketByteBuf;
import appeng.api.implementations.guiobjects.INetworkTool;
import appeng.container.AEBaseContainer;
@@ -38,7 +38,7 @@ public class NetworkToolContainer extends AEBaseContainer {
private static final ContainerHelper<NetworkToolContainer, INetworkTool> helper = new ContainerHelper<>(
NetworkToolContainer::new, INetworkTool.class);
public static NetworkToolContainer fromNetwork(int windowId, PlayerInventory inv, PacketBuffer buf) {
public static NetworkToolContainer fromNetwork(int windowId, PlayerInventory inv, PacketByteBuf buf) {
return helper.fromNetwork(windowId, inv, buf);
}
@@ -22,6 +22,7 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import alexiil.mc.lib.attributes.item.ItemTransferable;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.entity.player.ServerPlayerEntity;
@@ -37,9 +38,8 @@ import net.minecraft.item.crafting.IRecipeType;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.nbt.INBT;
import net.minecraft.nbt.ListNBT;
import net.minecraft.network.PacketBuffer;
import net.minecraft.network.PacketByteBuf;
import net.minecraft.world.World;
import net.minecraftforge.items.IItemHandler;
import net.minecraftforge.items.wrapper.PlayerInvWrapper;
import appeng.api.AEApi;
@@ -82,7 +82,7 @@ public class PatternTermContainer extends MEMonitorableContainer
private static final ContainerHelper<PatternTermContainer, ITerminalHost> helper = new ContainerHelper<>(
PatternTermContainer::new, ITerminalHost.class, SecurityPermissions.CRAFT);
public static PatternTermContainer fromNetwork(int windowId, PlayerInventory inv, PacketBuffer buf) {
public static PatternTermContainer fromNetwork(int windowId, PlayerInventory inv, PacketByteBuf buf) {
return helper.fromNetwork(windowId, inv, buf);
}
@@ -92,7 +92,7 @@ public class PatternTermContainer extends MEMonitorableContainer
private final PatternTerminalPart patternTerminal;
private final AppEngInternalInventory cOut = new AppEngInternalInventory(null, 1);
private final IItemHandler crafting;
private final ItemTransferable crafting;
private final FakeCraftingMatrixSlot[] craftingSlots = new FakeCraftingMatrixSlot[9];
private final OptionalFakeSlot[] outputSlots = new OptionalFakeSlot[3];
private final PatternTermSlot craftSlot;
@@ -109,8 +109,8 @@ public class PatternTermContainer extends MEMonitorableContainer
super(TYPE, id, ip, monitorable, false);
this.patternTerminal = (PatternTerminalPart) monitorable;
final IItemHandler patternInv = this.getPatternTerminal().getInventoryByName("pattern");
final IItemHandler output = this.getPatternTerminal().getInventoryByName("output");
final ItemTransferable patternInv = this.getPatternTerminal().getInventoryByName("pattern");
final ItemTransferable output = this.getPatternTerminal().getInventoryByName("output");
this.crafting = this.getPatternTerminal().getInventoryByName("crafting");
@@ -194,8 +194,8 @@ public class PatternTermContainer extends MEMonitorableContainer
}
@Override
public void onChangeInventory(final IItemHandler inv, final int slot, final InvOperation mc,
final ItemStack removedStack, final ItemStack newStack) {
public void onChangeInventory(final ItemTransferable inv, final int slot, final InvOperation mc,
final ItemStack removedStack, final ItemStack newStack) {
}
@@ -487,7 +487,7 @@ public class PatternTermContainer extends MEMonitorableContainer
}
@Override
public IItemHandler getInventoryByName(final String name) {
public ItemTransferable getInventoryByName(final String name) {
if (name.equals("player")) {
return new PlayerInvWrapper(this.getPlayerInventory());
}
@@ -18,14 +18,14 @@
package appeng.container.implementations;
import net.minecraft.block.entity.BlockEntity;
import net.minecraft.client.gui.widget.TextFieldWidget;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.container.ContainerType;
import net.minecraft.network.PacketBuffer;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraft.network.PacketByteBuf;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import appeng.api.config.SecurityPermissions;
import appeng.api.parts.IPart;
@@ -42,7 +42,7 @@ public class PriorityContainer extends AEBaseContainer {
private static final ContainerHelper<PriorityContainer, IPriorityHost> helper = new ContainerHelper<>(
PriorityContainer::new, IPriorityHost.class, SecurityPermissions.BUILD);
public static PriorityContainer fromNetwork(int windowId, PlayerInventory inv, PacketBuffer buf) {
public static PriorityContainer fromNetwork(int windowId, PlayerInventory inv, PacketByteBuf buf) {
return helper.fromNetwork(windowId, inv, buf);
}
@@ -52,18 +52,18 @@ public class PriorityContainer extends AEBaseContainer {
private final IPriorityHost priHost;
@OnlyIn(Dist.CLIENT)
@Environment(EnvType.CLIENT)
private TextFieldWidget textField;
@GuiSync(2)
public long PriorityValue = -1;
public PriorityContainer(int id, final PlayerInventory ip, final IPriorityHost te) {
super(TYPE, id, ip, (TileEntity) (te instanceof TileEntity ? te : null),
super(TYPE, id, ip, (BlockEntity) (te instanceof BlockEntity ? te : null),
(IPart) (te instanceof IPart ? te : null));
this.priHost = te;
}
@OnlyIn(Dist.CLIENT)
@Environment(EnvType.CLIENT)
public void setTextField(final TextFieldWidget level) {
this.textField = level;
this.textField.setText(String.valueOf(this.PriorityValue));
@@ -21,7 +21,7 @@ package appeng.container.implementations;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.container.ContainerType;
import net.minecraft.network.PacketBuffer;
import net.minecraft.network.PacketByteBuf;
import appeng.api.config.SecurityPermissions;
import appeng.container.AEBaseContainer;
@@ -36,7 +36,7 @@ public class QNBContainer extends AEBaseContainer {
private static final ContainerHelper<QNBContainer, QuantumBridgeTileEntity> helper = new ContainerHelper<>(
QNBContainer::new, QuantumBridgeTileEntity.class, SecurityPermissions.BUILD);
public static QNBContainer fromNetwork(int windowId, PlayerInventory inv, PacketBuffer buf) {
public static QNBContainer fromNetwork(int windowId, PlayerInventory inv, PacketByteBuf buf) {
return helper.fromNetwork(windowId, inv, buf);
}
@@ -20,15 +20,15 @@ package appeng.container.implementations;
import javax.annotation.Nonnull;
import alexiil.mc.lib.attributes.item.ItemTransferable;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.container.ContainerType;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.PacketBuffer;
import net.minecraft.network.PacketByteBuf;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.entity.player.PlayerDestroyItemEvent;
import net.minecraftforge.items.IItemHandler;
import appeng.api.AEApi;
import appeng.container.AEBaseContainer;
@@ -47,7 +47,7 @@ public class QuartzKnifeContainer extends AEBaseContainer {
private static final ContainerHelper<QuartzKnifeContainer, QuartzKnifeObj> helper = new ContainerHelper<>(
QuartzKnifeContainer::new, QuartzKnifeObj.class);
public static QuartzKnifeContainer fromNetwork(int windowId, PlayerInventory inv, PacketBuffer buf) {
public static QuartzKnifeContainer fromNetwork(int windowId, PlayerInventory inv, PacketByteBuf buf) {
return helper.fromNetwork(windowId, inv, buf);
}
@@ -57,7 +57,7 @@ public class QuartzKnifeContainer extends AEBaseContainer {
private final QuartzKnifeObj toolInv;
private final IItemHandler inSlot = new AppEngInternalInventory(null, 1, 1);
private final ItemTransferable inSlot = new AppEngInternalInventory(null, 1, 1);
private String myName = "";
public QuartzKnifeContainer(int id, final PlayerInventory ip, final QuartzKnifeObj te) {
@@ -105,13 +105,13 @@ public class QuartzKnifeContainer extends AEBaseContainer {
}
private class QuartzKniveSlot extends OutputSlot {
QuartzKniveSlot(IItemHandler a, int b, int c, int d, int i) {
QuartzKniveSlot(ItemTransferable a, int b, int c, int d, int i) {
super(a, b, c, d, i);
}
@Override
public ItemStack getStack() {
final IItemHandler baseInv = this.getItemHandler();
final ItemTransferable baseInv = this.getItemHandler();
final ItemStack input = baseInv.getStackInSlot(0);
if (input == ItemStack.EMPTY) {
return ItemStack.EMPTY;
@@ -23,8 +23,8 @@ import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.container.ContainerType;
import net.minecraft.inventory.container.IContainerListener;
import net.minecraft.item.ItemStack;
import net.minecraft.network.PacketBuffer;
import net.minecraftforge.items.IItemHandler;
import net.minecraft.network.PacketByteBuf;
import alexiil.mc.lib.attributes.item.ItemTransferable;
import appeng.api.AEApi;
import appeng.api.config.SecurityPermissions;
@@ -74,7 +74,7 @@ public class SecurityStationContainer extends MEMonitorableContainer implements
this.bindPlayerInventory(ip, 0, 0);
}
public static SecurityStationContainer fromNetwork(int windowId, PlayerInventory inv, PacketBuffer buf) {
public static SecurityStationContainer fromNetwork(int windowId, PlayerInventory inv, PacketByteBuf buf) {
return helper.fromNetwork(windowId, inv, buf);
}
@@ -139,8 +139,8 @@ public class SecurityStationContainer extends MEMonitorableContainer implements
}
@Override
public void onChangeInventory(final IItemHandler inv, final int slot, final InvOperation mc,
final ItemStack removedStack, final ItemStack newStack) {
public void onChangeInventory(final ItemTransferable inv, final int slot, final InvOperation mc,
final ItemStack removedStack, final ItemStack newStack) {
if (!this.wirelessOut.getHasStack()) {
if (this.wirelessIn.getHasStack()) {
final ItemStack term = this.wirelessIn.getStack().copy();
@@ -21,7 +21,7 @@ package appeng.container.implementations;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.container.ContainerType;
import net.minecraft.network.PacketBuffer;
import net.minecraft.network.PacketByteBuf;
import appeng.container.AEBaseContainer;
import appeng.container.ContainerLocator;
@@ -52,7 +52,7 @@ public class SkyChestContainer extends AEBaseContainer {
this.bindPlayerInventory(ip, 0, 195 - /* height of player inventory */82);
}
public static SkyChestContainer fromNetwork(int windowId, PlayerInventory inv, PacketBuffer buf) {
public static SkyChestContainer fromNetwork(int windowId, PlayerInventory inv, PacketByteBuf buf) {
return helper.fromNetwork(windowId, inv, buf);
}
@@ -21,7 +21,7 @@ package appeng.container.implementations;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.container.ContainerType;
import net.minecraft.network.PacketBuffer;
import net.minecraft.network.PacketByteBuf;
import appeng.api.config.SecurityPermissions;
import appeng.api.networking.IGrid;
@@ -77,7 +77,7 @@ public class SpatialIOPortContainer extends AEBaseContainer {
this.bindPlayerInventory(ip, 0, 197 - /* height of player inventory */82);
}
public static SpatialIOPortContainer fromNetwork(int windowId, PlayerInventory inv, PacketBuffer buf) {
public static SpatialIOPortContainer fromNetwork(int windowId, PlayerInventory inv, PacketByteBuf buf) {
return helper.fromNetwork(windowId, inv, buf);
}
@@ -20,12 +20,12 @@ package appeng.container.implementations;
import java.util.Iterator;
import alexiil.mc.lib.attributes.item.ItemTransferable;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.container.ContainerType;
import net.minecraft.item.ItemStack;
import net.minecraft.network.PacketBuffer;
import net.minecraftforge.items.IItemHandler;
import net.minecraft.network.PacketByteBuf;
import appeng.api.AEApi;
import appeng.api.config.AccessRestriction;
@@ -55,7 +55,7 @@ public class StorageBusContainer extends UpgradeableContainer {
private static final ContainerHelper<StorageBusContainer, StorageBusPart> helper = new ContainerHelper<>(
StorageBusContainer::new, StorageBusPart.class, SecurityPermissions.BUILD);
public static StorageBusContainer fromNetwork(int windowId, PlayerInventory inv, PacketBuffer buf) {
public static StorageBusContainer fromNetwork(int windowId, PlayerInventory inv, PacketByteBuf buf) {
return helper.fromNetwork(windowId, inv, buf);
}
@@ -86,7 +86,7 @@ public class StorageBusContainer extends UpgradeableContainer {
final int xo = 8;
final int yo = 23 + 6;
final IItemHandler config = this.getUpgradeable().getInventoryByName("config");
final ItemTransferable config = this.getUpgradeable().getInventoryByName("config");
for (int y = 0; y < 7; y++) {
for (int x = 0; x < 9; x++) {
if (y < 2) {
@@ -97,7 +97,7 @@ public class StorageBusContainer extends UpgradeableContainer {
}
}
final IItemHandler upgrades = this.getUpgradeable().getInventoryByName("upgrades");
final ItemTransferable upgrades = this.getUpgradeable().getInventoryByName("upgrades");
this.addSlot((new RestrictedInputSlot(RestrictedInputSlot.PlacableItemType.UPGRADES, upgrades, 0, 187, 8,
this.getPlayerInventory())).setNotDraggable());
this.addSlot((new RestrictedInputSlot(RestrictedInputSlot.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18,
@@ -148,7 +148,7 @@ public class StorageBusContainer extends UpgradeableContainer {
}
public void partition() {
final IItemHandler inv = this.getUpgradeable().getInventoryByName("config");
final ItemTransferable inv = this.getUpgradeable().getInventoryByName("config");
final IMEInventory<IAEItemStack> cellInv = this.storageBus.getInternalHandler();
@@ -18,16 +18,16 @@
package appeng.container.implementations;
import net.minecraft.block.entity.BlockEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.container.ContainerType;
import net.minecraft.item.ItemStack;
import net.minecraft.network.PacketBuffer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.network.PacketByteBuf;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.items.IItemHandler;
import alexiil.mc.lib.attributes.item.ItemTransferable;
import appeng.api.config.FuzzyMode;
import appeng.api.config.RedstoneMode;
@@ -60,7 +60,7 @@ public class UpgradeableContainer extends AEBaseContainer implements IOptionalSl
private static final ContainerHelper<UpgradeableContainer, IUpgradeableHost> helper = new ContainerHelper<>(
UpgradeableContainer::new, IUpgradeableHost.class, SecurityPermissions.BUILD);
public static UpgradeableContainer fromNetwork(int windowId, PlayerInventory inv, PacketBuffer buf) {
public static UpgradeableContainer fromNetwork(int windowId, PlayerInventory inv, PacketByteBuf buf) {
return helper.fromNetwork(windowId, inv, buf);
}
@@ -86,7 +86,7 @@ public class UpgradeableContainer extends AEBaseContainer implements IOptionalSl
public UpgradeableContainer(ContainerType<?> containerType, int id, final PlayerInventory ip,
final IUpgradeableHost te) {
super(containerType, id, ip, (TileEntity) (te instanceof TileEntity ? te : null),
super(containerType, id, ip, (BlockEntity) (te instanceof BlockEntity ? te : null),
(IPart) (te instanceof IPart ? te : null));
this.upgradeable = te;
@@ -95,8 +95,8 @@ public class UpgradeableContainer extends AEBaseContainer implements IOptionalSl
int yCoord = 0;
int zCoord = 0;
if (te instanceof TileEntity) {
final TileEntity myTile = (TileEntity) te;
if (te instanceof BlockEntity) {
final BlockEntity myTile = (BlockEntity) te;
w = myTile.getWorld();
xCoord = myTile.getPos().getX();
yCoord = myTile.getPos().getY();
@@ -104,7 +104,7 @@ public class UpgradeableContainer extends AEBaseContainer implements IOptionalSl
}
if (te instanceof IPart) {
final TileEntity mk = te.getTile();
final BlockEntity mk = te.getTile();
w = mk.getWorld();
xCoord = mk.getPos().getX();
yCoord = mk.getPos().getY();
@@ -149,7 +149,7 @@ public class UpgradeableContainer extends AEBaseContainer implements IOptionalSl
protected void setupConfig() {
this.setupUpgrades();
final IItemHandler inv = this.getUpgradeable().getInventoryByName("config");
final ItemTransferable inv = this.getUpgradeable().getInventoryByName("config");
final int y = 40;
final int x = 80;
this.addSlot(new FakeTypeOnlySlot(inv, 0, x, y));
@@ -168,7 +168,7 @@ public class UpgradeableContainer extends AEBaseContainer implements IOptionalSl
}
protected void setupUpgrades() {
final IItemHandler upgrades = this.getUpgradeable().getInventoryByName("upgrades");
final ItemTransferable upgrades = this.getUpgradeable().getInventoryByName("upgrades");
if (this.availableUpgrades() > 0) {
this.addSlot((new RestrictedInputSlot(RestrictedInputSlot.PlacableItemType.UPGRADES, upgrades, 0, 187, 8,
this.getPlayerInventory())).setNotDraggable());
@@ -21,7 +21,7 @@ package appeng.container.implementations;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.container.ContainerType;
import net.minecraft.network.PacketBuffer;
import net.minecraft.network.PacketByteBuf;
import appeng.container.AEBaseContainer;
import appeng.container.ContainerLocator;
@@ -38,7 +38,7 @@ public class VibrationChamberContainer extends AEBaseContainer implements IProgr
private static final ContainerHelper<VibrationChamberContainer, VibrationChamberTileEntity> helper = new ContainerHelper<>(
VibrationChamberContainer::new, VibrationChamberTileEntity.class);
public static VibrationChamberContainer fromNetwork(int windowId, PlayerInventory inv, PacketBuffer buf) {
public static VibrationChamberContainer fromNetwork(int windowId, PlayerInventory inv, PacketByteBuf buf) {
return helper.fromNetwork(windowId, inv, buf);
}
@@ -21,7 +21,7 @@ package appeng.container.implementations;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.container.ContainerType;
import net.minecraft.network.PacketBuffer;
import net.minecraft.network.PacketByteBuf;
import appeng.api.config.SecurityPermissions;
import appeng.container.AEBaseContainer;
@@ -38,7 +38,7 @@ public class WirelessContainer extends AEBaseContainer {
private static final ContainerHelper<WirelessContainer, WirelessTileEntity> helper = new ContainerHelper<>(
WirelessContainer::new, WirelessTileEntity.class, SecurityPermissions.BUILD);
public static WirelessContainer fromNetwork(int windowId, PlayerInventory inv, PacketBuffer buf) {
public static WirelessContainer fromNetwork(int windowId, PlayerInventory inv, PacketByteBuf buf) {
return helper.fromNetwork(windowId, inv, buf);
}
@@ -21,7 +21,7 @@ package appeng.container.implementations;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.container.ContainerType;
import net.minecraft.network.PacketBuffer;
import net.minecraft.network.PacketByteBuf;
import appeng.container.ContainerLocator;
import appeng.core.AEConfig;
@@ -36,7 +36,7 @@ public class WirelessTermContainer extends MEPortableCellContainer {
private static final ContainerHelper<WirelessTermContainer, WirelessTerminalGuiObject> helper = new ContainerHelper<>(
WirelessTermContainer::new, WirelessTerminalGuiObject.class);
public static WirelessTermContainer fromNetwork(int windowId, PlayerInventory inv, PacketBuffer buf) {
public static WirelessTermContainer fromNetwork(int windowId, PlayerInventory inv, PacketByteBuf buf) {
return helper.fromNetwork(windowId, inv, buf);
}