use of buildcraft.lib.gui.GuiStack in project BuildCraft by BuildCraft.
the class ElementTypeDrawnStack method deserialize0.
@Override
protected IGuiElement deserialize0(BuildCraftJsonGui gui, IGuiPosition parent, JsonGuiInfo info, JsonGuiElement json) {
FunctionContext ctx = createContext(json);
IGuiPosition pos = resolvePosition(json, "pos", parent, ctx);
INodeBoolean visible = getEquationBool(json, "visible", ctx, true);
boolean foreground = resolveEquationBool(json, "foreground", ctx, false);
Item item = JsonUtils.getItem(json.json, "id");
int meta = resolveEquationInt(json, "meta", ctx);
ItemStack stack = new ItemStack(item, 1, meta);
ISimpleDrawable icon = new GuiStack(stack);
IGuiArea area = IGuiArea.create(pos, 16, 16);
return new GuiElementDrawable(gui, area, icon, foreground, visible);
}
Aggregations