Search in sources :

Example 1 with ItemTabInfo

use of gregtech.api.gui.widgets.tab.ItemTabInfo in project GregTech by GregTechCE.

the class MetaTileEntityWorkbench method createUI.

@Override
protected ModularUI createUI(EntityPlayer entityPlayer) {
    Builder builder = ModularUI.builder(GuiTextures.BORDERED_BACKGROUND, 176, 221).bindPlayerInventory(entityPlayer.inventory, 140);
    builder.label(5, 5, getMetaFullName());
    TabGroup tabGroup = new TabGroup(TabLocation.HORIZONTAL_TOP_LEFT, Position.ORIGIN);
    tabGroup.addTab(new ItemTabInfo("gregtech.machine.workbench.tab.workbench", new ItemStack(Blocks.CRAFTING_TABLE)), createWorkbenchTab());
    tabGroup.addTab(new ItemTabInfo("gregtech.machine.workbench.tab.item_list", new ItemStack(Blocks.CHEST)), createItemListTab());
    builder.widget(tabGroup);
    return builder.build(getHolder(), entityPlayer);
}
Also used : Builder(gregtech.api.gui.ModularUI.Builder) ItemTabInfo(gregtech.api.gui.widgets.tab.ItemTabInfo) ItemStack(net.minecraft.item.ItemStack)

Aggregations

Builder (gregtech.api.gui.ModularUI.Builder)1 ItemTabInfo (gregtech.api.gui.widgets.tab.ItemTabInfo)1 ItemStack (net.minecraft.item.ItemStack)1