#How to create simple gui
1 messages · Page 1 of 1 (latest)
all examples i found there hasn't a second argument, but here its requierd a codec
create class which extends Screen
add widgets, for example:
public ButtonWidget button2;
button2 = ButtonWidget.builder(/*name*/), button -> {
//button logic
})
.dimensions(width / 2, 100, 70, 20)
.tooltip(/*tooltip*/)
.build();
addDrawableChild(button2);
opening menu:
ClientTickEvents.END_CLIENT_TICK.register(client -> {
if(client!=null) {
while (keyBinding.wasPressed()) {
ConfigMenuScreen configMenuScreen = new ConfigMenuScreen();
client.setScreen(configMenuScreen);
}
}
});
on the client sided?
i already created a Screen handler which i couldn't register
i wanted create a gui for a block entity
they need a codec, but if i gave him one i get a error
I haven't worked with this
the error says that somewhere there is a link to a non-existent collection index, I think this doesn’t tell you anything