Skip to content

Commit 90d5575

Browse files
authored
Update Baritone to 1.2.17 (#504)
* updated baritone proof of concept * Use updated official baritone maven * set baritone versions as "changing" * Add more Baritone settings to configure
1 parent 7b505a3 commit 90d5575

File tree

2 files changed

+55
-8
lines changed

2 files changed

+55
-8
lines changed

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,10 @@ dependencies {
109109
compileOnly 'org.jetbrains:annotations:23.0.0'
110110

111111
// This Baritone will NOT be included in the jar
112-
implementation 'com.github.cabaletta:baritone:1.2.14'
112+
implementation('cabaletta:baritone-deobf-unoptimized-mcp-dev:1.2').setChanging(true)
113113

114114
// This Baritone WILL be included in the jar
115-
jarLibs 'cabaletta:baritone-api:1.2'
115+
jarLibs('cabaletta:baritone-api:1.2').setChanging(true)
116116

117117
// Add everything in jarLibs to implementation (compile)
118118
implementation configurations.jarLibs

src/main/kotlin/com/lambda/client/module/modules/client/Baritone.kt

Lines changed: 53 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ object Baritone : Module(
3434
private val allowDownwardTunneling by setting("Downward Tunneling", true, { page == Page.BASIC }, description = "Allow mining blocks directly beneath you.")
3535
private val allowParkour by setting("Allow Parkour", true, { page == Page.BASIC })
3636
private val allowParkourPlace by setting("Allow Parkour Place", true, { allowParkour && page == Page.BASIC })
37-
private val buildInLayers by setting("Build In Layers", false, { page == Page.BASIC }, description = "Build/mine one layer at a time in schematics and selections.")
38-
private val layerOrder by setting("Top To Bottom", false, { buildInLayers && page == Page.BASIC }, description = "Build/mine from top to bottom in schematics and selections.")
3937

4038
/* Visual */
4139
private val freeLook by setting("Free Look", true, { page == Page.VISUAL }, description = "Move without having to force the client-sided rotations.")
@@ -50,6 +48,22 @@ object Baritone : Module(
5048
private val allowWaterBucketFall by setting("Water Bucket Clutch", true, { page == Page.FALL }, description = "Uses a water bucket to get down quickly.")
5149
private val maxFallHeightBucket by setting("Max Bucket Height", 20, 10..250, 10, { allowWaterBucketFall && page == Page.FALL }, description = "Max height that baritone can use a water bucket.")
5250

51+
/* Build */
52+
private val buildInLayers by setting("Build In Layers", false, { page == Page.BUILD }, description = "Build/mine one layer at a time in schematics and selections.")
53+
private val layerOrder by setting("Top To Bottom", false, { buildInLayers && page == Page.BUILD }, description = "Build/mine from top to bottom in schematics and selections.")
54+
private val startAtLayer by setting("Start At Layer", 0, 0..256, 1, visibility = { buildInLayers && page == Page.BUILD }, description = "Start building the schematic at a specific layer.")
55+
private val layerHeight by setting("Layer Height", 1, 1..50, 1, visibility = { buildInLayers && page == Page.BUILD }, description = "How high should the individual layers be?")
56+
private val skipFailedLayers by setting("Skip Failed Layers", false, { buildInLayers && page == Page.BUILD }, description = "If a layer is unable to be constructed, just skip it.")
57+
private val buildOnlySelection by setting("Build Only Selection", false, { page == Page.BUILD }, description = "Only build the selected part of schematics")
58+
private val buildIgnoreExisting by setting("Build Ignore Existing", false, { page == Page.BUILD }, description = "If this is true, the builder will treat all non-air blocks as correct. It will only place new blocks.")
59+
private val buildIgnoreDirection by setting("Build Ignore Direction", false, { page == Page.BUILD }, description = "If this is true, the builder will ignore directionality of certain blocks like glazed terracotta.")
60+
private val mapArtMode by setting("Map Art Mode", false, { page == Page.BUILD }, description = "Build in map art mode, which makes baritone only care about the top block in each column")
61+
private val schematicOrientationX by setting("Schematic Orientation X", false, { page == Page.BUILD }, description = "When this setting is true, build a schematic with the highest X coordinate being the origin, instead of the lowest")
62+
private val schematicOrientationY by setting("Schematic Orientation Y", false, { page == Page.BUILD }, description = "When this setting is true, build a schematic with the highest Y coordinate being the origin, instead of the lowest")
63+
private val schematicOrientationZ by setting("Schematic Orientation Z", false, { page == Page.BUILD }, description = "When this setting is true, build a schematic with the highest Z coordinate being the origin, instead of the lowest")
64+
private val okIfWater by setting("Ok If Water", false, { page == Page.BUILD }, description = "Override builder's behavior to not attempt to correct blocks that are currently water")
65+
private val incorrectSize by setting("Incorrect Size", 100, 1..1000, 1, { page == Page.BUILD }, description = "The set of incorrect blocks can never grow beyond this size")
66+
5367
/* Advanced */
5468
private val blockReachDistance by setting("Reach Distance", 4.5f, 1.0f..10.0f, 0.5f, { page == Page.ADVANCED }, description = "Max distance baritone can place blocks.")
5569
private val enterPortals by setting("Enter Portals", true, { page == Page.ADVANCED }, description = "Baritone will walk all the way into the portal, instead of stopping one block before.")
@@ -62,9 +76,19 @@ object Baritone : Module(
6276
private val mobAvoidanceCoefficient by setting("Mob Avoidance Coefficient", 1.5f, 0f..5f, 0.5f, visibility = { avoidance && page == Page.ADVANCED }, description = "Set to 1.0 to effectively disable this feature. Set below 1.0 to go out of your way to walk near mobs.")
6377
private val mobSpawnerAvoidanceRadius by setting("Mob Spawner Avoidance Radius", 10, 0..60, 10, visibility = { avoidance && page == Page.ADVANCED }, description = "Distance to avoid mob spawners.")
6478
private val mobSpawnerAvoidanceCoefficient by setting("Mob Spawner Avoidance Coefficient", 1.5f, 0f..5f, 0.5f, visibility = { avoidance && page == Page.ADVANCED }, description = "Set to 1.0 to effectively disable this feature. Set below 1.0 to go out of your way to walk near mob spawners.")
79+
private val preferSilkTouch by setting("Prefer Silk Touch", false, { page == Page.ADVANCED }, description = "Always prefer silk touch tools over regular tools.")
80+
private val backfill by setting("Backfill", false, { page == Page.ADVANCED }, description = "Fill in blocks behind you")
81+
private val chunkCaching by setting("Chunk Caching", true, { page == Page.ADVANCED }, description = "Download all chunks in simplified 2-bit format and save them for better very-long-distance pathing.")
82+
private val assumeStep by setting("Assume Step", false, { page == Page.ADVANCED }, description = "Assume step functionality; don't jump on an Ascend.")
83+
private val assumeExternalAutoTool by setting("Assume External AutoTool", false, { page == Page.ADVANCED }, description = "Disable baritone's auto-tool at runtime, but still assume that another mod will provide auto tool functionality")
84+
private val autoTool by setting("AutoTool", true, { page == Page.ADVANCED }, description = "Automatically select the best available tool")
85+
private val assumeSafeWalk by setting("Assume Safe Walk", false, { page == Page.ADVANCED }, description = "Assume safe walk functionality; don't sneak on a backplace traverse.")
86+
private val allowJumpAt256 by setting("Allow Jump At 256", false, { page == Page.ADVANCED }, description = "If true, parkour is allowed to make jumps when standing on blocks at the maximum height, so player feet is y=256")
87+
private val allowDiagonalDescend by setting("Allow Diagonal Descend", false, { page == Page.ADVANCED }, description = "Allow descending diagonally. Safer than allowParkour yet still slightly unsafe, can make contact with unchecked adjacent blocks, so it's unsafe in the nether.")
88+
private val allowDiagonalAscend by setting("Allow Diagonal Ascend", false, { page == Page.ADVANCED }, description = "Allow diagonal ascending. Actually pretty safe, much safer than diagonal descend tbh")
6589

6690
private enum class Page {
67-
BASIC, VISUAL, FALL, ADVANCED
91+
BASIC, VISUAL, FALL, BUILD, ADVANCED
6892
}
6993

7094
init {
@@ -105,14 +129,12 @@ object Baritone : Module(
105129
it.chatControl.value = false // enable chatControlAnyway if you want to use it
106130
/* Basic */
107131
it.allowBreak.value = allowBreak
108-
it.allowPlace.value = allowPlace
109132
it.allowSprint.value = allowSprint
133+
it.allowPlace.value = allowPlace
110134
it.allowInventory.value = allowInventory
111135
it.allowDownward.value = allowDownwardTunneling
112136
it.allowParkour.value = allowParkour
113137
it.allowParkourPlace.value = allowParkourPlace
114-
it.buildInLayers.value = buildInLayers
115-
it.layerOrder.value = layerOrder
116138
/* Visual */
117139
it.freeLook.value = freeLook
118140
it.renderGoal.value = renderGoal
@@ -122,12 +144,37 @@ object Baritone : Module(
122144
it.maxFallHeightNoWater.value = maxFallHeightNoWater
123145
it.allowWaterBucketFall.value = allowWaterBucketFall
124146
it.maxFallHeightBucket.value = maxFallHeightBucket
147+
/* Build */
148+
it.buildInLayers.value = buildInLayers
149+
it.layerOrder.value = layerOrder
150+
it.layerHeight.value = layerHeight
151+
it.startAtLayer.value = startAtLayer
152+
it.skipFailedLayers.value = skipFailedLayers
153+
it.buildOnlySelection.value = buildOnlySelection
154+
it.buildIgnoreExisting.value = buildIgnoreExisting
155+
it.buildIgnoreDirection.value = buildIgnoreDirection
156+
it.mapArtMode.value = mapArtMode
157+
it.schematicOrientationX.value = schematicOrientationX
158+
it.schematicOrientationY.value = schematicOrientationY
159+
it.schematicOrientationZ.value = schematicOrientationZ
160+
it.okIfWater.value = okIfWater
161+
it.incorrectSize.value = incorrectSize
125162
/* Advanced */
163+
it.preferSilkTouch.value = preferSilkTouch
164+
it.backfill.value = backfill
165+
it.chunkCaching.value = chunkCaching
126166
it.blockReachDistance.value = blockReachDistance
127167
it.enterPortal.value = enterPortals
128168
it.blockPlacementPenalty.value = blockPlacementPenalty.toDouble()
129169
it.jumpPenalty.value = jumpPenalty.toDouble()
130170
it.assumeWalkOnWater.value = assumeWalkOnWater
171+
it.assumeStep.value = assumeStep
172+
it.assumeExternalAutoTool.value = assumeExternalAutoTool
173+
it.autoTool.value = autoTool
174+
it.assumeSafeWalk.value = assumeSafeWalk
175+
it.allowJumpAt256.value = allowJumpAt256
176+
it.allowDiagonalDescend.value = allowDiagonalDescend
177+
it.allowDiagonalAscend.value = allowDiagonalAscend
131178
it.failureTimeoutMS.value = failureTimeout * 1000L
132179
it.avoidance.value = avoidance
133180
it.mobAvoidanceRadius.value = mobAvoidanceRadius

0 commit comments

Comments
 (0)