Added spotless back and reformatted
This commit is contained in:
@@ -20,15 +20,16 @@ package appeng.container.implementations;
|
||||
|
||||
import java.util.Iterator;
|
||||
|
||||
import alexiil.mc.lib.attributes.item.FixedItemInv;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.network.PacketByteBuf;
|
||||
import net.minecraft.screen.ScreenHandlerListener;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
import net.minecraft.screen.slot.Slot;
|
||||
import net.minecraft.server.network.ServerPlayerEntity;
|
||||
import net.minecraft.screen.ScreenHandlerListener;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.network.PacketByteBuf;
|
||||
|
||||
import alexiil.mc.lib.attributes.item.FixedItemInv;
|
||||
import alexiil.mc.lib.attributes.item.impl.EmptyFixedItemInv;
|
||||
|
||||
import appeng.api.config.CopyMode;
|
||||
|
||||
@@ -20,8 +20,8 @@ package appeng.container.implementations;
|
||||
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
import net.minecraft.network.PacketByteBuf;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
|
||||
import appeng.api.config.SecurityPermissions;
|
||||
import appeng.container.AEBaseContainer;
|
||||
|
||||
@@ -20,8 +20,9 @@ package appeng.container.implementations;
|
||||
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
import net.minecraft.network.PacketByteBuf;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
|
||||
import alexiil.mc.lib.attributes.item.FixedItemInv;
|
||||
|
||||
import appeng.api.config.CondenserOutput;
|
||||
|
||||
@@ -1,17 +1,19 @@
|
||||
package appeng.container.implementations;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.fabricmc.fabric.api.screenhandler.v1.ExtendedScreenHandlerFactory;
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.screen.ScreenHandler;
|
||||
import net.minecraft.server.network.ServerPlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.network.PacketByteBuf;
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.screen.ScreenHandler;
|
||||
import net.minecraft.server.network.ServerPlayerEntity;
|
||||
import net.minecraft.text.LiteralText;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.text.TranslatableText;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.config.SecurityPermissions;
|
||||
@@ -28,8 +30,6 @@ import appeng.helpers.ICustomNameObject;
|
||||
import appeng.helpers.WirelessTerminalGuiObject;
|
||||
import appeng.util.Platform;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
/**
|
||||
* Helper for containers that can be opened for a part <em>or</em> tile given
|
||||
* that either implements a given interface.
|
||||
@@ -142,8 +142,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 TranslatableText(
|
||||
world.getBlockState(locator.getBlockPos()).getBlock().getTranslationKey());
|
||||
return new TranslatableText(world.getBlockState(locator.getBlockPos()).getBlock().getTranslationKey());
|
||||
}
|
||||
|
||||
return new LiteralText("Unknown");
|
||||
|
||||
@@ -22,9 +22,9 @@ import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.network.PacketByteBuf;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
import net.minecraft.screen.slot.Slot;
|
||||
import net.minecraft.network.PacketByteBuf;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.config.SecurityPermissions;
|
||||
|
||||
@@ -29,12 +29,12 @@ import com.google.common.collect.ImmutableSet;
|
||||
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.network.PacketByteBuf;
|
||||
import net.minecraft.screen.ScreenHandlerListener;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
import net.minecraft.server.network.ServerPlayerEntity;
|
||||
import net.minecraft.network.PacketByteBuf;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.text.LiteralText;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.util.Util;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
||||
@@ -22,10 +22,10 @@ import java.io.IOException;
|
||||
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.network.PacketByteBuf;
|
||||
import net.minecraft.screen.ScreenHandlerListener;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
import net.minecraft.server.network.ServerPlayerEntity;
|
||||
import net.minecraft.network.PacketByteBuf;
|
||||
import net.minecraft.text.Text;
|
||||
|
||||
import appeng.api.config.SecurityPermissions;
|
||||
|
||||
@@ -26,8 +26,8 @@ import com.google.common.collect.ImmutableSet;
|
||||
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
import net.minecraft.network.PacketByteBuf;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
import net.minecraft.text.Text;
|
||||
|
||||
import appeng.api.config.SecurityPermissions;
|
||||
|
||||
@@ -18,19 +18,20 @@
|
||||
|
||||
package appeng.container.implementations;
|
||||
|
||||
import alexiil.mc.lib.attributes.item.FixedItemInv;
|
||||
import alexiil.mc.lib.attributes.item.compat.FixedInventoryVanillaWrapper;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.inventory.CraftingInventory;
|
||||
import net.minecraft.inventory.Inventory;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.network.PacketByteBuf;
|
||||
import net.minecraft.recipe.Recipe;
|
||||
import net.minecraft.recipe.RecipeType;
|
||||
import net.minecraft.network.PacketByteBuf;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import alexiil.mc.lib.attributes.item.FixedItemInv;
|
||||
import alexiil.mc.lib.attributes.item.compat.FixedInventoryVanillaWrapper;
|
||||
|
||||
import appeng.api.config.SecurityPermissions;
|
||||
import appeng.api.storage.ITerminalHost;
|
||||
import appeng.container.ContainerLocator;
|
||||
@@ -121,7 +122,7 @@ public class CraftingTermContainer extends MEMonitorableContainer
|
||||
|
||||
@Override
|
||||
public void onChangeInventory(final FixedItemInv inv, final int slot, final InvOperation mc,
|
||||
final ItemStack removedStack, final ItemStack newStack) {
|
||||
final ItemStack removedStack, final ItemStack newStack) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -20,8 +20,8 @@ package appeng.container.implementations;
|
||||
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
import net.minecraft.network.PacketByteBuf;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
|
||||
import appeng.container.AEBaseContainer;
|
||||
import appeng.container.ContainerLocator;
|
||||
|
||||
@@ -18,11 +18,12 @@
|
||||
|
||||
package appeng.container.implementations;
|
||||
|
||||
import alexiil.mc.lib.attributes.item.FixedItemInv;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
import net.minecraft.network.PacketByteBuf;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
|
||||
import alexiil.mc.lib.attributes.item.FixedItemInv;
|
||||
|
||||
import appeng.api.config.FuzzyMode;
|
||||
import appeng.api.config.SecurityPermissions;
|
||||
|
||||
@@ -20,8 +20,9 @@ package appeng.container.implementations;
|
||||
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
import net.minecraft.network.PacketByteBuf;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
|
||||
import alexiil.mc.lib.attributes.item.FixedItemInv;
|
||||
|
||||
import appeng.container.AEBaseContainer;
|
||||
|
||||
@@ -18,11 +18,12 @@
|
||||
|
||||
package appeng.container.implementations;
|
||||
|
||||
import alexiil.mc.lib.attributes.item.FixedItemInv;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
import net.minecraft.network.PacketByteBuf;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
|
||||
import alexiil.mc.lib.attributes.item.FixedItemInv;
|
||||
|
||||
import appeng.api.config.FullnessMode;
|
||||
import appeng.api.config.OperationMode;
|
||||
|
||||
@@ -20,10 +20,11 @@ package appeng.container.implementations;
|
||||
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
import net.minecraft.screen.slot.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.network.PacketByteBuf;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
import net.minecraft.screen.slot.Slot;
|
||||
|
||||
import alexiil.mc.lib.attributes.item.FixedItemInv;
|
||||
|
||||
import appeng.api.definitions.IItemDefinition;
|
||||
@@ -33,8 +34,8 @@ import appeng.container.interfaces.IProgressProvider;
|
||||
import appeng.container.slot.OutputSlot;
|
||||
import appeng.container.slot.RestrictedInputSlot;
|
||||
import appeng.core.Api;
|
||||
import appeng.tile.misc.InscriberRecipes;
|
||||
import appeng.tile.misc.InscriberBlockEntity;
|
||||
import appeng.tile.misc.InscriberRecipes;
|
||||
import appeng.util.Platform;
|
||||
|
||||
/**
|
||||
|
||||
@@ -20,8 +20,8 @@ package appeng.container.implementations;
|
||||
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
import net.minecraft.network.PacketByteBuf;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
|
||||
import appeng.api.config.SecurityPermissions;
|
||||
import appeng.api.config.Settings;
|
||||
|
||||
@@ -25,12 +25,13 @@ import java.util.Map.Entry;
|
||||
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
import net.minecraft.server.network.ServerPlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.network.PacketByteBuf;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
import net.minecraft.server.network.ServerPlayerEntity;
|
||||
import net.minecraft.text.Text;
|
||||
|
||||
import alexiil.mc.lib.attributes.item.FixedItemInv;
|
||||
|
||||
import appeng.api.config.SecurityPermissions;
|
||||
@@ -195,8 +196,8 @@ public final class InterfaceTerminalContainer extends AEBaseContainer {
|
||||
|
||||
final InventoryAdaptor playerHand = new AdaptorFixedInv(new WrapperCursorItemHandler(player.inventory));
|
||||
|
||||
final FixedItemInv theSlot = new WrapperFilteredItemHandler(
|
||||
inv.server.getSubInv(slot, slot + 1), new PatternSlotFilter());
|
||||
final FixedItemInv theSlot = new WrapperFilteredItemHandler(inv.server.getSubInv(slot, slot + 1),
|
||||
new PatternSlotFilter());
|
||||
final InventoryAdaptor interfaceSlot = new AdaptorFixedInv(theSlot);
|
||||
|
||||
switch (action) {
|
||||
@@ -259,8 +260,7 @@ public final class InterfaceTerminalContainer extends AEBaseContainer {
|
||||
|
||||
final InventoryAdaptor playerInvAd = InventoryAdaptor.getAdaptor(player);
|
||||
for (int x = 0; x < inv.server.getSlotCount(); x++) {
|
||||
ItemHandlerUtil.setStackInSlot(inv.server, x,
|
||||
playerInvAd.addItems(inv.server.getInvStack(x)));
|
||||
ItemHandlerUtil.setStackInSlot(inv.server, x, playerInvAd.addItems(inv.server.getInvStack(x)));
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
@@ -18,14 +18,15 @@
|
||||
|
||||
package appeng.container.implementations;
|
||||
|
||||
import alexiil.mc.lib.attributes.item.FixedItemInv;
|
||||
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.screen.ScreenHandlerType;
|
||||
import net.minecraft.network.PacketByteBuf;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
|
||||
import alexiil.mc.lib.attributes.item.FixedItemInv;
|
||||
|
||||
import appeng.api.config.FuzzyMode;
|
||||
import appeng.api.config.LevelType;
|
||||
|
||||
@@ -23,14 +23,14 @@ import java.nio.BufferOverflowException;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.network.PacketByteBuf;
|
||||
import net.minecraft.screen.ScreenHandlerListener;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
import net.minecraft.server.network.ServerPlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.network.PacketByteBuf;
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
|
||||
import appeng.api.config.Actionable;
|
||||
import appeng.api.config.PowerMultiplier;
|
||||
@@ -110,7 +110,7 @@ public class MEMonitorableContainer extends AEBaseContainer
|
||||
}
|
||||
|
||||
public MEMonitorableContainer(ScreenHandlerType<?> containerType, int id, PlayerInventory ip,
|
||||
final ITerminalHost monitorable, final boolean bindInventory) {
|
||||
final ITerminalHost monitorable, final boolean bindInventory) {
|
||||
super(containerType, id, ip, monitorable instanceof BlockEntity ? (BlockEntity) monitorable : null,
|
||||
monitorable instanceof IPart ? (IPart) monitorable : null,
|
||||
monitorable instanceof IGuiItemObject ? (IGuiItemObject) monitorable : null);
|
||||
|
||||
@@ -20,9 +20,9 @@ package appeng.container.implementations;
|
||||
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.network.PacketByteBuf;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
|
||||
import appeng.api.config.Actionable;
|
||||
import appeng.api.config.PowerMultiplier;
|
||||
@@ -56,7 +56,7 @@ public class MEPortableCellContainer extends MEMonitorableContainer {
|
||||
}
|
||||
|
||||
protected MEPortableCellContainer(ScreenHandlerType<? extends MEPortableCellContainer> type, int id,
|
||||
final PlayerInventory ip, final IPortableCell monitorable) {
|
||||
final PlayerInventory ip, final IPortableCell monitorable) {
|
||||
super(type, id, ip, monitorable, false);
|
||||
if (monitorable instanceof IInventorySlotAware) {
|
||||
final int slotIndex = ((IInventorySlotAware) monitorable).getInventorySlot();
|
||||
|
||||
@@ -18,15 +18,16 @@
|
||||
|
||||
package appeng.container.implementations;
|
||||
|
||||
import alexiil.mc.lib.attributes.item.FixedItemInv;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
import net.minecraft.screen.slot.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.network.PacketByteBuf;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
import net.minecraft.screen.slot.Slot;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import alexiil.mc.lib.attributes.item.FixedItemInv;
|
||||
|
||||
import appeng.api.config.RedstoneMode;
|
||||
import appeng.api.config.SecurityPermissions;
|
||||
import appeng.api.config.Settings;
|
||||
|
||||
@@ -22,10 +22,10 @@ import java.io.IOException;
|
||||
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
import net.minecraft.server.network.ServerPlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.network.PacketByteBuf;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
import net.minecraft.server.network.ServerPlayerEntity;
|
||||
|
||||
import appeng.api.implementations.guiobjects.INetworkTool;
|
||||
import appeng.api.networking.IGrid;
|
||||
|
||||
@@ -20,10 +20,10 @@ package appeng.container.implementations;
|
||||
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.network.PacketByteBuf;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
|
||||
import appeng.api.implementations.guiobjects.INetworkTool;
|
||||
import appeng.container.AEBaseContainer;
|
||||
@@ -80,8 +80,7 @@ public class NetworkToolContainer extends AEBaseContainer {
|
||||
if (currentItem != this.toolInv.getItemStack()) {
|
||||
if (!currentItem.isEmpty()) {
|
||||
if (ItemStack.areItemsEqual(this.toolInv.getItemStack(), currentItem)) {
|
||||
this.getPlayerInv().setStack(this.getPlayerInv().selectedSlot,
|
||||
this.toolInv.getItemStack());
|
||||
this.getPlayerInv().setStack(this.getPlayerInv().selectedSlot, this.toolInv.getItemStack());
|
||||
} else {
|
||||
this.setValidContainer(false);
|
||||
}
|
||||
|
||||
@@ -21,28 +21,28 @@ package appeng.container.implementations;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import alexiil.mc.lib.attributes.item.FixedItemInv;
|
||||
import alexiil.mc.lib.attributes.item.compat.FixedInventoryVanillaWrapper;
|
||||
import appeng.mixins.SlotMixin;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.inventory.CraftingResultInventory;
|
||||
import net.minecraft.nbt.Tag;
|
||||
import net.minecraft.recipe.CraftingRecipe;
|
||||
import net.minecraft.recipe.Recipe;
|
||||
import net.minecraft.recipe.RecipeType;
|
||||
import net.minecraft.screen.slot.CraftingResultSlot;
|
||||
import net.minecraft.screen.slot.Slot;
|
||||
import net.minecraft.server.network.ServerPlayerEntity;
|
||||
import net.minecraft.inventory.CraftingInventory;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
import net.minecraft.screen.ScreenHandlerListener;
|
||||
import net.minecraft.inventory.CraftingResultInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.nbt.ListTag;
|
||||
import net.minecraft.nbt.Tag;
|
||||
import net.minecraft.network.PacketByteBuf;
|
||||
import net.minecraft.recipe.CraftingRecipe;
|
||||
import net.minecraft.recipe.Recipe;
|
||||
import net.minecraft.recipe.RecipeType;
|
||||
import net.minecraft.screen.ScreenHandlerListener;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
import net.minecraft.screen.slot.CraftingResultSlot;
|
||||
import net.minecraft.screen.slot.Slot;
|
||||
import net.minecraft.server.network.ServerPlayerEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import alexiil.mc.lib.attributes.item.FixedItemInv;
|
||||
import alexiil.mc.lib.attributes.item.compat.FixedInventoryVanillaWrapper;
|
||||
|
||||
import appeng.api.config.Actionable;
|
||||
import appeng.api.config.SecurityPermissions;
|
||||
import appeng.api.crafting.ICraftingHelper;
|
||||
@@ -66,6 +66,7 @@ import appeng.core.sync.packets.PatternSlotPacket;
|
||||
import appeng.helpers.IContainerCraftingPacket;
|
||||
import appeng.items.storage.ViewCellItem;
|
||||
import appeng.me.helpers.MachineSource;
|
||||
import appeng.mixins.SlotMixin;
|
||||
import appeng.parts.reporting.PatternTerminalPart;
|
||||
import appeng.tile.inventory.AppEngInternalInventory;
|
||||
import appeng.util.InventoryAdaptor;
|
||||
@@ -165,7 +166,6 @@ public class PatternTermContainer extends MEMonitorableContainer
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void setStackInSlot(int slotID, ItemStack stack) {
|
||||
super.setStackInSlot(slotID, stack);
|
||||
@@ -203,7 +203,7 @@ public class PatternTermContainer extends MEMonitorableContainer
|
||||
|
||||
@Override
|
||||
public void onChangeInventory(final FixedItemInv inv, final int slot, final InvOperation mc,
|
||||
final ItemStack removedStack, final ItemStack newStack) {
|
||||
final ItemStack removedStack, final ItemStack newStack) {
|
||||
|
||||
}
|
||||
|
||||
@@ -341,8 +341,8 @@ public class PatternTermContainer extends MEMonitorableContainer
|
||||
: packetPatternSlot.pattern[x].createItemStack());
|
||||
}
|
||||
|
||||
final Recipe<CraftingInventory> r = p.world.getRecipeManager().getFirstMatch(RecipeType.CRAFTING, ic, p.world)
|
||||
.orElse(null);
|
||||
final Recipe<CraftingInventory> r = p.world.getRecipeManager()
|
||||
.getFirstMatch(RecipeType.CRAFTING, ic, p.world).orElse(null);
|
||||
|
||||
if (r == null) {
|
||||
return;
|
||||
|
||||
@@ -18,14 +18,14 @@
|
||||
|
||||
package appeng.container.implementations;
|
||||
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
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.screen.ScreenHandlerType;
|
||||
import net.minecraft.network.PacketByteBuf;
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
|
||||
import appeng.api.config.SecurityPermissions;
|
||||
import appeng.api.parts.IPart;
|
||||
|
||||
@@ -20,8 +20,8 @@ package appeng.container.implementations;
|
||||
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
import net.minecraft.network.PacketByteBuf;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
|
||||
import appeng.api.config.SecurityPermissions;
|
||||
import appeng.container.AEBaseContainer;
|
||||
|
||||
@@ -20,13 +20,14 @@ package appeng.container.implementations;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import alexiil.mc.lib.attributes.item.FixedItemInv;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.network.PacketByteBuf;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
|
||||
import alexiil.mc.lib.attributes.item.FixedItemInv;
|
||||
|
||||
import appeng.container.AEBaseContainer;
|
||||
import appeng.container.ContainerLocator;
|
||||
@@ -82,8 +83,7 @@ public class QuartzKnifeContainer extends AEBaseContainer {
|
||||
if (currentItem != this.toolInv.getItemStack()) {
|
||||
if (!currentItem.isEmpty()) {
|
||||
if (ItemStack.areItemsEqual(this.toolInv.getItemStack(), currentItem)) {
|
||||
this.getPlayerInv().setStack(this.getPlayerInv().selectedSlot,
|
||||
this.toolInv.getItemStack());
|
||||
this.getPlayerInv().setStack(this.getPlayerInv().selectedSlot, this.toolInv.getItemStack());
|
||||
} else {
|
||||
this.setValidContainer(false);
|
||||
}
|
||||
@@ -147,11 +147,11 @@ public class QuartzKnifeContainer extends AEBaseContainer {
|
||||
final ItemStack item = QuartzKnifeContainer.this.toolInv.getItemStack();
|
||||
final ItemStack before = item.copy();
|
||||
item.damage(1, QuartzKnifeContainer.this.getPlayerInv().player, p -> {
|
||||
QuartzKnifeContainer.this.getPlayerInv().setStack(
|
||||
QuartzKnifeContainer.this.getPlayerInv().selectedSlot, ItemStack.EMPTY);
|
||||
QuartzKnifeContainer.this.getPlayerInv()
|
||||
.setStack(QuartzKnifeContainer.this.getPlayerInv().selectedSlot, ItemStack.EMPTY);
|
||||
// FIXME FABRIC equivalent??
|
||||
// FIXME FABRIC MinecraftForge.EVENT_BUS.post(new PlayerDestroyItemEvent(
|
||||
// FIXME FABRIC QuartzKnifeContainer.this.getPlayerInv().player, before, null));
|
||||
// FIXME FABRIC QuartzKnifeContainer.this.getPlayerInv().player, before, null));
|
||||
});
|
||||
|
||||
QuartzKnifeContainer.this.sendContentUpdates();
|
||||
|
||||
@@ -20,10 +20,11 @@ package appeng.container.implementations;
|
||||
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.screen.ScreenHandlerListener;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.network.PacketByteBuf;
|
||||
import net.minecraft.screen.ScreenHandlerListener;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
|
||||
import alexiil.mc.lib.attributes.item.FixedItemInv;
|
||||
|
||||
import appeng.api.config.SecurityPermissions;
|
||||
@@ -140,7 +141,7 @@ public class SecurityStationContainer extends MEMonitorableContainer implements
|
||||
|
||||
@Override
|
||||
public void onChangeInventory(final FixedItemInv inv, final int slot, final InvOperation mc,
|
||||
final ItemStack removedStack, final ItemStack newStack) {
|
||||
final ItemStack removedStack, final ItemStack newStack) {
|
||||
if (!this.wirelessOut.hasStack()) {
|
||||
if (this.wirelessIn.hasStack()) {
|
||||
final ItemStack term = this.wirelessIn.getStack().copy();
|
||||
|
||||
@@ -20,8 +20,8 @@ package appeng.container.implementations;
|
||||
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
import net.minecraft.network.PacketByteBuf;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
|
||||
import appeng.container.AEBaseContainer;
|
||||
import appeng.container.ContainerLocator;
|
||||
|
||||
@@ -20,8 +20,8 @@ package appeng.container.implementations;
|
||||
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
import net.minecraft.network.PacketByteBuf;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
|
||||
import appeng.api.config.SecurityPermissions;
|
||||
import appeng.api.networking.IGrid;
|
||||
|
||||
@@ -20,12 +20,13 @@ package appeng.container.implementations;
|
||||
|
||||
import java.util.Iterator;
|
||||
|
||||
import alexiil.mc.lib.attributes.item.FixedItemInv;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.network.PacketByteBuf;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
|
||||
import alexiil.mc.lib.attributes.item.FixedItemInv;
|
||||
|
||||
import appeng.api.config.AccessRestriction;
|
||||
import appeng.api.config.FuzzyMode;
|
||||
|
||||
@@ -22,11 +22,12 @@ import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.inventory.Inventory;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.network.PacketByteBuf;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import alexiil.mc.lib.attributes.item.FixedItemInv;
|
||||
|
||||
import appeng.api.config.FuzzyMode;
|
||||
@@ -85,7 +86,7 @@ public class UpgradeableContainer extends AEBaseContainer implements IOptionalSl
|
||||
}
|
||||
|
||||
public UpgradeableContainer(ScreenHandlerType<?> containerType, int id, final PlayerInventory ip,
|
||||
final IUpgradeableHost te) {
|
||||
final IUpgradeableHost te) {
|
||||
super(containerType, id, ip, (BlockEntity) (te instanceof BlockEntity ? te : null),
|
||||
(IPart) (te instanceof IPart ? te : null));
|
||||
this.upgradeable = te;
|
||||
|
||||
@@ -20,8 +20,8 @@ package appeng.container.implementations;
|
||||
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
import net.minecraft.network.PacketByteBuf;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
|
||||
import appeng.container.AEBaseContainer;
|
||||
import appeng.container.ContainerLocator;
|
||||
|
||||
@@ -20,8 +20,8 @@ package appeng.container.implementations;
|
||||
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
import net.minecraft.network.PacketByteBuf;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
|
||||
import appeng.api.config.SecurityPermissions;
|
||||
import appeng.container.AEBaseContainer;
|
||||
|
||||
@@ -20,15 +20,15 @@ package appeng.container.implementations;
|
||||
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
import net.minecraft.network.PacketByteBuf;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
import net.minecraft.util.Util;
|
||||
|
||||
import appeng.container.ContainerLocator;
|
||||
import appeng.core.AEConfig;
|
||||
import appeng.core.localization.PlayerMessages;
|
||||
import appeng.helpers.WirelessTerminalGuiObject;
|
||||
import appeng.util.Platform;
|
||||
import net.minecraft.util.Util;
|
||||
|
||||
public class WirelessTermContainer extends MEPortableCellContainer {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user