Merge remote-tracking branch 'origin/master' into fabric/master
# Conflicts: # src/main/java/appeng/client/me/SlotDisconnected.java # src/main/java/appeng/container/implementations/QuartzKnifeContainer.java # src/main/java/appeng/container/slot/AppEngCraftingSlot.java # src/main/java/appeng/container/slot/AppEngSlot.java # src/main/java/appeng/container/slot/CraftingMatrixSlot.java # src/main/java/appeng/container/slot/CraftingTermSlot.java # src/main/java/appeng/container/slot/DisabledSlot.java # src/main/java/appeng/container/slot/FakeBlacklistSlot.java # src/main/java/appeng/container/slot/FakeCraftingMatrixSlot.java # src/main/java/appeng/container/slot/FakeSlot.java # src/main/java/appeng/container/slot/FakeTypeOnlySlot.java # src/main/java/appeng/container/slot/InaccessibleSlot.java # src/main/java/appeng/container/slot/MolecularAssemblerPatternSlot.java # src/main/java/appeng/container/slot/NormalSlot.java # src/main/java/appeng/container/slot/OptionalFakeSlot.java # src/main/java/appeng/container/slot/OptionalNormalSlot.java # src/main/java/appeng/container/slot/OptionalRestrictedInputSlot.java # src/main/java/appeng/container/slot/OptionalTypeOnlyFakeSlot.java # src/main/java/appeng/container/slot/OutputSlot.java # src/main/java/appeng/container/slot/PatternOutputsSlot.java # src/main/java/appeng/container/slot/PlayerHotBarSlot.java # src/main/java/appeng/container/slot/PlayerInvSlot.java # src/main/java/appeng/container/slot/RestrictedInputSlot.java
This commit is contained in:
@@ -30,13 +30,13 @@ public class SlotDisconnected extends AppEngSlot {
|
||||
|
||||
private final ClientDCInternalInv mySlot;
|
||||
|
||||
public SlotDisconnected(final ClientDCInternalInv me, final int which, final int x, final int y) {
|
||||
super(me.getInventory(), which, x, y);
|
||||
public SlotDisconnected(final ClientDCInternalInv me, final int invSlot, final int x, final int y) {
|
||||
super(me.getInventory(), invSlot, x, y);
|
||||
this.mySlot = me;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInsert(final ItemStack par1ItemStack) {
|
||||
public boolean canInsert(final ItemStack stack) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ public class SlotDisconnected extends AppEngSlot {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canTakeItems(final PlayerEntity par1PlayerEntity) {
|
||||
public boolean canTakeItems(final PlayerEntity player) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -103,8 +103,8 @@ public class QuartzKnifeContainer extends AEBaseContainer {
|
||||
}
|
||||
|
||||
private class QuartzKniveSlot extends OutputSlot {
|
||||
QuartzKniveSlot(FixedItemInv a, int b, int c, int d, int i) {
|
||||
super(a, b, c, d, i);
|
||||
QuartzKniveSlot(FixedItemInv inv, int invSlot, int x, int y, int iconIdx) {
|
||||
super(inv, invSlot, x, y, iconIdx);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -48,8 +48,8 @@ public class AppEngCraftingSlot extends AppEngSlot {
|
||||
private int amountCrafted;
|
||||
|
||||
public AppEngCraftingSlot(final PlayerEntity par1PlayerEntity, final FixedItemInv par2IInventory,
|
||||
final FixedItemInv par3IInventory, final int par4, final int par5, final int par6) {
|
||||
super(par3IInventory, par4, par5, par6);
|
||||
final FixedItemInv inv, final int invSlot, final int x, final int y) {
|
||||
super(inv, invSlot, x, y);
|
||||
this.thePlayer = par1PlayerEntity;
|
||||
this.craftMatrix = par2IInventory;
|
||||
}
|
||||
@@ -59,7 +59,7 @@ public class AppEngCraftingSlot extends AppEngSlot {
|
||||
* armor slots.
|
||||
*/
|
||||
@Override
|
||||
public boolean canInsert(final ItemStack par1ItemStack) {
|
||||
public boolean canInsert(final ItemStack stack) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -34,10 +34,10 @@ import alexiil.mc.lib.attributes.item.SingleItemSlot;
|
||||
import appeng.container.AEBaseContainer;
|
||||
|
||||
public class AppEngSlot extends Slot {
|
||||
private static Inventory emptyInventory = new SimpleInventory(0);
|
||||
private static Inventory EMPTY_INVENTORY = new SimpleInventory(0);
|
||||
private final FixedItemInv itemHandler;
|
||||
private final SingleItemSlot backingSlot;
|
||||
private final int index;
|
||||
private final int invSlot;
|
||||
|
||||
private final int defX;
|
||||
private final int defY;
|
||||
@@ -48,10 +48,10 @@ public class AppEngSlot extends Slot {
|
||||
private CalculatedValidity isValid;
|
||||
private boolean isDisplay = false;
|
||||
|
||||
public AppEngSlot(final FixedItemInv inv, final int idx, final int x, final int y) {
|
||||
super(emptyInventory, idx, x, y);
|
||||
public AppEngSlot(final FixedItemInv inv, final int invSlot, final int x, final int y) {
|
||||
super(EMPTY_INVENTORY, invSlot, x, y);
|
||||
this.itemHandler = inv;
|
||||
this.index = idx;
|
||||
this.invSlot = invSlot;
|
||||
this.backingSlot = inv.getSlot(idx);
|
||||
|
||||
this.defX = x;
|
||||
@@ -136,7 +136,7 @@ public class AppEngSlot extends Slot {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canTakeItems(final PlayerEntity par1PlayerEntity) {
|
||||
public boolean canTakeItems(final PlayerEntity player) {
|
||||
if (this.isSlotEnabled()) {
|
||||
return this.backingSlot.couldExtractAnything();
|
||||
}
|
||||
|
||||
@@ -30,11 +30,11 @@ public class CraftingMatrixSlot extends AppEngSlot {
|
||||
private final AEBaseContainer c;
|
||||
private final Inventory wrappedInventory;
|
||||
|
||||
public CraftingMatrixSlot(final AEBaseContainer c, final FixedItemInv par1iInventory, final int par2,
|
||||
final int par3, final int par4) {
|
||||
super(par1iInventory, par2, par3, par4);
|
||||
public CraftingMatrixSlot(final AEBaseContainer c, final FixedItemInv inv, final int invSlot,
|
||||
final int x, final int y) {
|
||||
super(inv, invSlot, x, y);
|
||||
this.c = c;
|
||||
this.wrappedInventory = new WrapperInvItemHandler(par1iInventory);
|
||||
this.wrappedInventory = new WrapperInvItemHandler(inv);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -83,7 +83,7 @@ public class CraftingTermSlot extends AppEngCraftingSlot {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canTakeItems(final PlayerEntity par1PlayerEntity) {
|
||||
public boolean canTakeItems(final PlayerEntity player) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -25,17 +25,17 @@ import alexiil.mc.lib.attributes.item.FixedItemInv;
|
||||
|
||||
public class DisabledSlot extends AppEngSlot {
|
||||
|
||||
public DisabledSlot(final FixedItemInv par1iInventory, final int slotIndex, final int x, final int y) {
|
||||
super(par1iInventory, slotIndex, x, y);
|
||||
public DisabledSlot(final FixedItemInv par1iInventory, final int invSlot, final int x, final int y) {
|
||||
super(par1iInventory, invSlot, x, y);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInsert(final ItemStack par1ItemStack) {
|
||||
public boolean canInsert(final ItemStack stack) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canTakeItems(final PlayerEntity par1PlayerEntity) {
|
||||
public boolean canTakeItems(final PlayerEntity player) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,8 +22,8 @@ import alexiil.mc.lib.attributes.item.FixedItemInv;
|
||||
|
||||
public class FakeBlacklistSlot extends FakeTypeOnlySlot {
|
||||
|
||||
public FakeBlacklistSlot(final FixedItemInv inv, final int idx, final int x, final int y) {
|
||||
super(inv, idx, x, y);
|
||||
public FakeBlacklistSlot(final FixedItemInv inv, final int invSlot, final int x, final int y) {
|
||||
super(inv, invSlot, x, y);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -22,7 +22,7 @@ import alexiil.mc.lib.attributes.item.FixedItemInv;
|
||||
|
||||
public class FakeCraftingMatrixSlot extends FakeSlot {
|
||||
|
||||
public FakeCraftingMatrixSlot(final FixedItemInv inv, final int idx, final int x, final int y) {
|
||||
super(inv, idx, x, y);
|
||||
public FakeCraftingMatrixSlot(final FixedItemInv inv, final int invSlot, final int x, final int y) {
|
||||
super(inv, invSlot, x, y);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,8 +25,8 @@ import alexiil.mc.lib.attributes.item.FixedItemInv;
|
||||
|
||||
public class FakeSlot extends AppEngSlot {
|
||||
|
||||
public FakeSlot(final FixedItemInv inv, final int idx, final int x, final int y) {
|
||||
super(inv, idx, x, y);
|
||||
public FakeSlot(final FixedItemInv inv, final int invSlot, final int x, final int y) {
|
||||
super(inv, invSlot, x, y);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -40,7 +40,7 @@ public class FakeSlot extends AppEngSlot {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInsert(final ItemStack par1ItemStack) {
|
||||
public boolean canInsert(final ItemStack stack) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ public class FakeSlot extends AppEngSlot {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canTakeItems(final PlayerEntity par1PlayerEntity) {
|
||||
public boolean canTakeItems(final PlayerEntity player) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,8 +24,8 @@ import alexiil.mc.lib.attributes.item.FixedItemInv;
|
||||
|
||||
public class FakeTypeOnlySlot extends FakeSlot {
|
||||
|
||||
public FakeTypeOnlySlot(final FixedItemInv inv, final int idx, final int x, final int y) {
|
||||
super(inv, idx, x, y);
|
||||
public FakeTypeOnlySlot(final FixedItemInv inv, final int invSlot, final int x, final int y) {
|
||||
super(inv, invSlot, x, y);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -27,12 +27,12 @@ public class InaccessibleSlot extends AppEngSlot {
|
||||
|
||||
private ItemStack dspStack = ItemStack.EMPTY;
|
||||
|
||||
public InaccessibleSlot(final FixedItemInv i, final int slotIdx, final int x, final int y) {
|
||||
super(i, slotIdx, x, y);
|
||||
public InaccessibleSlot(final FixedItemInv i, final int invSlot, final int x, final int y) {
|
||||
super(i, invSlot, x, y);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInsert(final ItemStack i) {
|
||||
public boolean canInsert(final ItemStack stack) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ public class InaccessibleSlot extends AppEngSlot {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canTakeItems(final PlayerEntity par1PlayerEntity) {
|
||||
public boolean canTakeItems(final PlayerEntity player) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -30,15 +30,15 @@ public class MolecularAssemblerPatternSlot extends AppEngSlot {
|
||||
|
||||
private final int slotIdx;
|
||||
|
||||
public MolecularAssemblerPatternSlot(final MolecularAssemblerContainer mac, final FixedItemInv i, final int slotIdx,
|
||||
public MolecularAssemblerPatternSlot(final MolecularAssemblerContainer mac, final FixedItemInv inv, final int invSlot,
|
||||
final int x, final int y) {
|
||||
super(i, slotIdx, x, y);
|
||||
super(inv, invSlot, x, y);
|
||||
this.mac = mac;
|
||||
this.slotIdx = slotIdx;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInsert(final ItemStack i) {
|
||||
return this.mac.isValidItemForSlot(slotIdx, i);
|
||||
public boolean canInsert(final ItemStack stack) {
|
||||
return this.mac.isValidItemForSlot(slotIdx, stack);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ import alexiil.mc.lib.attributes.item.FixedItemInv;
|
||||
|
||||
public class NormalSlot extends AppEngSlot {
|
||||
|
||||
public NormalSlot(final FixedItemInv inv, final int slot, final int xPos, final int yPos) {
|
||||
super(inv, slot, xPos, yPos);
|
||||
public NormalSlot(final FixedItemInv inv, final int invSlot, final int xPos, final int yPos) {
|
||||
super(inv, invSlot, xPos, yPos);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,9 +32,9 @@ public class OptionalFakeSlot extends FakeSlot implements IOptionalSlot {
|
||||
private final IOptionalSlotHost host;
|
||||
private boolean renderDisabled = true;
|
||||
|
||||
public OptionalFakeSlot(final FixedItemInv 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);
|
||||
public OptionalFakeSlot(final FixedItemInv inv, final IOptionalSlotHost containerBus, final int invSlot,
|
||||
final int x, final int y, final int offX, final int offY, final int groupNum) {
|
||||
super(inv, invSlot, x + offX * 18, y + offY * 18);
|
||||
this.srcX = x;
|
||||
this.srcY = y;
|
||||
this.groupNum = groupNum;
|
||||
|
||||
@@ -25,9 +25,9 @@ public class OptionalNormalSlot extends AppEngSlot implements IOptionalSlot {
|
||||
private final int groupNum;
|
||||
private final IOptionalSlotHost host;
|
||||
|
||||
public OptionalNormalSlot(final FixedItemInv inv, final IOptionalSlotHost containerBus, final int slot,
|
||||
public OptionalNormalSlot(final FixedItemInv inv, final IOptionalSlotHost containerBus, final int invSlot,
|
||||
final int xPos, final int yPos, final int groupNum) {
|
||||
super(inv, slot, xPos, yPos);
|
||||
super(inv, invSlot, xPos, yPos);
|
||||
this.groupNum = groupNum;
|
||||
this.host = containerBus;
|
||||
}
|
||||
|
||||
@@ -27,9 +27,9 @@ public class OptionalRestrictedInputSlot extends RestrictedInputSlot {
|
||||
private final int groupNum;
|
||||
private final IOptionalSlotHost host;
|
||||
|
||||
public OptionalRestrictedInputSlot(final PlacableItemType valid, final FixedItemInv 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);
|
||||
public OptionalRestrictedInputSlot(final PlacableItemType valid, final FixedItemInv inv, final IOptionalSlotHost host,
|
||||
final int invSlot, final int x, final int y, final int grpNum, final PlayerInventory invPlayer) {
|
||||
super(valid, inv, invSlot, x, y, invPlayer);
|
||||
this.groupNum = grpNum;
|
||||
this.host = host;
|
||||
}
|
||||
|
||||
@@ -24,9 +24,9 @@ import alexiil.mc.lib.attributes.item.FixedItemInv;
|
||||
|
||||
public class OptionalTypeOnlyFakeSlot extends OptionalFakeSlot {
|
||||
|
||||
public OptionalTypeOnlyFakeSlot(final FixedItemInv inv, final IOptionalSlotHost containerBus, final int idx,
|
||||
public OptionalTypeOnlyFakeSlot(final FixedItemInv inv, final IOptionalSlotHost containerBus, final int invSlot,
|
||||
final int x, final int y, final int offX, final int offY, final int groupNum) {
|
||||
super(inv, containerBus, idx, x, y, offX, offY, groupNum);
|
||||
super(inv, containerBus, invSlot, x, y, offX, offY, groupNum);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -24,13 +24,13 @@ import alexiil.mc.lib.attributes.item.FixedItemInv;
|
||||
|
||||
public class OutputSlot extends AppEngSlot {
|
||||
|
||||
public OutputSlot(final FixedItemInv a, final int b, final int c, final int d, final int i) {
|
||||
super(a, b, c, d);
|
||||
this.setIIcon(i);
|
||||
public OutputSlot(final FixedItemInv inv, final int invSlot, final int x, final int y, final int iconIndex) {
|
||||
super(inv, invSlot, x, y);
|
||||
this.setIIcon(iconIndex);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInsert(final ItemStack i) {
|
||||
public boolean canInsert(final ItemStack stack) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,9 +22,9 @@ import alexiil.mc.lib.attributes.item.FixedItemInv;
|
||||
|
||||
public class PatternOutputsSlot extends OptionalFakeSlot {
|
||||
|
||||
public PatternOutputsSlot(final FixedItemInv 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);
|
||||
public PatternOutputsSlot(final FixedItemInv inv, final IOptionalSlotHost containerBus, final int invSlot,
|
||||
final int x, final int y, final int offX, final int offY, final int groupNum) {
|
||||
super(inv, containerBus, invSlot, x, y, offX, offY, groupNum);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -22,8 +22,8 @@ import alexiil.mc.lib.attributes.item.FixedItemInv;
|
||||
|
||||
public class PlayerHotBarSlot extends AppEngSlot {
|
||||
|
||||
public PlayerHotBarSlot(final FixedItemInv par1iInventory, final int par2, final int par3, final int par4) {
|
||||
super(par1iInventory, par2, par3, par4);
|
||||
public PlayerHotBarSlot(final FixedItemInv inv, final int invSlot, final int x, final int y) {
|
||||
super(inv, invSlot, x, y);
|
||||
this.setPlayerSide(true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,8 +24,8 @@ import alexiil.mc.lib.attributes.item.FixedItemInv;
|
||||
|
||||
public class PlayerInvSlot extends AppEngSlot {
|
||||
|
||||
public PlayerInvSlot(final FixedItemInv par1iInventory, final int idx, final int x, final int y) {
|
||||
super(par1iInventory, idx, x, y);
|
||||
public PlayerInvSlot(final FixedItemInv par1iInventory, final int invSlot, final int x, final int y) {
|
||||
super(par1iInventory, invSlot, x, y);
|
||||
|
||||
this.setPlayerSide(true);
|
||||
}
|
||||
|
||||
@@ -71,9 +71,9 @@ public class RestrictedInputSlot extends AppEngSlot {
|
||||
private boolean allowEdit = true;
|
||||
private int stackLimit = -1;
|
||||
|
||||
public RestrictedInputSlot(final PlacableItemType valid, final FixedItemInv i, final int slotIndex, final int x,
|
||||
public RestrictedInputSlot(final PlacableItemType valid, final FixedItemInv inv, final int invSlot, final int x,
|
||||
final int y, final PlayerInventory p) {
|
||||
super(i, slotIndex, x, y);
|
||||
super(inv, invSlot, x, y);
|
||||
this.which = valid;
|
||||
this.setIIcon(valid.IIcon);
|
||||
this.p = p;
|
||||
@@ -100,20 +100,20 @@ public class RestrictedInputSlot extends AppEngSlot {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInsert(final ItemStack i) {
|
||||
if (!this.getContainer().isValidForSlot(this, i)) {
|
||||
public boolean canInsert(final ItemStack stack) {
|
||||
if (!this.getContainer().isValidForSlot(this, stack)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (i.isEmpty()) {
|
||||
if (stack.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (i.getItem() == Items.AIR) {
|
||||
if (stack.getItem() == Items.AIR) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!super.canInsert(i)) {
|
||||
if (!super.canInsert(stack)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ public class RestrictedInputSlot extends AppEngSlot {
|
||||
|
||||
switch (this.which) {
|
||||
case ENCODED_CRAFTING_PATTERN:
|
||||
final ICraftingPatternDetails de = crafting.decodePattern(i, this.p.player.world);
|
||||
final ICraftingPatternDetails de = crafting.decodePattern(stack, this.p.player.world);
|
||||
if (de != null) {
|
||||
return de.isCraftable();
|
||||
}
|
||||
@@ -136,19 +136,19 @@ public class RestrictedInputSlot extends AppEngSlot {
|
||||
case VALID_ENCODED_PATTERN_W_OUTPUT:
|
||||
case ENCODED_PATTERN_W_OUTPUT:
|
||||
case ENCODED_PATTERN:
|
||||
return crafting.isEncodedPattern(i);
|
||||
return crafting.isEncodedPattern(stack);
|
||||
case BLANK_PATTERN:
|
||||
return materials.blankPattern().isSameAs(i);
|
||||
return materials.blankPattern().isSameAs(stack);
|
||||
|
||||
case PATTERN:
|
||||
return materials.blankPattern().isSameAs(i) || crafting.isEncodedPattern(i);
|
||||
return materials.blankPattern().isSameAs(stack) || crafting.isEncodedPattern(stack);
|
||||
|
||||
case INSCRIBER_PLATE:
|
||||
if (materials.namePress().isSameAs(i)) {
|
||||
if (materials.namePress().isSameAs(stack)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return InscriberRecipes.isValidOptionalIngredient(p.player.world, i);
|
||||
return InscriberRecipes.isValidOptionalIngredient(p.player.world, stack);
|
||||
|
||||
case INSCRIBER_INPUT:
|
||||
return true;/*
|
||||
@@ -158,46 +158,48 @@ public class RestrictedInputSlot extends AppEngSlot {
|
||||
|
||||
case METAL_INGOTS:
|
||||
|
||||
return isMetalIngot(i);
|
||||
return isMetalIngot(stack);
|
||||
|
||||
case VIEW_CELL:
|
||||
return items.viewCell().isSameAs(i);
|
||||
return items.viewCell().isSameAs(stack);
|
||||
case ORE:
|
||||
return GrinderRecipes.isValidIngredient(p.player.world, i);
|
||||
return GrinderRecipes.isValidIngredient(p.player.world, stack);
|
||||
case FUEL:
|
||||
return FuelRegistry.INSTANCE.get(i.getItem()) > 0;
|
||||
return FuelRegistry.INSTANCE.get(stack.getItem()) > 0;
|
||||
case POWERED_TOOL:
|
||||
return Platform.isChargeable(i);
|
||||
return Platform.isChargeable(stack);
|
||||
case QE_SINGULARITY:
|
||||
return materials.qESingularity().isSameAs(i);
|
||||
return materials.qESingularity().isSameAs(stack);
|
||||
|
||||
case RANGE_BOOSTER:
|
||||
return materials.wirelessBooster().isSameAs(i);
|
||||
return materials.wirelessBooster().isSameAs(stack);
|
||||
|
||||
case SPATIAL_STORAGE_CELLS:
|
||||
return i.getItem() instanceof ISpatialStorageCell
|
||||
&& ((ISpatialStorageCell) i.getItem()).isSpatialStorage(i);
|
||||
return stack.getItem() instanceof ISpatialStorageCell
|
||||
&& ((ISpatialStorageCell) stack.getItem()).isSpatialStorage(stack);
|
||||
case STORAGE_CELLS:
|
||||
return Api.instance().registries().cell().isCellHandled(i);
|
||||
return Api.instance().registries().cell().isCellHandled(stack);
|
||||
case WORKBENCH_CELL:
|
||||
return i.getItem() instanceof ICellWorkbenchItem && ((ICellWorkbenchItem) i.getItem()).isEditable(i);
|
||||
return stack.getItem() instanceof ICellWorkbenchItem
|
||||
&& ((ICellWorkbenchItem) stack.getItem()).isEditable(stack);
|
||||
case STORAGE_COMPONENT:
|
||||
return i.getItem() instanceof IStorageComponent
|
||||
&& ((IStorageComponent) i.getItem()).isStorageComponent(i);
|
||||
return stack.getItem() instanceof IStorageComponent
|
||||
&& ((IStorageComponent) stack.getItem()).isStorageComponent(stack);
|
||||
case TRASH:
|
||||
if (Api.instance().registries().cell().isCellHandled(i)) {
|
||||
if (Api.instance().registries().cell().isCellHandled(stack)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return !(i.getItem() instanceof IStorageComponent
|
||||
&& ((IStorageComponent) i.getItem()).isStorageComponent(i));
|
||||
return !(stack.getItem() instanceof IStorageComponent
|
||||
&& ((IStorageComponent) stack.getItem()).isStorageComponent(stack));
|
||||
case ENCODABLE_ITEM:
|
||||
return i.getItem() instanceof INetworkEncodable
|
||||
|| Api.instance().registries().wireless().isWirelessTerminal(i);
|
||||
return stack.getItem() instanceof INetworkEncodable
|
||||
|| Api.instance().registries().wireless().isWirelessTerminal(stack);
|
||||
case BIOMETRIC_CARD:
|
||||
return i.getItem() instanceof IBiometricCard;
|
||||
return stack.getItem() instanceof IBiometricCard;
|
||||
case UPGRADES:
|
||||
return i.getItem() instanceof IUpgradeModule && ((IUpgradeModule) i.getItem()).getType(i) != null;
|
||||
return stack.getItem() instanceof IUpgradeModule
|
||||
&& ((IUpgradeModule) stack.getItem()).getType(stack) != null;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -206,7 +208,7 @@ public class RestrictedInputSlot extends AppEngSlot {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canTakeItems(final PlayerEntity par1PlayerEntity) {
|
||||
public boolean canTakeItems(final PlayerEntity player) {
|
||||
return this.isAllowEdit();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user