forked from RepoMirrors/kami-blue
added baritone frame to gui
This commit is contained in:
parent
8892f461c6
commit
44b39a4ca8
|
@ -1,5 +1,6 @@
|
|||
package me.zeroeightsix.kami.gui.kami;
|
||||
|
||||
import baritone.api.BaritoneAPI;
|
||||
import com.mojang.realmsclient.gui.ChatFormatting;
|
||||
import me.zeroeightsix.kami.KamiMod;
|
||||
import me.zeroeightsix.kami.gui.kami.component.ActiveModules;
|
||||
|
@ -18,6 +19,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.modules.client.InfoOverlay;
|
||||
import me.zeroeightsix.kami.module.modules.movement.BaritoneWalk;
|
||||
import me.zeroeightsix.kami.util.ColourHolder;
|
||||
import me.zeroeightsix.kami.util.Friends;
|
||||
import me.zeroeightsix.kami.util.Pair;
|
||||
|
@ -45,6 +47,7 @@ import static me.zeroeightsix.kami.util.InfoCalculator.cardinalToAxis;
|
|||
/**
|
||||
* Created by 086 on 25/06/2017.
|
||||
* Updated by dominikaaaa on 28/01/20
|
||||
* Updated by Dewy on the 22nd of April, 2020
|
||||
* @see me.zeroeightsix.kami.module.modules.client.InventoryViewer
|
||||
*/
|
||||
public class KamiGUI extends GUI {
|
||||
|
@ -291,6 +294,36 @@ public class KamiGUI extends GUI {
|
|||
friends.setFontRenderer(fontRenderer);
|
||||
frames.add(frame);
|
||||
|
||||
/*
|
||||
* Baritone
|
||||
*/
|
||||
frame = new Frame(getTheme(), new Stretcherlayout(1), "Baritone");
|
||||
frame.setCloseable(false);
|
||||
frame.setPinnable(true);
|
||||
frame.setMinimumWidth(75);
|
||||
Label processes = new Label("");
|
||||
processes.setShadow(true);
|
||||
|
||||
Frame frameFinal = frame;
|
||||
|
||||
processes.addTickListener(() -> {
|
||||
processes.setText("");
|
||||
|
||||
if (!frameFinal.isMinimized() && BaritoneAPI.getProvider().getPrimaryBaritone().getCustomGoalProcess().getGoal() != null) {
|
||||
if (MODULE_MANAGER.getModule(BaritoneWalk.class).isEnabled()) {
|
||||
processes.addLine("Current Process: AutoWalk (" + BaritoneWalk.direction + ")");
|
||||
} else {
|
||||
processes.addLine("Current Process: " + BaritoneAPI.getProvider().getPrimaryBaritone().getCustomGoalProcess().getGoal().toString());
|
||||
}
|
||||
} else {
|
||||
processes.setWidth(70);
|
||||
}
|
||||
});
|
||||
|
||||
frame.addChild(processes);
|
||||
processes.setFontRenderer(fontRenderer);
|
||||
frames.add(frame);
|
||||
|
||||
/*
|
||||
* Text Radar
|
||||
*/
|
||||
|
|
|
@ -6,6 +6,9 @@ import me.zeroeightsix.kami.setting.Setting;
|
|||
import me.zeroeightsix.kami.setting.Settings;
|
||||
import me.zeroeightsix.kami.util.MessageSendHelper;
|
||||
|
||||
/**
|
||||
* Created by Dewy on the 21st of April, 2020
|
||||
*/
|
||||
@Module.Info(
|
||||
name = "Baritone",
|
||||
category = Module.Category.CLIENT,
|
||||
|
@ -34,6 +37,7 @@ public class Baritone extends Module {
|
|||
enable();
|
||||
}
|
||||
|
||||
// ._.
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
BaritoneAPI.getSettings().allowBreak.value = allowBreak.getValue();
|
||||
|
|
|
@ -17,7 +17,7 @@ import static me.zeroeightsix.kami.util.MathsUtils.normalizeAngle;
|
|||
*/
|
||||
@Module.Info(name = "BaritoneWalk", description = "AutoWalk with Baritone pathfinding.", category = Module.Category.MOVEMENT)
|
||||
public class BaritoneWalk extends Module {
|
||||
private String direction;
|
||||
public static String direction;
|
||||
|
||||
// Very shittily done, but this check is not that taxing on performance cos it is NOT performed every tick.
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue