probably fix baritone text

This commit is contained in:
Jess H 2024-05-27 10:21:26 +01:00
parent 6bb9099b72
commit 81f9b7994b
2 changed files with 13 additions and 1 deletions

View file

@ -3,4 +3,13 @@ package com.baseband.client.event.events;
import com.baseband.client.event.Event;
public class BaritoneEvent extends Event {
String reason;
public void setReason(String reason) {
this.reason = reason;
}
public String getReason() {
return reason;
}
}

View file

@ -1,5 +1,6 @@
package com.baseband.client.module.client;
import baritone.api.process.IBaritoneProcess;
import com.baseband.client.module.Feature;
import com.baseband.client.module.category.Client;
import com.baseband.client.util.baritone.BaritoneManager;
@ -25,7 +26,9 @@ public class Baritone extends Feature {
@Override
public void onTick() {
text = "Baritone §7[" + BaritoneManager.getCustomGoalProcess().displayName() + "]";
IBaritoneProcess baritoneProcess = BaritoneManager.getBaritone().getPathingControlManager().mostRecentInControl().orElse(null);
text = "Baritone §7[" + (baritoneProcess == null ? "INACTIVE" : baritoneProcess.displayName()) + "]";
}
@Override