Search in sources :

Example 1 with SlotUntouchable

use of mods.railcraft.common.gui.slots.SlotUntouchable in project Railcraft by Railcraft.

the class ContainerLocomotive method init.

public final void init() {
    defineSlotsAndWidgets();
    SlotRailcraft slotTicket = new SlotStackFilter(ItemTicket.FILTER, loco, loco.getSizeInventory() - 2, 116, guiHeight - 111) {

        @Override
        public int getSlotStackLimit() {
            return 1;
        }
    };
    slotTicket.setToolTips(ToolTip.buildToolTip("gui.locomotive.tips.slot.ticket"));
    addSlot(slotTicket);
    // TODO: make some way to clear this?
    addSlot(new SlotUntouchable(loco, loco.getSizeInventory() - 1, 134, guiHeight - 111));
    for (int i = 0; i < 3; i++) {
        for (int k = 0; k < 9; k++) {
            addSlot(new Slot(playerInv, k + i * 9 + 9, 8 + k * 18, guiHeight - 82 + i * 18));
        }
    }
    for (int j = 0; j < 9; j++) {
        addSlot(new Slot(playerInv, j, 8 + j * 18, guiHeight - 24));
    }
}
Also used : SlotUntouchable(mods.railcraft.common.gui.slots.SlotUntouchable) SlotStackFilter(mods.railcraft.common.gui.slots.SlotStackFilter) Slot(net.minecraft.inventory.Slot) SlotRailcraft(mods.railcraft.common.gui.slots.SlotRailcraft)

Aggregations

SlotRailcraft (mods.railcraft.common.gui.slots.SlotRailcraft)1 SlotStackFilter (mods.railcraft.common.gui.slots.SlotStackFilter)1 SlotUntouchable (mods.railcraft.common.gui.slots.SlotUntouchable)1 Slot (net.minecraft.inventory.Slot)1