Examples of GuiBackpack


Examples of de.eydamos.backpack.gui.GuiBackpack

    @Override
    @SideOnly(Side.CLIENT)
    public GuiContainer getGuiContainer(BackpackSave backpack, IInventory[] inventories, EntityPlayer entityPlayer) {
        ContainerAdvanced container = getContainer(backpack, inventories, entityPlayer);
        GuiBackpack guiBackpack = new GuiBackpack(container);

        int slotsPerRow = backpack.getSlotsPerRow();
        int inventoryRows = (int) Math.ceil(inventories[1].getSizeInventory() / (float) slotsPerRow);
        int textPositionY = 17 + inventoryRows * SLOT + 2;

        GuiSlot guiSlot;
        for(int i = 0; i < container.inventorySlots.size(); i++) {
            Slot slot = (Slot) container.inventorySlots.get(i);
            guiSlot = new GuiSlot(slot.xDisplayPosition - 1, slot.yDisplayPosition - 1);
            guiBackpack.addSubPart(guiSlot);
        }

        guiBackpack.addSubPart(new Label(X_SPACING, 6, 0x404040, inventories[1].getInventoryName()));
        guiBackpack.addSubPart(new Label(X_SPACING, textPositionY, 0x404040, "container.inventory"));

        return guiBackpack;
    }
View Full Code Here

Examples of de.eydamos.backpack.gui.GuiBackpack

    @Override
    @SideOnly(Side.CLIENT)
    public GuiContainer getGuiContainer(PlayerSave player, IInventory[] inventories, EntityPlayer entityPlayer) {
        ContainerPersonalSlot container = (ContainerPersonalSlot) getContainer(player, inventories, entityPlayer);
        GuiBackpack guiBackpack = new GuiBackpack(container);

        GuiSlot guiSlot;
        for(int i = 0; i < container.inventorySlots.size(); i++) {
            Slot slot = (Slot) container.inventorySlots.get(i);
            guiSlot = new GuiSlot(slot.xDisplayPosition - 1, slot.yDisplayPosition - 1);
            guiBackpack.addSubPart(guiSlot);
        }

        guiBackpack.addSubPart(new Label(X_SPACING, 6, 0x404040, container.getInventoryToSave().getInventoryName()));
        guiBackpack.addSubPart(new Label(X_SPACING, 38, 0x404040, container.getInventoryPickup().getInventoryName()));

        return guiBackpack;
    }
View Full Code Here

Examples of forestry.storage.gui.GuiBackpack

    case BackpackGUI:
      equipped = getBackpackItem(player);
      if (equipped == null)
        return null;
      return new GuiBackpack(new ContainerBackpack(player, new ItemInventory(ItemBackpack.class, Defaults.SLOTS_BACKPACK_DEFAULT, equipped)));

    case BackpackT2GUI:
      equipped = getBackpackItem(player);
      if (equipped == null)
        return null;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.