Skip to main content

Settings

Baritone's settings are upstream Baritone's, under the same names: allowBreak, allowParkour, primaryTimeoutMS and so on. If you've used Baritone's #set command on Java, these are the same settings.

const baritone = ctx.session.baritone;

baritone.setSettings({ allowParkour: true, allowBreak: false });
baritone.getSettings().allowParkour; // true
MethodDescription
getSettings()All the settings, as a BaritoneSettings object. A copy: changing it changes nothing.
setSettings(changes)Change some of the settings. The ones you leave out keep their values. A list replaces the old list as a whole.

setSettings ignores names it doesn't know. A value of the wrong type (allowBreak: "yes") throws a TypeError, and then none of the changes are made.

Settings are global

The settings are shared by every Baritone: every script, and every session the client has open. They're also not saved. They go back to the defaults when the client restarts.

If your module changes a setting, put it back when the module is disabled:

let saved: Partial<BaritoneSettings> | null = null;

ctx.onEnable(() => {
const b = ctx.session.baritone;
const s = b.getSettings();
saved = { allowBreak: s.allowBreak, allowPlace: s.allowPlace };
b.setSettings({ allowBreak: false, allowPlace: false });
});
ctx.onDisable(() => {
if (saved) ctx.session.baritone.setSettings(saved);
saved = null;
});

Changes apply from the next calculation on. A path that's already planned keeps the settings it was planned with.

How much of the world Baritone sees​

Baritone only knows the chunks around the player. It takes them from the client's world as the player gets near them, and drops them as the player moves away.

MemberTypeDefaultDescription
chunkRadiusnumber12How far around the player, in chunks, Baritone keeps the world. Chunks farther than this (plus a margin of one) are dropped.
chunkRequestsPerTicknumber16How many chunks Baritone takes from the client's world per tick, at most. Nearest first.

These two belong to one session's Baritone, unlike the settings.

A bigger radius lets Baritone plan farther ahead, but it can't see chunks the client doesn't have. Going past the client's render distance does nothing. Lower chunkRequestsPerTick if loading a lot of chunks at once, like after a teleport, makes ticks stutter.

All settings​

Every setting starts at upstream's default. Where Bedrock differs, the default is Bedrock's: block names, and costHeuristic, since sprinting costs less on Bedrock.

Block and item lists hold Bedrock names, like "minecraft:cobblestone".

Breaking & placing​

SettingDefaultDescription
allowBreaktrueBreak blocks.
allowBreakAnyway[]Blocks it may break even with allowBreak off.
allowPlacetruePlace blocks.
allowPlaceInFluidsSourcetruePlace blocks into fluid sources.
allowPlaceInFluidsFlowtruePlace blocks into flowing fluid.
acceptableThrowawayItemsdirt, cobblestone, netherrack, stoneBlocks it may place to bridge, pillar and fill.
blocksToAvoidtrip wireBlocks it paths around.
blocksToDisallowBreaking[]Blocks it never breaks.
blocksToAvoidBreakingcrafting table, furnace, lit furnace, chest, trapped chestBlocks it breaks only if it has to.
avoidBreakingMultiplier0.1How much it avoids blocksToAvoidBreaking. Above 1 it prefers breaking them instead.
avoidUpdatingFallingBlockstrueNever break a block next to unsupported sand or gravel.
pauseMiningForFallingBlockstrueWait for falling blocks to land before going on.
strictLiquidCheckfalseNever break a block next to a liquid.
walkWhileBreakingtrueKeep walking forward while breaking what's in the way.
blockReachDistance4.5How far it reaches to break and place.
blockBreakSpeed6Ticks between finishing a block and starting the next. Only for blocks that take more than a tick.
rightClickSpeed4Ticks between right clicks.

Movement​

SettingDefaultDescription
allowSprinttrueSprint.
sprintAscendstrueSprint and jump a block early when going up.
sprintInWatertrueKeep sprinting in water.
allowParkourfalseJump gaps. Unreliable around corners.
allowParkourPlacefalsePlace a block to land on while jumping a gap.
allowParkourAscendtrueJump gaps upward. Only with allowParkour.
allowDiagonalDescendfalseGo down diagonally. Riskier, and unsafe in the nether.
allowDiagonalAscendfalseGo up diagonally.
allowOvershootDiagonalDescendtrueSprint through a descend followed by a diagonal.
allowDownwardtrueMine the block under its feet. Off makes it dig staircases instead of shafts.
allowVinesfalseExtra vine moves. Rarely useful, and can get it stuck.
allowWalkOnBottomSlabtrueWalk on bottom slabs. Off is more reliable.
allowWalkOnMagmaBlocksfalseSneak across magma blocks.
allowJumpAtBuildLimitfalseParkour while standing at the build limit.
overshootTraversetrueCount a move as done if it overshoots by a block.
maxFallHeightNoWater3The farthest it falls onto solid ground.
maxFallHeightBucket20The farthest it falls with a water bucket.
allowWaterBucketFalltrueFall farther, placing water to land in and picking it back up. Needs a water bucket in the hotbar, and an empty one to pick the water up. Never in the Nether.
assumeWalkOnWaterfalsePath over water as if it were solid, for when another module (Jesus) handles it.
assumeWalkOnLavafalseThe same, for lava.
assumeStepfalseDon't jump to go up a block, for when another module (Step) handles it.
assumeSafeWalkfalseDon't sneak when placing behind itself, for when another module (Safe Walk) handles it.
enterPortaltrueWalk into a nether portal it paths to, instead of stopping beside it.

Costs & avoidance​

SettingDefaultDescription
blockPlacementPenalty20Extra cost of placing a block, to save throwaway blocks. Lower to place more.
blockBreakAdditionalPenalty2Extra cost of breaking a block, as a tie-breaker.
jumpPenalty2Extra cost of jumping, since it uses hunger.
walkOnWaterOnePenalty3Extra cost of walking on water.
considerPotionEffectstrueAccount for Haste and Mining Fatigue in break costs.
costHeuristic3.492The A* heuristic. Higher finds a path faster but a worse one. Don't go below the default.
backtrackCostFavoringCoefficient0.5Favor going back along the previous path. 1 turns it off.
avoidancefalseTurns on the four settings below. Costs some time before each path.
mobAvoidanceCoefficient1.5How much to avoid mobs. Below 1 seeks them out.
mobAvoidanceRadius8How far to keep from mobs.
mobSpawnerAvoidanceCoefficient2How much to avoid spawners.
mobSpawnerAvoidanceRadius16How far to keep from spawners.

Inventory & tools​

SettingDefaultDescription
autoTooltrueSwitch to the best tool for each block.
assumeExternalAutoToolfalsePlan as if the best tool is used, but leave switching to another module.
preferSilkTouchfalsePrefer Silk Touch tools, when just as fast.
useSwordToMinetrueAllow swords as mining tools.
itemSaverfalseStop using a tool just before it breaks.
itemSaverThreshold10The durability itemSaver leaves.
allowInventoryfalseMove items from the inventory into the hotbar when it needs them.
ticksBetweenInventoryMoves1Ticks between those moves.
inventoryMoveOnlyIfStationaryfalseStand still while moving items.

Mining​

SettingDefaultDescription
legitMinefalseOnly mine ores it can see, with no x-ray. It always explores then.
legitMineYLevel-59The height to strip mine at with legitMine.
legitMineIncludeDiagonalsfalseWith legitMine, also "see" ores touching found ones diagonally.
minYLevelWhileMining0The lowest height to mine at. 0 for none.
maxYLevelWhileMining2031The highest height to mine at.
allowOnlyExposedOresfalseOnly mine ores touching air, against anti-xray.
allowOnlyExposedOresDistance1How far around an ore to look for air. Keep it low.
exploreForBlockstrueExplore when it knows of no matching blocks, instead of giving up.
mineGoalUpdateInterval5Ticks between rescans for blocks. 0 turns it off.
mineMaxOreLocationsCount64The most block locations it keeps.
maxCachedWorldScanCount10Stop searching what it remembers after this many blocks.
extendCacheOnThresholdfalseAlso scan the loaded world when that search finds few.
forceInternalMiningtrueMine two blocks of a vein at once where it can.
internalMiningAirExceptiontrueOnly with forceInternalMining: skip it when the block next to the goal is air.
mineScanDroppedItemstrueAlso go for dropped items of the blocks it mines.
mineDropLoiterDurationMSThanksLouca250Milliseconds to wait for a drop after mining a block.
cancelOnGoalInvalidationtrueStop as soon as the goal block is gone, instead of walking into its spot.
blacklistClosestOnFailuretrueWhen there's no path to the nearest block, skip it and try the next.

Exploring & farming​

SettingDefaultDescription
exploreMaintainY64The height to stay at while exploring. -1 for none.
worldExploringChunkOffset0Aim this many chunks beyond the nearest unseen one.
exploreChunkSetMinimumSize10How many unseen chunks to aim for at once.
disableCompletionCheckfalseSkip checking whether there's anything left to explore.
replantCropstrueReplant crops when farming, and leave cactus and sugar cane to regrow.
replantNetherWartfalseAlso replant nether wart. Only with replantCrops.
farmMaxScanSize256The most crops it looks for at once.
farmUsingSelectionfalseOnly farm inside a selection. There's no way to make one here, so leave it off.

Path calculation​

SettingDefaultDescription
primaryTimeoutMS500Stop calculating after this long, if a path was found.
failureTimeoutMS2000Stop calculating after this long, path or not.
planAheadPrimaryTimeoutMS4000primaryTimeoutMS, for planning the next segment.
planAheadFailureTimeoutMS5000failureTimeoutMS, for planning the next segment.
planningTickLookahead150Start planning the next segment when this many ticks of the current one are left.
splicePathtrueJoin a next segment onto the current one.
pathingMaxChunkBorderFetch50How many times a calculation may reach past known chunks before it stops there.
cutoffAtLoadBoundaryfalseCut a path off where the loaded chunks end.
pathCutoffFactor0.9Keep this much of each path and drop the rest. 0.9 drops the last 10%.
pathCutoffMinimumLength30Only cut paths of at least this many moves.
simplifyUnloadedYCoordtrueTreat a block goal in unseen chunks as an xz goal until close.
maxCostIncrease10Plan again if a move got this much costlier since it was planned.
costVerificationLookahead5Stop this many moves short of something that became impassable.
movementTimeoutTicks100Give up on a move that takes this many ticks longer than expected.
maxPathHistoryLength300Forget the oldest moves past this many.
pathHistoryCutoffAmount50How many moves to forget at once.
minimumImprovementRepropagationtrueIgnore cost improvements under 0.01 ticks.
pathingMapDefaultSize1024Initial size of the calculation's node map.
pathingMapLoadFactor0.75Load factor of that map.
pathThroughCachedOnlyfalseOnly path through what it remembers. Don't.
slowPathfalseCalculate slowly, for debugging.
slowPathTimeDelayMS100Milliseconds per node with slowPath.
slowPathTimeoutMS40000The timeout with slowPath.

Looking​

SettingDefaultDescription
randomLooking0.01Degrees of random jitter on yaw and pitch, every tick. 0 turns it off.
randomLooking1132More random jitter, on yaw only. 0 turns it off.
remainWithExistingLookDirectiontrueKeep the direction it already faces when it can.

Arrival & everything else​

SettingDefaultDescription
rightClickContainerOnArrivaltrueOpen a container it was sent to with getToBlock.
axisHeight120The height of the axis goal.
backfillfalseFill in the blocks it broke behind it.
chatDebugfalseBaritone's messages go to the client log, not chat. This adds its debug messages.
censorCoordinatesfalseHide coordinates when printing goals, including goal.
disconnectOnArrivalfalseDisconnect on arrival. Here it only logs a warning.
desktopNotificationsfalseHere these go to the client log as warnings and errors.
notificationOnPathCompletetrueOnly with desktopNotifications.
notificationOnFarmFailtrueOnly with desktopNotifications.
notificationOnExploreFinishedtrueOnly with desktopNotifications.
notificationOnMineFailtrueOnly with desktopNotifications.
followOffsetDistance, followOffsetDirection, followRadius, followTargetMaxDistanceNo effect. There's no follow command.