SoulFire LogoSoulFire

SoulFireTasks

Public TypeScript members of SoulFireTasks.

Generated from the pinned SDK source. Use the matching installation. Each source link points to this baseline.

Compose Effect operations with yield* inside a scoped workflow. Properties expose sub-clients and state.

start

Starts a task from its input message. resultSchema types result().

start<
  Input extends DescMessage,
  Result extends DescMessage | undefined = undefined,
>(
  inputSchema: Input,
  input: MessageInitShape<Input>,
  resultSchema?: Result,
  options: TaskStartOptions = {},
): Effect.Effect<SoulFireTask<Result>, SoulFireOperationError>

Source

run

Starts a task and streams its events until it ends. Unless disconnectPolicy says otherwise, the task is cancelled if the stream is.

run<Input extends DescMessage>(
  inputSchema: Input,
  input: MessageInitShape<Input>,
  options: TaskStartOptions = {},
): Stream.Stream<BotTaskEvent, SoulFireOperationError>

Source

goTo

Moves the bot to goal (see goals).

goTo(
  goal: PathfindGoal,
  options: GoToTaskOptions = {},
): Effect.Effect<
  SoulFireTask<typeof GoToTaskResultSchema>,
  SoulFireOperationError
>

Source

runGoTo

runGoTo(
  goal: PathfindGoal,
  options: GoToTaskOptions = {},
): Stream.Stream<BotTaskEvent, SoulFireOperationError>

Source

followEntity

Keeps within distance of an entity as it moves. distance defaults to 3.

followEntity(
  target: FollowEntityTarget,
  distance = 3,
  options: FollowEntityTaskOptions = {},
): Effect.Effect<
  SoulFireTask<typeof FollowEntityTaskResultSchema>,
  SoulFireOperationError
>

Source

runFollowEntity

distance defaults to 3.

runFollowEntity(
  target: FollowEntityTarget,
  distance = 3,
  options: FollowEntityTaskOptions = {},
): Stream.Stream<BotTaskEvent, SoulFireOperationError>

Source

attackEntity

Chases one entity and attacks it until it's defeated or maximumAttacks is reached.

attackEntity(
  target: AttackEntityTarget,
  options: AttackEntityTaskOptions = {},
): Effect.Effect<
  SoulFireTask<typeof AttackEntityTaskResultSchema>,
  SoulFireOperationError
>

Source

runAttackEntity

runAttackEntity(
  target: AttackEntityTarget,
  options: AttackEntityTaskOptions = {},
): Stream.Stream<BotTaskEvent, SoulFireOperationError>

Source

attackNearest

Attacks the nearest entity matching selector within radius, then the next, up to maximumTargets.

attackNearest(
  selector: MessageInitShape<typeof EntitySelectorSchema>,
  options: AttackNearestTaskOptions = {},
): Effect.Effect<
  SoulFireTask<typeof AttackNearestTaskResultSchema>,
  SoulFireOperationError
>

Source

runAttackNearest

runAttackNearest(
  selector: MessageInitShape<typeof EntitySelectorSchema>,
  options: AttackNearestTaskOptions = {},
): Stream.Stream<BotTaskEvent, SoulFireOperationError>

Source

rangedAttack

Shoots an entity with a bow or crossbow from between minimumRange and maximumRange, leading the target and aiming for the arrow's drop.

rangedAttack(
  target: AttackEntityTarget,
  options: RangedAttackTaskOptions = {},
): Effect.Effect<
  SoulFireTask<typeof RangedAttackTaskResultSchema>,
  SoulFireOperationError
>

Source

runRangedAttack

runRangedAttack(
  target: AttackEntityTarget,
  options: RangedAttackTaskOptions = {},
): Stream.Stream<BotTaskEvent, SoulFireOperationError>

Source

flee

Moves away from the nearest threat until it is safeDistance away.

flee(
  threats: MessageInitShape<typeof EntitySelectorSchema>,
  options: FleeTaskOptions = {},
): Effect.Effect<
  SoulFireTask<typeof FleeTaskResultSchema>,
  SoulFireOperationError
>

Source

runFlee

runFlee(
  threats: MessageInitShape<typeof EntitySelectorSchema>,
  options: FleeTaskOptions = {},
): Stream.Stream<BotTaskEvent, SoulFireOperationError>

Source

guard

Defends position from threats.

guard(
  position: MessageInitShape<typeof BlockPositionSchema>,
  threats: MessageInitShape<typeof EntitySelectorSchema>,
  options: GuardTaskOptions = {},
): Effect.Effect<
  SoulFireTask<typeof GuardTaskResultSchema>,
  SoulFireOperationError
>

Source

runGuard

runGuard(
  position: MessageInitShape<typeof BlockPositionSchema>,
  threats: MessageInitShape<typeof EntitySelectorSchema>,
  options: GuardTaskOptions = {},
): Stream.Stream<BotTaskEvent, SoulFireOperationError>

Source

protect

Defends an entity from threats.

protect(
  entity: AttackEntityTarget,
  threats: MessageInitShape<typeof EntitySelectorSchema>,
  options: GuardTaskOptions = {},
): Effect.Effect<
  SoulFireTask<typeof GuardTaskResultSchema>,
  SoulFireOperationError
>

Source

runProtect

runProtect(
  entity: AttackEntityTarget,
  threats: MessageInitShape<typeof EntitySelectorSchema>,
  options: GuardTaskOptions = {},
): Stream.Stream<BotTaskEvent, SoulFireOperationError>

Source

sleep

Walks to a bed and gets in.

sleep(
  options: SleepTaskOptions = {},
): Effect.Effect<
  SoulFireTask<typeof SleepTaskResultSchema>,
  SoulFireOperationError
>

Source

runSleep

runSleep(
  options: SleepTaskOptions = {},
): Stream.Stream<BotTaskEvent, SoulFireOperationError>

Source

fish

Casts, waits for a bite, reels in, and repeats.

fish(
  options: FishTaskOptions = {},
): Effect.Effect<
  SoulFireTask<typeof FishTaskResultSchema>,
  SoulFireOperationError
>

Source

runFish

runFish(
  options: FishTaskOptions = {},
): Stream.Stream<BotTaskEvent, SoulFireOperationError>

Source

farm

Harvests mature crops around center and replants the ones that need it.

farm(
  options: FarmTaskOptions = {},
): Effect.Effect<
  SoulFireTask<typeof FarmTaskResultSchema>,
  SoulFireOperationError
>

Source

runFarm

runFarm(
  options: FarmTaskOptions = {},
): Stream.Stream<BotTaskEvent, SoulFireOperationError>

Source

breed

Feeds pairs of adult animals until the server confirms both are in love mode.

breed(
  options: BreedTaskOptions = {},
): Effect.Effect<
  SoulFireTask<typeof BreedTaskResultSchema>,
  SoulFireOperationError
>

Source

runBreed

runBreed(
  options: BreedTaskOptions = {},
): Stream.Stream<BotTaskEvent, SoulFireOperationError>

Source

explore

Visits unexplored cells around origin.

explore(
  options: ExploreTaskOptions = {},
): Effect.Effect<
  SoulFireTask<typeof ExploreTaskResultSchema>,
  SoulFireOperationError
>

Source

runExplore

runExplore(
  options: ExploreTaskOptions = {},
): Stream.Stream<BotTaskEvent, SoulFireOperationError>

Source

stash

Walks to the container, opens it and puts the items in.

stash(
  container: MessageInitShape<typeof BlockPositionSchema>,
  operations: readonly ContainerTransferSpec[],
  options: ContainerTransferTaskOptions = {},
): Effect.Effect<
  SoulFireTask<typeof ContainerTransferTaskResultSchema>,
  SoulFireOperationError
>

Source

runStash

runStash(
  container: MessageInitShape<typeof BlockPositionSchema>,
  operations: readonly ContainerTransferSpec[],
  options: ContainerTransferTaskOptions = {},
): Stream.Stream<BotTaskEvent, SoulFireOperationError>

Source

withdraw

Walks to the container, opens it and takes the items out.

withdraw(
  container: MessageInitShape<typeof BlockPositionSchema>,
  operations: readonly ContainerTransferSpec[],
  options: ContainerTransferTaskOptions = {},
): Effect.Effect<
  SoulFireTask<typeof ContainerTransferTaskResultSchema>,
  SoulFireOperationError
>

Source

runWithdraw

runWithdraw(
  container: MessageInitShape<typeof BlockPositionSchema>,
  operations: readonly ContainerTransferSpec[],
  options: ContainerTransferTaskOptions = {},
): Stream.Stream<BotTaskEvent, SoulFireOperationError>

Source

maintainLoadout

Keeps each requirement's count in range by withdrawing from and depositing to container.

maintainLoadout(
  container: MessageInitShape<typeof BlockPositionSchema>,
  requirements: readonly LoadoutRequirementSpec[],
  options: MaintainLoadoutTaskOptions = {},
): Effect.Effect<
  SoulFireTask<typeof MaintainLoadoutTaskResultSchema>,
  SoulFireOperationError
>

Source

runMaintainLoadout

runMaintainLoadout(
  container: MessageInitShape<typeof BlockPositionSchema>,
  requirements: readonly LoadoutRequirementSpec[],
  options: MaintainLoadoutTaskOptions = {},
): Stream.Stream<BotTaskEvent, SoulFireOperationError>

Source

balanceLoadout

maintainLoadout once: a single rebalance, done when satisfied.

balanceLoadout(
  container: MessageInitShape<typeof BlockPositionSchema>,
  requirements: readonly LoadoutRequirementSpec[],
  options: Omit<
    MaintainLoadoutTaskOptions,
    "completeWhenSatisfied" | "maximumRebalances"
  > = {},
): Effect.Effect<
  SoulFireTask<typeof MaintainLoadoutTaskResultSchema>,
  SoulFireOperationError
>

Source

autoEat

Eats when the food level drops to foodLevel. An empty foodItemIds (the default) eats any safe food.

autoEat(
  foodItemIds: readonly string[] = [],
  options: AutoEatTaskOptions = {},
): Effect.Effect<
  SoulFireTask<typeof AutoEatTaskResultSchema>,
  SoulFireOperationError
>

Source

runAutoEat

An empty foodItemIds (the default) eats any safe food.

runAutoEat(
  foodItemIds: readonly string[] = [],
  options: AutoEatTaskOptions = {},
): Stream.Stream<BotTaskEvent, SoulFireOperationError>

Source

autoRespawn

Respawns after each death.

autoRespawn(
  options: AutoRespawnTaskOptions = {},
): Effect.Effect<
  SoulFireTask<typeof AutoRespawnTaskResultSchema>,
  SoulFireOperationError
>

Source

runAutoRespawn

runAutoRespawn(
  options: AutoRespawnTaskOptions = {},
): Stream.Stream<BotTaskEvent, SoulFireOperationError>

Source

autoTotem

Keeps a totem of undying in the offhand.

autoTotem(
  options: AutoTotemTaskOptions = {},
): Effect.Effect<
  SoulFireTask<typeof AutoTotemTaskResultSchema>,
  SoulFireOperationError
>

Source

runAutoTotem

runAutoTotem(
  options: AutoTotemTaskOptions = {},
): Stream.Stream<BotTaskEvent, SoulFireOperationError>

Source

autoArmor

Keeps the best armor the bot has equipped.

autoArmor(
  options: AutoArmorTaskOptions = {},
): Effect.Effect<
  SoulFireTask<typeof AutoArmorTaskResultSchema>,
  SoulFireOperationError
>

Source

runAutoArmor

runAutoArmor(
  options: AutoArmorTaskOptions = {},
): Stream.Stream<BotTaskEvent, SoulFireOperationError>

Source

collectBlocks

Finds, reaches and mines count blocks with one of blockIds or tags.

collectBlocks(
  blockIds: readonly string[],
  options: CollectBlocksTaskOptions = {},
): Effect.Effect<
  SoulFireTask<typeof CollectBlocksTaskResultSchema>,
  SoulFireOperationError
>

Source

runCollectBlocks

runCollectBlocks(
  blockIds: readonly string[],
  options: CollectBlocksTaskOptions = {},
): Stream.Stream<BotTaskEvent, SoulFireOperationError>

Source

excavate

Clears every diggable block in the cuboid from from to to, both included. At most 32,768 blocks.

excavate(
  from: MessageInitShape<typeof BlockPositionSchema>,
  to: MessageInitShape<typeof BlockPositionSchema>,
  options: ExcavateTaskOptions = {},
): Effect.Effect<
  SoulFireTask<typeof ExcavateTaskResultSchema>,
  SoulFireOperationError
>

Source

runExcavate

runExcavate(
  from: MessageInitShape<typeof BlockPositionSchema>,
  to: MessageInitShape<typeof BlockPositionSchema>,
  options: ExcavateTaskOptions = {},
): Stream.Stream<BotTaskEvent, SoulFireOperationError>

Source

build

Places blocks, each at origin plus its offset. At most 8192 blocks.

build(
  origin: MessageInitShape<typeof BlockPositionSchema>,
  blocks: readonly SchematicBlock[],
  options: BuildTaskOptions = {},
): Effect.Effect<
  SoulFireTask<typeof BuildTaskResultSchema>,
  SoulFireOperationError
>

Source

runBuild

runBuild(
  origin: MessageInitShape<typeof BlockPositionSchema>,
  blocks: readonly SchematicBlock[],
  options: BuildTaskOptions = {},
): Stream.Stream<BotTaskEvent, SoulFireOperationError>

Source

craft

recipeId comes from recipes.list, e.g. "display:42". count is recipe operations, not output items; it defaults to 1, at most 4096.

craft(
  recipeId: string,
  count = 1,
  options: CraftTaskOptions = {},
): Effect.Effect<
  SoulFireTask<typeof CraftTaskResultSchema>,
  SoulFireOperationError
>

Source

runCraft

recipeId comes from recipes.list, e.g. "display:42". count is recipe operations, not output items; it defaults to 1, at most 4096.

runCraft(
  recipeId: string,
  count = 1,
  options: CraftTaskOptions = {},
): Stream.Stream<BotTaskEvent, SoulFireOperationError>

Source

smelt

input selects items that fit a known cooking recipe. count is input items to cook; it defaults to 1, at most 4096.

smelt(
  input: MessageInitShape<typeof ItemSelectorSchema>,
  count = 1,
  options: SmeltTaskOptions = {},
): Effect.Effect<
  SoulFireTask<typeof SmeltTaskResultSchema>,
  SoulFireOperationError
>

Source

runSmelt

count is input items to cook; it defaults to 1, at most 4096.

runSmelt(
  input: MessageInitShape<typeof ItemSelectorSchema>,
  count = 1,
  options: SmeltTaskOptions = {},
): Stream.Stream<BotTaskEvent, SoulFireOperationError>

Source

brew

Brews count potion bottles matching input, using one ingredient per bottle. count defaults to 1, at most 4096.

brew(
  input: MessageInitShape<typeof ItemSelectorSchema>,
  ingredient: MessageInitShape<typeof ItemSelectorSchema>,
  count = 1,
  options: BrewTaskOptions = {},
): Effect.Effect<
  SoulFireTask<typeof BrewTaskResultSchema>,
  SoulFireOperationError
>

Source

runBrew

count is bottles to brew; it defaults to 1, at most 4096.

runBrew(
  input: MessageInitShape<typeof ItemSelectorSchema>,
  ingredient: MessageInitShape<typeof ItemSelectorSchema>,
  count = 1,
  options: BrewTaskOptions = {},
): Stream.Stream<BotTaskEvent, SoulFireOperationError>

Source

villagerTrade

Trades with the merchant menu the bot has open. offerIndex is the zero-based index from recipes.listVillagerTrades. count defaults to 1, at most 4096.

villagerTrade(
  offerIndex: number,
  count = 1,
  options: VillagerTradeTaskOptions = {},
): Effect.Effect<
  SoulFireTask<typeof VillagerTradeTaskResultSchema>,
  SoulFireOperationError
>

Source

runVillagerTrade

count is trades to make; it defaults to 1, at most 4096.

runVillagerTrade(
  offerIndex: number,
  count = 1,
  options: VillagerTradeTaskOptions = {},
): Stream.Stream<BotTaskEvent, SoulFireOperationError>

Source

get

One of this bot's tasks, by id.

get<Result extends DescMessage | undefined = undefined>(
  taskId: string,
  resultSchema?: Result,
  options?: CallOptions,
): Effect.Effect<SoulFireTask<Result>, SoulFireOperationError>

Source

list

This bot's tasks, all pages. Ended tasks only with includeTerminal.

list(
  options: TaskListOptions = {},
): Effect.Effect<BotTask[], SoulFireOperationError>

Source

watch

Events of this bot's tasks, starting with a snapshot of them unless includeSnapshot is false.

watch(options?: {
  afterSequence?: bigint;
  includeSnapshot?: boolean;
  statuses?: readonly BotTaskStatus[];
  call?: CallOptions;
}): Stream.Stream<BotTaskEvent, SoulFireOperationError>

Source

How is this page?

Last updated on

On this page