yo I made the following class, everything works fine exept for some reason the height and width are always set to the width and heigth of the entire screen instead of the parameters I gave it in its constructor
private int test;
private MinecraftClient client = MinecraftClient.getInstance();
public UserInterface(UserInterfaceData interfaceData) {
this(interfaceData.title(), interfaceData.height(), interfaceData.width());
}
public UserInterface(String title, int height, int width) {
super(Text.of(title));
this.height = height;
this.width = width;
test = height;
}
@Override
protected void init() {
super.init();
addDrawableChild(new TextWidget(title, textRenderer));
//addDrawable(new TextWidget(Text.of(String.valueOf(height))), textRenderer);
MinecraftClient.getInstance().inGameHud.getChatHud().addMessage(Text.of(String.valueOf(test)));
}
}```