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>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>goTo
Moves the bot to goal (see goals).
goTo(
goal: PathfindGoal,
options: GoToTaskOptions = {},
): Effect.Effect<
SoulFireTask<typeof GoToTaskResultSchema>,
SoulFireOperationError
>runGoTo
runGoTo(
goal: PathfindGoal,
options: GoToTaskOptions = {},
): Stream.Stream<BotTaskEvent, SoulFireOperationError>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
>runFollowEntity
distance defaults to 3.
runFollowEntity(
target: FollowEntityTarget,
distance = 3,
options: FollowEntityTaskOptions = {},
): Stream.Stream<BotTaskEvent, SoulFireOperationError>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
>runAttackEntity
runAttackEntity(
target: AttackEntityTarget,
options: AttackEntityTaskOptions = {},
): Stream.Stream<BotTaskEvent, SoulFireOperationError>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
>runAttackNearest
runAttackNearest(
selector: MessageInitShape<typeof EntitySelectorSchema>,
options: AttackNearestTaskOptions = {},
): Stream.Stream<BotTaskEvent, SoulFireOperationError>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
>runRangedAttack
runRangedAttack(
target: AttackEntityTarget,
options: RangedAttackTaskOptions = {},
): Stream.Stream<BotTaskEvent, SoulFireOperationError>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
>runFlee
runFlee(
threats: MessageInitShape<typeof EntitySelectorSchema>,
options: FleeTaskOptions = {},
): Stream.Stream<BotTaskEvent, SoulFireOperationError>guard
Defends position from threats.
guard(
position: MessageInitShape<typeof BlockPositionSchema>,
threats: MessageInitShape<typeof EntitySelectorSchema>,
options: GuardTaskOptions = {},
): Effect.Effect<
SoulFireTask<typeof GuardTaskResultSchema>,
SoulFireOperationError
>runGuard
runGuard(
position: MessageInitShape<typeof BlockPositionSchema>,
threats: MessageInitShape<typeof EntitySelectorSchema>,
options: GuardTaskOptions = {},
): Stream.Stream<BotTaskEvent, SoulFireOperationError>protect
Defends an entity from threats.
protect(
entity: AttackEntityTarget,
threats: MessageInitShape<typeof EntitySelectorSchema>,
options: GuardTaskOptions = {},
): Effect.Effect<
SoulFireTask<typeof GuardTaskResultSchema>,
SoulFireOperationError
>runProtect
runProtect(
entity: AttackEntityTarget,
threats: MessageInitShape<typeof EntitySelectorSchema>,
options: GuardTaskOptions = {},
): Stream.Stream<BotTaskEvent, SoulFireOperationError>sleep
Walks to a bed and gets in.
sleep(
options: SleepTaskOptions = {},
): Effect.Effect<
SoulFireTask<typeof SleepTaskResultSchema>,
SoulFireOperationError
>runSleep
runSleep(
options: SleepTaskOptions = {},
): Stream.Stream<BotTaskEvent, SoulFireOperationError>fish
Casts, waits for a bite, reels in, and repeats.
fish(
options: FishTaskOptions = {},
): Effect.Effect<
SoulFireTask<typeof FishTaskResultSchema>,
SoulFireOperationError
>runFish
runFish(
options: FishTaskOptions = {},
): Stream.Stream<BotTaskEvent, SoulFireOperationError>farm
Harvests mature crops around center and replants the ones that need it.
farm(
options: FarmTaskOptions = {},
): Effect.Effect<
SoulFireTask<typeof FarmTaskResultSchema>,
SoulFireOperationError
>runFarm
runFarm(
options: FarmTaskOptions = {},
): Stream.Stream<BotTaskEvent, SoulFireOperationError>breed
Feeds pairs of adult animals until the server confirms both are in love mode.
breed(
options: BreedTaskOptions = {},
): Effect.Effect<
SoulFireTask<typeof BreedTaskResultSchema>,
SoulFireOperationError
>runBreed
runBreed(
options: BreedTaskOptions = {},
): Stream.Stream<BotTaskEvent, SoulFireOperationError>explore
Visits unexplored cells around origin.
explore(
options: ExploreTaskOptions = {},
): Effect.Effect<
SoulFireTask<typeof ExploreTaskResultSchema>,
SoulFireOperationError
>runExplore
runExplore(
options: ExploreTaskOptions = {},
): Stream.Stream<BotTaskEvent, SoulFireOperationError>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
>runStash
runStash(
container: MessageInitShape<typeof BlockPositionSchema>,
operations: readonly ContainerTransferSpec[],
options: ContainerTransferTaskOptions = {},
): Stream.Stream<BotTaskEvent, SoulFireOperationError>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
>runWithdraw
runWithdraw(
container: MessageInitShape<typeof BlockPositionSchema>,
operations: readonly ContainerTransferSpec[],
options: ContainerTransferTaskOptions = {},
): Stream.Stream<BotTaskEvent, SoulFireOperationError>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
>runMaintainLoadout
runMaintainLoadout(
container: MessageInitShape<typeof BlockPositionSchema>,
requirements: readonly LoadoutRequirementSpec[],
options: MaintainLoadoutTaskOptions = {},
): Stream.Stream<BotTaskEvent, SoulFireOperationError>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
>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
>runAutoEat
An empty foodItemIds (the default) eats any safe food.
runAutoEat(
foodItemIds: readonly string[] = [],
options: AutoEatTaskOptions = {},
): Stream.Stream<BotTaskEvent, SoulFireOperationError>autoRespawn
Respawns after each death.
autoRespawn(
options: AutoRespawnTaskOptions = {},
): Effect.Effect<
SoulFireTask<typeof AutoRespawnTaskResultSchema>,
SoulFireOperationError
>runAutoRespawn
runAutoRespawn(
options: AutoRespawnTaskOptions = {},
): Stream.Stream<BotTaskEvent, SoulFireOperationError>autoTotem
Keeps a totem of undying in the offhand.
autoTotem(
options: AutoTotemTaskOptions = {},
): Effect.Effect<
SoulFireTask<typeof AutoTotemTaskResultSchema>,
SoulFireOperationError
>runAutoTotem
runAutoTotem(
options: AutoTotemTaskOptions = {},
): Stream.Stream<BotTaskEvent, SoulFireOperationError>autoArmor
Keeps the best armor the bot has equipped.
autoArmor(
options: AutoArmorTaskOptions = {},
): Effect.Effect<
SoulFireTask<typeof AutoArmorTaskResultSchema>,
SoulFireOperationError
>runAutoArmor
runAutoArmor(
options: AutoArmorTaskOptions = {},
): Stream.Stream<BotTaskEvent, SoulFireOperationError>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
>runCollectBlocks
runCollectBlocks(
blockIds: readonly string[],
options: CollectBlocksTaskOptions = {},
): Stream.Stream<BotTaskEvent, SoulFireOperationError>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
>runExcavate
runExcavate(
from: MessageInitShape<typeof BlockPositionSchema>,
to: MessageInitShape<typeof BlockPositionSchema>,
options: ExcavateTaskOptions = {},
): Stream.Stream<BotTaskEvent, SoulFireOperationError>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
>runBuild
runBuild(
origin: MessageInitShape<typeof BlockPositionSchema>,
blocks: readonly SchematicBlock[],
options: BuildTaskOptions = {},
): Stream.Stream<BotTaskEvent, SoulFireOperationError>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
>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>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
>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>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
>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>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
>runVillagerTrade
count is trades to make; it defaults to 1, at most 4096.
runVillagerTrade(
offerIndex: number,
count = 1,
options: VillagerTradeTaskOptions = {},
): Stream.Stream<BotTaskEvent, SoulFireOperationError>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>list
This bot's tasks, all pages. Ended tasks only with includeTerminal.
list(
options: TaskListOptions = {},
): Effect.Effect<BotTask[], SoulFireOperationError>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>How is this page?
Last updated on
