Search in sources :

Example 1 with ItemUIFactory

use of gregtech.api.items.gui.ItemUIFactory in project GregTech by GregTechCE.

the class MetaItem method createUI.

@Override
public ModularUI createUI(PlayerInventoryHolder holder, EntityPlayer entityPlayer) {
    ItemStack itemStack = holder.getCurrentItem();
    T metaValueItem = getItem(itemStack);
    ItemUIFactory uiFactory = metaValueItem == null ? null : metaValueItem.getUIManager();
    return uiFactory == null ? null : uiFactory.createUI(holder, entityPlayer);
}
Also used : ItemStack(net.minecraft.item.ItemStack) ItemUIFactory(gregtech.api.items.gui.ItemUIFactory)

Example 2 with ItemUIFactory

use of gregtech.api.items.gui.ItemUIFactory in project GregTech by GregTechCEu.

the class MetaItem method createUI.

@Override
public ModularUI createUI(PlayerInventoryHolder holder, EntityPlayer entityPlayer) {
    ItemStack itemStack = holder.getCurrentItem();
    T metaValueItem = getItem(itemStack);
    ItemUIFactory uiFactory = metaValueItem == null ? null : metaValueItem.getUIManager();
    return uiFactory == null ? null : uiFactory.createUI(holder, entityPlayer);
}
Also used : ItemStack(net.minecraft.item.ItemStack) ItemUIFactory(gregtech.api.items.gui.ItemUIFactory)

Aggregations

ItemUIFactory (gregtech.api.items.gui.ItemUIFactory)2 ItemStack (net.minecraft.item.ItemStack)2