跳转到正文

crafting API ​

完整接口目录 · 合成与挖掘用法 · 工具包下载

模块说明 ​

text
Single-session 2x2 crafting, prepared on the durable Operations queue.

recipe_network_id and counts must come from this connection's CraftingData.
Use ctx.recipes for observed recipe reads; there is no planner or fixed network-ID
fallback. Item references use ConnectionID, Slot, ObservedRevision, StackNetworkID
from native inventory.

Crafting ​

python
class Crafting

Crafting.__init__ ​

python
def __init__(self, operations)

Crafting.prepare ​

python
def prepare(
    self,
    *,
    recipe_network_id,
    inputs,
    output,
    output_count,
    idempotency_key,
    deadline,
)

SDK 说明:

text
Prepare one recipe; inputs have item, grid_slot (0..3) and count.

Output must be a known-empty, distinct inventory slot. Submit with
Operations; an unknown result must be reconciled with its original key.
Server ACK is not independent item/NBT readback.

Neomega · 使用、开发与参考文档