use of buildcraft.lib.gui.statement.GuiElementStatementSource in project BuildCraft by BuildCraft.
the class ElementTypeStatementSource method deserialize0.
@Override
public IGuiElement deserialize0(BuildCraftJsonGui gui, IGuiPosition parent, JsonGuiInfo info, JsonGuiElement json) {
FunctionContext ctx = createContext(json);
String source = json.properties.get("source");
StatementContext<?> ctxSource = gui.properties.get(source, StatementContext.class);
String side = json.properties.get("side");
String style = json.properties.get("style");
if (style == null || "flat".equals(style)) {
return new GuiElementStatementSource<>(gui, !"right".equals(side), ctxSource);
// } else if ("ledger.left".equals(layout) || "ledger.right".equals(layout)) {
// TODO!
} else {
throw new JsonSyntaxException("Unknown style '" + style + "'");
}
}
Aggregations