mirror of
https://github.com/GTNewHorizons/WirelessCraftingTerminal.git
synced 2026-11-26 06:42:55 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0242be58a9 | ||
|
|
c0afb9eb8f | ||
|
|
07fd1eef26 | ||
|
|
5c4d3d11c9 |
+10
-12
@@ -29,7 +29,6 @@ import appeng.container.AEBaseContainer;
|
||||
import appeng.container.ContainerNull;
|
||||
import appeng.container.slot.AppEngCraftingSlot;
|
||||
import appeng.container.slot.AppEngSlot;
|
||||
import appeng.container.slot.NullSlot;
|
||||
import appeng.container.slot.SlotCraftingMatrix;
|
||||
import appeng.container.slot.SlotCraftingTerm;
|
||||
import appeng.container.slot.SlotDisabled;
|
||||
@@ -113,7 +112,7 @@ public class ContainerWirelessCraftingTerminal extends AEBaseContainer
|
||||
public ItemStack[] craftMatrixInventory;
|
||||
private final World worldObj;
|
||||
private final EntityPlayer player;
|
||||
public static final int HOTBAR_START = 1,
|
||||
public static final int HOTBAR_START = 2,
|
||||
HOTBAR_END = HOTBAR_START + 8,
|
||||
INV_START = HOTBAR_END + 1,
|
||||
INV_END = INV_START + 26,
|
||||
@@ -124,12 +123,11 @@ public class ContainerWirelessCraftingTerminal extends AEBaseContainer
|
||||
CRAFT_RESULT = CRAFT_GRID_END + 1,
|
||||
VIEW_CELL_START = CRAFT_RESULT + 1,
|
||||
VIEW_CELL_END = VIEW_CELL_START + 4,
|
||||
BOOSTER_INDEX = 0,
|
||||
BOOSTER_INDEX = 1,
|
||||
MAGNET_INDEX = VIEW_CELL_END + 1;
|
||||
public static int CRAFTING_SLOT_X_POS = 80, CRAFTING_SLOT_Y_POS = 83;
|
||||
private SlotBooster boosterSlot;
|
||||
private final SlotMagnet magnetSlot;
|
||||
private NullSlot nullSlot;
|
||||
private final Slot[] hotbarSlot;
|
||||
private final Slot[] inventorySlot;
|
||||
private final SlotArmor[] armorSlot;
|
||||
@@ -214,12 +212,14 @@ public class ContainerWirelessCraftingTerminal extends AEBaseContainer
|
||||
this.monitor = null;
|
||||
}
|
||||
|
||||
// Dummy slot at index 0 to work around ME slots all having their slot number set to 0.
|
||||
this.addSlotToContainer(new SlotInaccessible(new AppEngInternalInventory(null, 1), 0, -1000, -1000));
|
||||
|
||||
if (Reference.WCT_BOOSTER_ENABLED) {
|
||||
boosterSlot = new SlotBooster(this.boosterInventory, 0, 134, -20);
|
||||
this.addSlotToContainer(boosterSlot);
|
||||
} else {
|
||||
nullSlot = new NullSlot();
|
||||
this.addSlotToContainer(nullSlot);
|
||||
this.addSlotToContainer(new SlotInaccessible(new AppEngInternalInventory(null, 1), 0, -1000, -1000));
|
||||
}
|
||||
|
||||
// Add hotbar slots
|
||||
@@ -822,16 +822,14 @@ public class ContainerWirelessCraftingTerminal extends AEBaseContainer
|
||||
}
|
||||
|
||||
public boolean isBoosterInstalled() {
|
||||
Slot slot = getSlotFromInventory(this.boosterInventory, BOOSTER_INDEX);
|
||||
Slot slot = getSlotFromInventory(this.boosterInventory, 0);
|
||||
if (slot == null) {
|
||||
return false;
|
||||
}
|
||||
boolean hasStack =
|
||||
getSlotFromInventory(this.boosterInventory, BOOSTER_INDEX).getHasStack();
|
||||
boolean hasStack = getSlotFromInventory(this.boosterInventory, 0).getHasStack();
|
||||
if (hasStack) {
|
||||
Item boosterSlotContents = getSlotFromInventory(this.boosterInventory, BOOSTER_INDEX)
|
||||
.getStack()
|
||||
.getItem();
|
||||
Item boosterSlotContents =
|
||||
getSlotFromInventory(this.boosterInventory, 0).getStack().getItem();
|
||||
return boosterSlotContents instanceof ItemInfinityBooster;
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in new issue
Block a user