SoulFire LogoSoulFire

SoulFireInventory

Public TypeScript members of SoulFireInventory.

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.

snapshot

The open menu (the player's inventory when no container is open), with every slot.

snapshot(
  options?: CallOptions,
): Effect.Effect<ContainerSnapshot, SoulFireOperationError>

Source

count

Items matching selector in areas. No areas means container, main, hotbar, armor, offhand and crafting slots.

count(
  request: InventoryRequest<typeof CountItemsRequestSchema>,
  options?: CallOptions,
): Effect.Effect<bigint, SoulFireOperationError>

Source

find

Slots holding items that match selector, in areas (the same default as count).

find(
  request: InventoryRequest<typeof FindInventorySlotsRequestSchema>,
  options?: CallOptions,
): Effect.Effect<FindInventorySlotsResponse, SoulFireOperationError>

Source

rank

Candidates for kind, best first, with the factors behind each score. limit defaults to 10 (at most 100); areas default to main, hotbar, armor and offhand.

rank(
  kind: InventoryRecommendationKind,
  options: InventoryRankOptions = {},
  call?: CallOptions,
): Effect.Effect<RankInventoryItemsResponse, SoulFireOperationError>

Source

bestTool

The best tool for breaking the block at targetBlock.

bestTool(
  targetBlock: MessageInitShape<typeof BlockPositionSchema>,
  options: InventoryRankingOptions = {},
  call?: CallOptions,
): Effect.Effect<
  InventoryItemRecommendation | undefined,
  SoulFireOperationError
>

Source

bestWeapon

bestWeapon(
  options: InventoryRankingOptions = {},
  call?: CallOptions,
): Effect.Effect<
  InventoryItemRecommendation | undefined,
  SoulFireOperationError
>

Source

bestArmor

bestArmor(
  equipmentSlot: "head" | "chest" | "legs" | "feet",
  options: InventoryRankingOptions = {},
  call?: CallOptions,
): Effect.Effect<
  InventoryItemRecommendation | undefined,
  SoulFireOperationError
>

Source

bestFood

bestFood(
  options: InventoryRankingOptions = {},
  call?: CallOptions,
): Effect.Effect<
  InventoryItemRecommendation | undefined,
  SoulFireOperationError
>

Source

bestScaffold

bestScaffold(
  options: InventoryRankingOptions = {},
  call?: CallOptions,
): Effect.Effect<
  InventoryItemRecommendation | undefined,
  SoulFireOperationError
>

Source

move

Moves items from sourceSlot to destinationSlot of the open menu; count defaults to the whole stack.

move(
  request: InventoryRequest<typeof MoveInventoryItemRequestSchema>,
  options?: CallOptions,
): Effect.Effect<InventoryMutationResponse, SoulFireOperationError>

Source

transfer

Moves count items matching selector from area from to area to (PLAYER is main and hotbar). Fails if fewer are available or they don't fit.

transfer(
  request: InventoryRequest<typeof TransferItemsRequestSchema>,
  options?: CallOptions,
): Effect.Effect<InventoryMutationResponse, SoulFireOperationError>

Source

toss

Drops count items matching selector on the ground.

toss(
  request: InventoryRequest<typeof TossItemsRequestSchema>,
  options?: CallOptions,
): Effect.Effect<InventoryMutationResponse, SoulFireOperationError>

Source

selectHotbar

Selects hotbarSlot (0-8), or the item matching selector: a hotbar slot that holds one, or else a matching item swapped into the selected slot.

selectHotbar(
  request: InventoryRequest<typeof SelectHotbarItemRequestSchema>,
  options?: CallOptions,
): Effect.Effect<InventoryMutationResponse, SoulFireOperationError>

Source

equip

Puts an item matching selector in equipmentSlot: mainhand, offhand, head, chest, legs or feet. Closes an open container first, except for mainhand (which selects it as selectHotbar does).

equip(
  request: InventoryRequest<typeof EquipItemRequestSchema>,
  options?: CallOptions,
): Effect.Effect<InventoryMutationResponse, SoulFireOperationError>

Source

unequip

Moves the item in equipmentSlot (mainhand, offhand, head, chest, legs or feet) to destinationArea: MAIN, HOTBAR or PLAYER. It defaults to PLAYER, the first free main or hotbar slot.

unequip(
  request: InventoryRequest<typeof UnequipItemRequestSchema>,
  options?: CallOptions,
): Effect.Effect<InventoryMutationResponse, SoulFireOperationError>

Source

open

Opens the container block at position. Times out after 10 s.

open(
  position: MessageInitShape<typeof BlockPositionSchema>,
  options: ContainerMutationOptions = {},
): Effect.Effect<SoulFireContainer, SoulFireOperationError>

Source

openScoped

openScoped(
  ...args: Parameters<SoulFireInventory["open"]>
): Effect.Effect<SoulFireContainer, SoulFireOperationError, Scope.Scope>

Source

How is this page?

Last updated on

On this page