silk-igui
The Inventory GUI (igui
in short) provides a high level server-side GUI API. You build the GUI using a custom and easy-to-use builder DSL.
The GUI rerenders automatically if the state changes, it provides animations and "compounds" which are an easy-to-use abstraction for listing a lot of elements of the same type.
Dependency
modImplementation("net.silkmc:silk-igui:1.10.4")
Content copied to clipboard
Using the igui builder
Create a new gui
The igui function opens up a new gui builder. Use the page function to add a new page to this gui, you can that function as often as you want.
igui(GuiType.NINE_BY_SIX, "My cool gui".literal, defaultPageKey = 1) {
page(1) {
// access to the page builder inside here
}
}
Content copied to clipboard
The page builder
The page builder is the most important part of the gui dsl. Inside this builder, you have access all functions adding elements to the gui.