This commit is contained in:
Bella 2019-12-04 11:55:48 -05:00
parent d4f5ab2ca1
commit 53a5559d77
3 changed files with 31 additions and 3 deletions

View File

@ -20,6 +20,7 @@ import me.zeroeightsix.kami.gui.rgui.util.ContainerHelper;
import me.zeroeightsix.kami.gui.rgui.util.Docking;
import me.zeroeightsix.kami.module.Module;
import me.zeroeightsix.kami.module.ModuleManager;
import me.zeroeightsix.kami.module.modules.sdashb.gui.InfoOverlay;
import me.zeroeightsix.kami.util.ColourHolder;
import me.zeroeightsix.kami.util.LagCompensator;
import me.zeroeightsix.kami.util.Pair;
@ -211,10 +212,17 @@ public class KamiGUI extends GUI {
information.addTickListener(() -> {
information.setText("");
information.addLine("\u00A7b" + KamiMod.KAMI_KANJI + "\u00A73 " + KamiMod.MODVER);
information.addLine("\u00A7b" + Math.round(LagCompensator.INSTANCE.getTickRate()) + Command.SECTIONSIGN() + "3 tps");
information.addLine("\u00A7b" + Wrapper.getMinecraft().debugFPS + Command.SECTIONSIGN() + "3 fps");
if (((InfoOverlay)ModuleManager.getModuleByName("Info")).globalInfoTps.getValue()) {
information.addLine("\u00A7b" + Math.round(LagCompensator.INSTANCE.getTickRate()) + Command.SECTIONSIGN() + "3 tps");
}
if (((InfoOverlay)ModuleManager.getModuleByName("Info")).globalInfoFps.getValue()) {
information.addLine("\u00A7b" + Wrapper.getMinecraft().debugFPS + Command.SECTIONSIGN() + "3 fps");
}
if (((InfoOverlay)ModuleManager.getModuleByName("Info")).globalInfoMem.getValue()) {
information.addLine("\u00A7b" + (Runtime.getRuntime().freeMemory() / 1000000) + Command.SECTIONSIGN() + "3mB free");
}
//information.addLine("\u00A7b" + Runtime.getRuntime().availableProcessors() + Command.SECTIONSIGN() + "3 cores");
information.addLine("\u00A7b" + (Runtime.getRuntime().freeMemory() / 1000000) + Command.SECTIONSIGN() + "3mB free");
//information.addLine("\u00A7b" + Wrapper.getPlayer().getDistance() + Command.SECTIONSIGN() + "3 fps");
//OperatingSystemMXBean.getSystemLoadAverage() / OperatingSystemMXBean.getAvailableProcessors()

View File

@ -78,6 +78,7 @@ public class Module {
PLAYER("Player", false),
MOVEMENT("Movement", false),
EXPERIMENTAL("Experimental", false),
GUI("GUI", false),
HIDDEN("Hidden", true);
boolean hidden;

View File

@ -0,0 +1,19 @@
package me.zeroeightsix.kami.module.modules.sdashb.gui;
import me.zeroeightsix.kami.module.Module;
import me.zeroeightsix.kami.setting.Setting;
import me.zeroeightsix.kami.setting.Settings;
/**
* @author S-B99
* Updated by S-B99 on 30/10/19
*/
@Module.Info(name = "Info", category = Module.Category.GUI, description = "Configures game information overlay")
public class InfoOverlay extends Module {
public Setting<Boolean> globalInfoTps = register(Settings.b("TPS", true));
public Setting<Boolean> globalInfoFps = register(Settings.b("FPS", true));
public Setting<Boolean> globalInfoMem = register(Settings.b("Memory", true));
// private Setting<Boolean> debug = register(Settings.b("Debug", true));
}