The render() method is in the handler for the RenderGameOverlayEvent.Text event. But the HUD is not rendered when loading the world. But I still see the render only when I open my ClickGUI.
EventHandler:
public class EventProcessor {public EventProcessor() {MinecraftForge.EVENT_BUS.register(this);}@SubscribeEventpublic void onRender(RenderGameOverlayEvent.Text e) {Client.getInstance().gui.render(); //gui - instance of MinecraftHUDGUI}}
Block of code with initialization of HUDClickGUI:
gui = new HUDClickGUI(guiInterface, null);Toggleable hudToggle=new Toggleable() {@Override public void toggle() {}@Override public boolean isOn() {return hudEditor;}};Client.getInstance().moduleManager.getAllHUDModules().forEach(m -> {m.init(theme);gui.addComponent(new HUDPanel(m.getComponent(), theme.getCategoryRenderer(), m, new SettingsAnimation(ClickGUI.animationSpeed), hudToggle, 2));});
The render() method is in the handler for the RenderGameOverlayEvent.Text event. But the HUD is not rendered when loading the world. But I still see the render only when I open my ClickGUI.
EventHandler:
public class EventProcessor {
public EventProcessor() {
MinecraftForge.EVENT_BUS.register(this);
}
@SubscribeEvent
public void onRender(RenderGameOverlayEvent.Text e) {
Client.getInstance().gui.render(); //gui - instance of MinecraftHUDGUI
}
}
Block of code with initialization of HUDClickGUI:
gui = new HUDClickGUI(guiInterface, null);
Toggleable hudToggle=new Toggleable() {
@Override public void toggle() {}
@Override public boolean isOn() {return hudEditor;}
};
Client.getInstance().moduleManager.getAllHUDModules().forEach(m -> {
m.init(theme);
gui.addComponent(new HUDPanel(m.getComponent(), theme.getCategoryRenderer(), m, new SettingsAnimation(ClickGUI.animationSpeed), hudToggle, 2));
});