Search in sources :

Example 1 with CardManagmentInventory

use of logisticspipes.utils.CardManagmentInventory in project LogisticsPipes by RS485.

the class ItemMangerGui method getContainer.

@Override
public DummyContainer getContainer(EntityPlayer player) {
    final CardManagmentInventory Cinv = new CardManagmentInventory();
    DummyContainer dummy = new DummyContainer(player, Cinv, new IGuiOpenControler() {

        @Override
        public void guiOpenedByPlayer(EntityPlayer player) {
        }

        @Override
        public void guiClosedByPlayer(EntityPlayer player) {
            Cinv.close(player, (int) player.posX, (int) player.posY, (int) player.posZ);
        }
    });
    for (int i = 0; i < 2; i++) {
        dummy.addRestrictedSlot(i, Cinv, 0, 0, LogisticsPipes.ModuleItem);
    }
    dummy.addRestrictedSlot(2, Cinv, 0, 0, itemStack -> false);
    dummy.addRestrictedSlot(3, Cinv, 0, 0, LogisticsPipes.LogisticsItemCard);
    for (int i = 4; i < 10; i++) {
        dummy.addColorSlot(i, Cinv, 0, 0);
    }
    dummy.addNormalSlotsForPlayerInventory(0, 0);
    return dummy;
}
Also used : DummyContainer(logisticspipes.utils.gui.DummyContainer) CardManagmentInventory(logisticspipes.utils.CardManagmentInventory) IGuiOpenControler(logisticspipes.interfaces.IGuiOpenControler) EntityPlayer(net.minecraft.entity.player.EntityPlayer)

Aggregations

IGuiOpenControler (logisticspipes.interfaces.IGuiOpenControler)1 CardManagmentInventory (logisticspipes.utils.CardManagmentInventory)1 DummyContainer (logisticspipes.utils.gui.DummyContainer)1 EntityPlayer (net.minecraft.entity.player.EntityPlayer)1