plus plus

This commit is contained in:
Jess H 2024-03-27 02:41:22 +00:00
parent 8cb9c7a312
commit d7652d84bd
6 changed files with 29 additions and 5 deletions

View file

@ -10,7 +10,6 @@ import net.minecraft.client.Minecraft;
import net.minecraftforge.common.MinecraftForge;
import javax.annotation.Nonnull;
import javax.swing.*;
import java.util.ArrayList;
import java.util.Arrays;
@ -58,6 +57,7 @@ public class BaseBand implements Util {
new Thread(() -> {
while (true) {
for (Updater updater : updaters) {
LOGGER.debug("Polling - " + updater.toString());
updater.poll();
}
try {
@ -69,7 +69,8 @@ public class BaseBand implements Util {
}).start();
new Thread(() -> JOptionPane.showMessageDialog(null, "Gaming")).start();
LOGGER.info("Instantiated.");
}
@Nonnull

View file

@ -3,6 +3,7 @@ package com.baseband.client;
import com.baseband.client.module.Feature;
import com.baseband.client.module.command.Test;
import com.baseband.client.module.render.ClickGUI;
import com.baseband.client.module.render.HUD;
/**
* @author TudbuT
@ -14,7 +15,8 @@ public class Setup {
public final String REGISTRY_FILENAME = "baseband.db";
public final Feature[] Features = new Feature[] {
new Test(),
new ClickGUI()
new ClickGUI(),
new HUD()
};

View file

@ -13,13 +13,18 @@ public class ToggleButton extends Component {
this.handle = handle;
this.field = field;
}
public ToggleButton(String s, ConfigHandle handle, String field, Runnable lambda) {
this.lambda = lambda;
this.text = s;
this.handle = handle;
this.field = field;
}
public void setLambda(Runnable lambda) { //Fuck you
this.lambda = lambda;
}
@Override
public synchronized void update() {
green = handle.getContent().getBoolean(field);

View file

@ -33,6 +33,7 @@ public abstract class Feature extends ToggleButton {
public Feature() {
super("Uninit", null, "Enabled");
this.setLambda(this::updateEnabled);
this.text = toString();
}

View file

@ -17,8 +17,11 @@ public class ClickGUI extends Feature {
return "ClickGUI";
}
@Config("Theme")
public GuiTheme.Theme theme = GuiTheme.Theme.TTC;
public GuiTheme.ITheme getTheme() {
return GuiTheme.Theme.TTC;
return theme;
}
@Override

View file

@ -1,10 +1,22 @@
package com.baseband.client.module.render;
import com.baseband.client.BaseBand;
import com.baseband.client.module.Feature;
import com.baseband.client.module.category.Render;
import net.minecraftforge.client.event.RenderGameOverlayEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import java.awt.*;
@Render
public class HUD extends Feature {
@Override
public String toString() {
return "HUD";
}
@SubscribeEvent
public void text(RenderGameOverlayEvent.Text e) {
mc.fontRenderer.drawStringWithShadow("BaseBand - \"" + BaseBand.buildString + "\"", 2,2, Color.GREEN.getRGB());
}
}