API compiles
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
|
||||
package appeng.container.slot;
|
||||
|
||||
import alexiil.mc.lib.attributes.item.ItemTransferable;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.inventory.CraftingInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -25,7 +26,6 @@ import net.minecraft.item.crafting.IRecipeType;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.hooks.BasicEventHooks;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
|
||||
import appeng.util.helpers.ItemHandlerUtil;
|
||||
import appeng.util.inv.WrapperInvItemHandler;
|
||||
@@ -35,7 +35,7 @@ public class AppEngCraftingSlot extends AppEngSlot {
|
||||
/**
|
||||
* The craft matrix inventory linked to this result slot.
|
||||
*/
|
||||
private final IItemHandler craftMatrix;
|
||||
private final ItemTransferable craftMatrix;
|
||||
|
||||
/**
|
||||
* The player that is using the GUI where this slot resides.
|
||||
@@ -48,8 +48,8 @@ public class AppEngCraftingSlot extends AppEngSlot {
|
||||
*/
|
||||
private int amountCrafted;
|
||||
|
||||
public AppEngCraftingSlot(final PlayerEntity par1PlayerEntity, final IItemHandler par2IInventory,
|
||||
final IItemHandler par3IInventory, final int par4, final int par5, final int par6) {
|
||||
public AppEngCraftingSlot(final PlayerEntity par1PlayerEntity, final ItemTransferable par2IInventory,
|
||||
final ItemTransferable par3IInventory, final int par4, final int par5, final int par6) {
|
||||
super(par3IInventory, par4, par5, par6);
|
||||
this.thePlayer = par1PlayerEntity;
|
||||
this.craftMatrix = par2IInventory;
|
||||
|
||||
@@ -20,21 +20,21 @@ package appeng.container.slot;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import alexiil.mc.lib.attributes.item.ItemTransferable;
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.inventory.Inventory;
|
||||
import net.minecraft.inventory.container.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
|
||||
import appeng.container.AEBaseContainer;
|
||||
import appeng.util.helpers.ItemHandlerUtil;
|
||||
|
||||
public class AppEngSlot extends Slot {
|
||||
private static IInventory emptyInventory = new Inventory(0);
|
||||
private final IItemHandler itemHandler;
|
||||
private final ItemTransferable itemHandler;
|
||||
private final int index;
|
||||
|
||||
private final int defX;
|
||||
@@ -46,7 +46,7 @@ public class AppEngSlot extends Slot {
|
||||
private CalculatedValidity isValid;
|
||||
private boolean isDisplay = false;
|
||||
|
||||
public AppEngSlot(final IItemHandler inv, final int idx, final int x, final int y) {
|
||||
public AppEngSlot(final ItemTransferable inv, final int idx, final int x, final int y) {
|
||||
super(emptyInventory, idx, x, y);
|
||||
this.itemHandler = inv;
|
||||
this.index = idx;
|
||||
@@ -115,7 +115,7 @@ public class AppEngSlot extends Slot {
|
||||
}
|
||||
}
|
||||
|
||||
public IItemHandler getItemHandler() {
|
||||
public ItemTransferable getItemHandler() {
|
||||
return this.itemHandler;
|
||||
}
|
||||
|
||||
@@ -156,7 +156,7 @@ public class AppEngSlot extends Slot {
|
||||
}
|
||||
|
||||
@Override
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@Environment(EnvType.CLIENT)
|
||||
public boolean isEnabled() {
|
||||
return this.isSlotEnabled();
|
||||
}
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
|
||||
package appeng.container.slot;
|
||||
|
||||
import alexiil.mc.lib.attributes.item.ItemTransferable;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
|
||||
import appeng.container.AEBaseContainer;
|
||||
import appeng.util.inv.WrapperInvItemHandler;
|
||||
@@ -29,8 +29,8 @@ public class CraftingMatrixSlot extends AppEngSlot {
|
||||
private final AEBaseContainer c;
|
||||
private final IInventory wrappedInventory;
|
||||
|
||||
public CraftingMatrixSlot(final AEBaseContainer c, final IItemHandler par1iInventory, final int par2,
|
||||
final int par3, final int par4) {
|
||||
public CraftingMatrixSlot(final AEBaseContainer c, final ItemTransferable par1iInventory, final int par2,
|
||||
final int par3, final int par4) {
|
||||
super(par1iInventory, par2, par3, par4);
|
||||
this.c = c;
|
||||
this.wrappedInventory = new WrapperInvItemHandler(par1iInventory);
|
||||
|
||||
@@ -22,6 +22,7 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import alexiil.mc.lib.attributes.item.ItemTransferable;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.inventory.CraftingInventory;
|
||||
import net.minecraft.item.Item;
|
||||
@@ -31,7 +32,6 @@ import net.minecraft.item.crafting.IRecipeType;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.config.Actionable;
|
||||
@@ -57,8 +57,8 @@ import appeng.util.item.AEItemStack;
|
||||
|
||||
public class CraftingTermSlot extends AppEngCraftingSlot {
|
||||
|
||||
private final IItemHandler craftInv;
|
||||
private final IItemHandler pattern;
|
||||
private final ItemTransferable craftInv;
|
||||
private final ItemTransferable pattern;
|
||||
|
||||
private final IActionSource mySrc;
|
||||
private final IEnergySource energySrc;
|
||||
@@ -66,8 +66,8 @@ public class CraftingTermSlot extends AppEngCraftingSlot {
|
||||
private final IContainerCraftingPacket container;
|
||||
|
||||
public CraftingTermSlot(final PlayerEntity player, final IActionSource mySrc, final IEnergySource energySrc,
|
||||
final IStorageMonitorable storage, final IItemHandler cMatrix, final IItemHandler secondMatrix,
|
||||
final IItemHandler output, final int x, final int y, final IContainerCraftingPacket ccp) {
|
||||
final IStorageMonitorable storage, final ItemTransferable cMatrix, final ItemTransferable secondMatrix,
|
||||
final ItemTransferable output, final int x, final int y, final IContainerCraftingPacket ccp) {
|
||||
super(player, cMatrix, output, 0, x, y);
|
||||
this.energySrc = energySrc;
|
||||
this.storage = storage;
|
||||
@@ -77,7 +77,7 @@ public class CraftingTermSlot extends AppEngCraftingSlot {
|
||||
this.container = ccp;
|
||||
}
|
||||
|
||||
public IItemHandler getCraftingMatrix() {
|
||||
public ItemTransferable getCraftingMatrix() {
|
||||
return this.craftInv;
|
||||
}
|
||||
|
||||
@@ -286,7 +286,7 @@ public class CraftingTermSlot extends AppEngCraftingSlot {
|
||||
}
|
||||
}
|
||||
|
||||
IItemHandler getPattern() {
|
||||
ItemTransferable getPattern() {
|
||||
return this.pattern;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,11 +20,11 @@ package appeng.container.slot;
|
||||
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
import alexiil.mc.lib.attributes.item.ItemTransferable;
|
||||
|
||||
public class DisabledSlot extends AppEngSlot {
|
||||
|
||||
public DisabledSlot(final IItemHandler par1iInventory, final int slotIndex, final int x, final int y) {
|
||||
public DisabledSlot(final ItemTransferable par1iInventory, final int slotIndex, final int x, final int y) {
|
||||
super(par1iInventory, slotIndex, x, y);
|
||||
}
|
||||
|
||||
|
||||
@@ -18,11 +18,11 @@
|
||||
|
||||
package appeng.container.slot;
|
||||
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
import alexiil.mc.lib.attributes.item.ItemTransferable;
|
||||
|
||||
public class FakeBlacklistSlot extends FakeTypeOnlySlot {
|
||||
|
||||
public FakeBlacklistSlot(final IItemHandler inv, final int idx, final int x, final int y) {
|
||||
public FakeBlacklistSlot(final ItemTransferable inv, final int idx, final int x, final int y) {
|
||||
super(inv, idx, x, y);
|
||||
}
|
||||
|
||||
|
||||
@@ -18,11 +18,11 @@
|
||||
|
||||
package appeng.container.slot;
|
||||
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
import alexiil.mc.lib.attributes.item.ItemTransferable;
|
||||
|
||||
public class FakeCraftingMatrixSlot extends FakeSlot {
|
||||
|
||||
public FakeCraftingMatrixSlot(final IItemHandler inv, final int idx, final int x, final int y) {
|
||||
public FakeCraftingMatrixSlot(final ItemTransferable inv, final int idx, final int x, final int y) {
|
||||
super(inv, idx, x, y);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,13 +18,13 @@
|
||||
|
||||
package appeng.container.slot;
|
||||
|
||||
import alexiil.mc.lib.attributes.item.ItemTransferable;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
|
||||
public class FakeSlot extends AppEngSlot {
|
||||
|
||||
public FakeSlot(final IItemHandler inv, final int idx, final int x, final int y) {
|
||||
public FakeSlot(final ItemTransferable inv, final int idx, final int x, final int y) {
|
||||
super(inv, idx, x, y);
|
||||
}
|
||||
|
||||
|
||||
@@ -18,12 +18,12 @@
|
||||
|
||||
package appeng.container.slot;
|
||||
|
||||
import alexiil.mc.lib.attributes.item.ItemTransferable;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
|
||||
public class FakeTypeOnlySlot extends FakeSlot {
|
||||
|
||||
public FakeTypeOnlySlot(final IItemHandler inv, final int idx, final int x, final int y) {
|
||||
public FakeTypeOnlySlot(final ItemTransferable inv, final int idx, final int x, final int y) {
|
||||
super(inv, idx, x, y);
|
||||
}
|
||||
|
||||
|
||||
@@ -20,13 +20,13 @@ package appeng.container.slot;
|
||||
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
import alexiil.mc.lib.attributes.item.ItemTransferable;
|
||||
|
||||
public class InaccessibleSlot extends AppEngSlot {
|
||||
|
||||
private ItemStack dspStack = ItemStack.EMPTY;
|
||||
|
||||
public InaccessibleSlot(final IItemHandler i, final int slotIdx, final int x, final int y) {
|
||||
public InaccessibleSlot(final ItemTransferable i, final int slotIdx, final int x, final int y) {
|
||||
super(i, slotIdx, x, y);
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package appeng.container.slot;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
import alexiil.mc.lib.attributes.item.ItemTransferable;
|
||||
|
||||
import appeng.container.implementations.MolecularAssemblerContainer;
|
||||
|
||||
@@ -27,8 +27,8 @@ public class MolecularAssemblerPatternSlot extends AppEngSlot {
|
||||
|
||||
private final MolecularAssemblerContainer mac;
|
||||
|
||||
public MolecularAssemblerPatternSlot(final MolecularAssemblerContainer mac, final IItemHandler i, final int slotIdx,
|
||||
final int x, final int y) {
|
||||
public MolecularAssemblerPatternSlot(final MolecularAssemblerContainer mac, final ItemTransferable i, final int slotIdx,
|
||||
final int x, final int y) {
|
||||
super(i, slotIdx, x, y);
|
||||
this.mac = mac;
|
||||
}
|
||||
|
||||
@@ -18,11 +18,11 @@
|
||||
|
||||
package appeng.container.slot;
|
||||
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
import alexiil.mc.lib.attributes.item.ItemTransferable;
|
||||
|
||||
public class NormalSlot extends AppEngSlot {
|
||||
|
||||
public NormalSlot(final IItemHandler inv, final int slot, final int xPos, final int yPos) {
|
||||
public NormalSlot(final ItemTransferable inv, final int slot, final int xPos, final int yPos) {
|
||||
super(inv, slot, xPos, yPos);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ package appeng.container.slot;
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
import alexiil.mc.lib.attributes.item.ItemTransferable;
|
||||
|
||||
public class OptionalFakeSlot extends FakeSlot implements IOptionalSlot {
|
||||
|
||||
@@ -31,8 +31,8 @@ public class OptionalFakeSlot extends FakeSlot implements IOptionalSlot {
|
||||
private final IOptionalSlotHost host;
|
||||
private boolean renderDisabled = true;
|
||||
|
||||
public OptionalFakeSlot(final IItemHandler inv, final IOptionalSlotHost containerBus, final int idx, final int x,
|
||||
final int y, final int offX, final int offY, final int groupNum) {
|
||||
public OptionalFakeSlot(final ItemTransferable inv, final IOptionalSlotHost containerBus, final int idx, final int x,
|
||||
final int y, final int offX, final int offY, final int groupNum) {
|
||||
super(inv, idx, x + offX * 18, y + offY * 18);
|
||||
this.srcX = x;
|
||||
this.srcY = y;
|
||||
|
||||
@@ -18,15 +18,15 @@
|
||||
|
||||
package appeng.container.slot;
|
||||
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
import alexiil.mc.lib.attributes.item.ItemTransferable;
|
||||
|
||||
public class OptionalNormalSlot extends AppEngSlot implements IOptionalSlot {
|
||||
|
||||
private final int groupNum;
|
||||
private final IOptionalSlotHost host;
|
||||
|
||||
public OptionalNormalSlot(final IItemHandler inv, final IOptionalSlotHost containerBus, final int slot,
|
||||
final int xPos, final int yPos, final int groupNum) {
|
||||
public OptionalNormalSlot(final ItemTransferable inv, final IOptionalSlotHost containerBus, final int slot,
|
||||
final int xPos, final int yPos, final int groupNum) {
|
||||
super(inv, slot, xPos, yPos);
|
||||
this.groupNum = groupNum;
|
||||
this.host = containerBus;
|
||||
|
||||
@@ -18,16 +18,16 @@
|
||||
|
||||
package appeng.container.slot;
|
||||
|
||||
import alexiil.mc.lib.attributes.item.ItemTransferable;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
|
||||
public class OptionalRestrictedInputSlot extends RestrictedInputSlot {
|
||||
|
||||
private final int groupNum;
|
||||
private final IOptionalSlotHost host;
|
||||
|
||||
public OptionalRestrictedInputSlot(final PlacableItemType valid, final IItemHandler i, final IOptionalSlotHost host,
|
||||
final int slotIndex, final int x, final int y, final int grpNum, final PlayerInventory invPlayer) {
|
||||
public OptionalRestrictedInputSlot(final PlacableItemType valid, final ItemTransferable i, final IOptionalSlotHost host,
|
||||
final int slotIndex, final int x, final int y, final int grpNum, final PlayerInventory invPlayer) {
|
||||
super(valid, i, slotIndex, x, y, invPlayer);
|
||||
this.groupNum = grpNum;
|
||||
this.host = host;
|
||||
|
||||
@@ -19,12 +19,12 @@
|
||||
package appeng.container.slot;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
import alexiil.mc.lib.attributes.item.ItemTransferable;
|
||||
|
||||
public class OptionalTypeOnlyFakeSlot extends OptionalFakeSlot {
|
||||
|
||||
public OptionalTypeOnlyFakeSlot(final IItemHandler inv, final IOptionalSlotHost containerBus, final int idx,
|
||||
final int x, final int y, final int offX, final int offY, final int groupNum) {
|
||||
public OptionalTypeOnlyFakeSlot(final ItemTransferable inv, final IOptionalSlotHost containerBus, final int idx,
|
||||
final int x, final int y, final int offX, final int offY, final int groupNum) {
|
||||
super(inv, containerBus, idx, x, y, offX, offY, groupNum);
|
||||
}
|
||||
|
||||
|
||||
@@ -19,11 +19,11 @@
|
||||
package appeng.container.slot;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
import alexiil.mc.lib.attributes.item.ItemTransferable;
|
||||
|
||||
public class OutputSlot extends AppEngSlot {
|
||||
|
||||
public OutputSlot(final IItemHandler a, final int b, final int c, final int d, final int i) {
|
||||
public OutputSlot(final ItemTransferable a, final int b, final int c, final int d, final int i) {
|
||||
super(a, b, c, d);
|
||||
this.setIIcon(i);
|
||||
}
|
||||
|
||||
@@ -18,12 +18,12 @@
|
||||
|
||||
package appeng.container.slot;
|
||||
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
import alexiil.mc.lib.attributes.item.ItemTransferable;
|
||||
|
||||
public class PatternOutputsSlot extends OptionalFakeSlot {
|
||||
|
||||
public PatternOutputsSlot(final IItemHandler inv, final IOptionalSlotHost containerBus, final int idx, final int x,
|
||||
final int y, final int offX, final int offY, final int groupNum) {
|
||||
public PatternOutputsSlot(final ItemTransferable inv, final IOptionalSlotHost containerBus, final int idx, final int x,
|
||||
final int y, final int offX, final int offY, final int groupNum) {
|
||||
super(inv, containerBus, idx, x, y, offX, offY, groupNum);
|
||||
}
|
||||
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
|
||||
package appeng.container.slot;
|
||||
|
||||
import alexiil.mc.lib.attributes.item.ItemTransferable;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.networking.energy.IEnergySource;
|
||||
@@ -37,9 +37,9 @@ public class PatternTermSlot extends CraftingTermSlot {
|
||||
private final IOptionalSlotHost host;
|
||||
|
||||
public PatternTermSlot(final PlayerEntity player, final IActionSource mySrc, final IEnergySource energySrc,
|
||||
final IStorageMonitorable storage, final IItemHandler cMatrix, final IItemHandler secondMatrix,
|
||||
final IItemHandler output, final int x, final int y, final IOptionalSlotHost h, final int groupNumber,
|
||||
final IContainerCraftingPacket c) {
|
||||
final IStorageMonitorable storage, final ItemTransferable cMatrix, final ItemTransferable secondMatrix,
|
||||
final ItemTransferable output, final int x, final int y, final IOptionalSlotHost h, final int groupNumber,
|
||||
final IContainerCraftingPacket c) {
|
||||
super(player, mySrc, energySrc, storage, cMatrix, secondMatrix, output, x, y, c);
|
||||
|
||||
this.host = h;
|
||||
|
||||
@@ -18,11 +18,11 @@
|
||||
|
||||
package appeng.container.slot;
|
||||
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
import alexiil.mc.lib.attributes.item.ItemTransferable;
|
||||
|
||||
public class PlayerHotBarSlot extends AppEngSlot {
|
||||
|
||||
public PlayerHotBarSlot(final IItemHandler par1iInventory, final int par2, final int par3, final int par4) {
|
||||
public PlayerHotBarSlot(final ItemTransferable par1iInventory, final int par2, final int par3, final int par4) {
|
||||
super(par1iInventory, par2, par3, par4);
|
||||
this.setPlayerSide(true);
|
||||
}
|
||||
|
||||
@@ -18,13 +18,13 @@
|
||||
|
||||
package appeng.container.slot;
|
||||
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
import alexiil.mc.lib.attributes.item.ItemTransferable;
|
||||
|
||||
// there is nothing special about this slot, its simply used to represent the players inventory, vs a container slot.
|
||||
|
||||
public class PlayerInvSlot extends AppEngSlot {
|
||||
|
||||
public PlayerInvSlot(final IItemHandler par1iInventory, final int idx, final int x, final int y) {
|
||||
public PlayerInvSlot(final ItemTransferable par1iInventory, final int idx, final int x, final int y) {
|
||||
super(par1iInventory, idx, x, y);
|
||||
|
||||
this.setPlayerSide(true);
|
||||
|
||||
@@ -21,6 +21,7 @@ package appeng.container.slot;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import alexiil.mc.lib.attributes.item.ItemTransferable;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
@@ -28,10 +29,9 @@ import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.inventory.container.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.definitions.IDefinitions;
|
||||
@@ -58,20 +58,20 @@ import appeng.util.Platform;
|
||||
*/
|
||||
public class RestrictedInputSlot extends AppEngSlot {
|
||||
|
||||
private static final List<ResourceLocation> METAL_INGOT_TAGS = ImmutableList.of(
|
||||
new ResourceLocation("forge:ingots/copper"), new ResourceLocation("forge:ingots/tin"),
|
||||
new ResourceLocation("forge:ingots/iron"), new ResourceLocation("forge:ingots/gold"),
|
||||
new ResourceLocation("forge:ingots/lead"), new ResourceLocation("forge:ingots/bronze"),
|
||||
new ResourceLocation("forge:ingots/brass"), new ResourceLocation("forge:ingots/nickel"),
|
||||
new ResourceLocation("forge:ingots/aluminium"));
|
||||
private static final List<Identifier> METAL_INGOT_TAGS = ImmutableList.of(
|
||||
new Identifier("forge:ingots/copper"), new Identifier("forge:ingots/tin"),
|
||||
new Identifier("forge:ingots/iron"), new Identifier("forge:ingots/gold"),
|
||||
new Identifier("forge:ingots/lead"), new Identifier("forge:ingots/bronze"),
|
||||
new Identifier("forge:ingots/brass"), new Identifier("forge:ingots/nickel"),
|
||||
new Identifier("forge:ingots/aluminium"));
|
||||
|
||||
private final PlacableItemType which;
|
||||
private final PlayerInventory p;
|
||||
private boolean allowEdit = true;
|
||||
private int stackLimit = -1;
|
||||
|
||||
public RestrictedInputSlot(final PlacableItemType valid, final IItemHandler i, final int slotIndex, final int x,
|
||||
final int y, final PlayerInventory p) {
|
||||
public RestrictedInputSlot(final PlacableItemType valid, final ItemTransferable i, final int slotIndex, final int x,
|
||||
final int y, final PlayerInventory p) {
|
||||
super(i, slotIndex, x, y);
|
||||
this.which = valid;
|
||||
this.setIIcon(valid.IIcon);
|
||||
@@ -247,8 +247,8 @@ public class RestrictedInputSlot extends AppEngSlot {
|
||||
return true;
|
||||
}
|
||||
|
||||
Set<ResourceLocation> itemTags = i.getItem().getTags();
|
||||
for (ResourceLocation tagName : METAL_INGOT_TAGS) {
|
||||
Set<Identifier> itemTags = i.getItem().getTags();
|
||||
for (Identifier tagName : METAL_INGOT_TAGS) {
|
||||
if (itemTags.contains(tagName)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user