control heuristic
This commit is contained in:
parent
fb61b47fb2
commit
bd40c9709d
@ -126,6 +126,16 @@ public class ExampleBaritoneControl extends Behavior {
|
|||||||
event.cancel();
|
event.cancel();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (msg.toLowerCase().startsWith("heuristic")) {
|
||||||
|
try {
|
||||||
|
double d = Double.parseDouble(msg.substring("heuristic".length()).trim());
|
||||||
|
Baritone.settings().costHeuristic.value = d;
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
|
displayChatMessageRaw("Couldn't parse value");
|
||||||
|
}
|
||||||
|
event.cancel();
|
||||||
|
return;
|
||||||
|
}
|
||||||
List<Settings.Setting<Boolean>> toggleable = Baritone.settings().getByValueType(Boolean.class);
|
List<Settings.Setting<Boolean>> toggleable = Baritone.settings().getByValueType(Boolean.class);
|
||||||
for (Settings.Setting<Boolean> setting : toggleable) {
|
for (Settings.Setting<Boolean> setting : toggleable) {
|
||||||
if (msg.equalsIgnoreCase(setting.getName())) {
|
if (msg.equalsIgnoreCase(setting.getName())) {
|
||||||
|
Loading…
Reference in New Issue
Block a user