I'm trying to make a gui to edit values and settings using a command, but the gui just does nothing apart from showing me the "init gui" message I put i the initGui() method.
package xyz.jaffaaaa.zealotmanager;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.util.ChatComponentText;
public class GuiHandler extends GuiScreen {
private GuiButton reset;
private ZealotManager zm;
public GuiHandler(ZealotManager zm) {
this.zm=zm;
}
@Override
public void initGui() {
super.initGui();
this.buttonList.clear();
Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText("init gui"));
this.buttonList.add(reset = new GuiButton(0, this.width / 2 - 100, this.height / 2, "Reset Counters"));
}
@Override
protected void actionPerformed(GuiButton button) {
if (button == reset) {
zm.counter.zealotsSinceLastEye = 0;
zm.counter.totalEyes = 0;
zm.counter.totalZealots = 0;
}
}
@Override
public void drawScreen(int mouseX, int mouseY, float partialTicks) {
super.drawScreen(mouseX, mouseY, partialTicks);
drawDefaultBackground();
}
}