if(BackpackUtil.isServerSide()) {
inventorySlot = new InventoryBackpackSlot(player);
} else {
inventorySlot = new InventoryBasic(Localizations.INVENTORY_PERSONAL, false, 1);
}
InventoryPickup inventoryPickup = new InventoryPickup();
ContainerAdvanced container = new ContainerPersonalSlot(inventorySlot, inventoryPickup);
int maxWidth = 160;
// set container width (needed for gui)
container.setWidth(maxWidth + 2 * X_SPACING);
int x = (int) Math.round(maxWidth / 2. - SLOT / 2.) + 1;
int y = 17; // initial space for label
container.addBoundary(Boundaries.BACKPACK);
// backpack slot
container.addSlot(new SlotBackpackOnly(inventorySlot, 0, x, y));
container.addBoundary(Boundaries.BACKPACK_END);
x = X_SPACING;
y += 15 + SLOT;
// pickup inventory
for(int i = 0; i < inventoryPickup.getSizeInventory(); i++) {
container.addSlot(new SlotPhantom(inventoryPickup, i, x, y));
x += SLOT;
}
container.addBoundary(Boundaries.INVENTORY);