merge
This commit is contained in:
commit
fe8e9202e2
@ -5,10 +5,18 @@ the original version of the bot for Minecraft 1.8, rebuilt for 1.12.2.
|
||||
# Setup
|
||||
- Open the project in IntelliJ as a Gradle project
|
||||
- Run the Gradle task `setupDecompWorkspace`
|
||||
- Refresh the Gradle project
|
||||
- Run the Gradle task `genIntellijRuns`
|
||||
- Restart IntelliJ and import Gradle changes
|
||||
- Select the "Minecraft Client" launch config and run
|
||||
|
||||
## Command Line
|
||||
```
|
||||
$ gradlew setupDecompWorkspace
|
||||
$ gradlew --refresh-dependencies
|
||||
$ gradlew genIntellijRuns
|
||||
```
|
||||
|
||||
# Chat control
|
||||
<a href="https://github.com/cabaletta/baritone/blob/master/src/main/java/baritone/utils/ExampleBaritoneControl.java">Defined here</a>
|
||||
|
||||
|
@ -323,7 +323,7 @@ public class Settings {
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T> List<Setting<T>> getByValueType(Class<T> klass) {
|
||||
public <T> List<Setting<T>> getAllValuesByType(Class<T> klass) {
|
||||
List<Setting<T>> result = new ArrayList<>();
|
||||
for (Setting<?> setting : allSettings) {
|
||||
if (setting.klass.equals(klass)) {
|
||||
|
@ -190,7 +190,7 @@ public class AStarPathFinder extends AbstractNodeCostSearch implements Helper {
|
||||
return Optional.of(new Path(startNode, bestSoFar[i], numNodes));
|
||||
}
|
||||
}
|
||||
displayChatMessageRaw("Even with a cost coefficient of " + COEFFICIENTS[COEFFICIENTS.length - 1] + ", I couldn't get more than " + bestDist + " blocks =(");
|
||||
displayChatMessageRaw("Even with a cost coefficient of " + COEFFICIENTS[COEFFICIENTS.length - 1] + ", I couldn't get more than " + bestDist + " blocks");
|
||||
displayChatMessageRaw("No path found =(");
|
||||
currentlyRunning = null;
|
||||
return Optional.empty();
|
||||
|
@ -286,7 +286,7 @@ public class ExampleBaritoneControl extends Behavior {
|
||||
event.cancel();
|
||||
return;
|
||||
}
|
||||
List<Settings.Setting<Boolean>> toggleable = Baritone.settings().getByValueType(Boolean.class);
|
||||
List<Settings.Setting<Boolean>> toggleable = Baritone.settings().getAllValuesByType(Boolean.class);
|
||||
for (Settings.Setting<Boolean> setting : toggleable) {
|
||||
if (msg.equalsIgnoreCase(setting.getName())) {
|
||||
setting.value ^= true;
|
||||
|
Loading…
Reference in New Issue
Block a user