public ContainerLexiconStudy(ItemStack stack, InventoryPlayer inventory) { super(stack, inventory); player = inventory.player; addSlotToContainer(new SlotLocked(lexiconInv, 0, 95, 33)); }
protected void bindPlayerInventory(InventoryPlayer inventory) { int xOffset = 23; int yOffset = 114; for (int i = 0; i < 3; i++) { for (int j = 0; j < 9; j++) { addSlotToContainer(new Slot(inventory, j + i * 9 + 9, xOffset + j * 18, yOffset + i * 18)); } } for (int i = 0; i < 9; i++) { if (i == inventory.currentItem) { addSlotToContainer(new SlotLocked(inventory, i, xOffset + i * 18, yOffset + 58)); } else { addSlotToContainer(new Slot(inventory, i, xOffset + i * 18, yOffset + 58)); } } }
public ContainerLexiconTransmute(InventoryPlayer inventory) { bindPlayerInventory(inventory); addSlotToContainer(new SlotValidated(this, lexiconInv, 0, 59, 61)); addSlotToContainer(new SlotRemoveOnly(lexiconInv, 1, 131, 61)); addSlotToContainer(new SlotLocked(lexiconInv, 2, 95, 33)); onCraftMatrixChanged(lexiconInv); }
@Override protected void bindPlayerInventory(InventoryPlayer inventoryPlayer) { int xOffset = getPlayerInventoryHorizontalOffset(); int yOffset = getPlayerInventoryVerticalOffset(); for (int i = 0; i < 3; i++) { for (int j = 0; j < 9; j++) { addSlotToContainer(new Slot(inventoryPlayer, j + i * 9 + 9, xOffset + j * 18, yOffset + i * 18)); } } for (int i = 0; i < 9; i++) { if (i == inventoryPlayer.currentItem) { addSlotToContainer(new SlotLocked(inventoryPlayer, i, xOffset + i * 18, yOffset + 58)); } else { addSlotToContainer(new Slot(inventoryPlayer, i, xOffset + i * 18, yOffset + 58)); } } }
@Override protected void bindPlayerInventory(InventoryPlayer inventoryPlayer) { int xOffset = getPlayerInventoryHorizontalOffset(); int yOffset = getPlayerInventoryVerticalOffset(); for (int i = 0; i < 3; i++) { for (int j = 0; j < 9; j++) { addSlotToContainer(new Slot(inventoryPlayer, j + i * 9 + 9, xOffset + j * 18, yOffset + i * 18)); } } for (int i = 0; i < 9; i++) { if (i == inventoryPlayer.currentItem) { addSlotToContainer(new SlotLocked(inventoryPlayer, i, xOffset + i * 18, yOffset + 58)); } else { addSlotToContainer(new Slot(inventoryPlayer, i, xOffset + i * 18, yOffset + 58)); } } }