外观
actors API
模块说明
text
Connection-local actor evidence, including last received position.
Positions are observations, not synchronous world queries. Require a matching
connection, scope, identity and Add revision, visible/alive state, and a recent
position.stamp.at for control. sampled_at and last_packet_at cannot refresh an
old position. Actors without Add evidence are absent; this is not world coverage.ActorStamp
python
class ActorStamp(TypedDict)字段(包含继承字段):
ActorStamp.revision
python
revision: int必填;声明于 actors.ActorStamp。
ActorStamp.at
python
at: str必填;声明于 actors.ActorStamp。
ActorStamp.packet_id
python
packet_id: int必填;声明于 actors.ActorStamp。
ActorCursor
python
class ActorCursor(TypedDict)字段(包含继承字段):
ActorCursor.connection_id
python
connection_id: str必填;声明于 actors.ActorCursor。
ActorCursor.revision
python
revision: int必填;声明于 actors.ActorCursor。
ActorCursor.scope_revision
python
scope_revision: int必填;声明于 actors.ActorCursor。
ActorPosition
python
class ActorPosition(TypedDict)字段(包含继承字段):
ActorPosition.value
python
value: list[float]必填;声明于 actors.ActorPosition。
ActorPosition.stamp
python
stamp: ActorStamp必填;声明于 actors.ActorPosition。
ActorHealth
python
class ActorHealth(TypedDict)字段(包含继承字段):
ActorHealth.value
python
value: float必填;声明于 actors.ActorHealth。
ActorHealth.min
python
min: float必填;声明于 actors.ActorHealth。
ActorHealth.max
python
max: float必填;声明于 actors.ActorHealth。
ActorHealth.stamp
python
stamp: ActorStamp必填;声明于 actors.ActorHealth。
ActorItem
python
class ActorItem(TypedDict)字段(包含继承字段):
ActorItem.count
python
count: int必填;声明于 actors.ActorItem。
ActorItem.stack_id
python
stack_id: int必填;声明于 actors.ActorItem。
ActorItem.network_id
python
network_id: int必填;声明于 actors.ActorItem。
ActorItem.attributes_fingerprint
python
attributes_fingerprint: str必填;声明于 actors.ActorItem。
ActorTypedValue
python
class ActorTypedValue(TypedDict)字段(包含继承字段):
ActorTypedValue.type
python
type: str必填;声明于 actors.ActorTypedValue。
ActorTypedValue.value
python
value: Any必填;声明于 actors.ActorTypedValue。
ActorField
python
class ActorField(TypedDict)字段(包含继承字段):
ActorField.stamp
python
stamp: ActorStamp必填;声明于 actors.ActorField。
ActorField.known
python
known: bool必填;声明于 actors.ActorField。
ActorField.error
python
error: str必填;声明于 actors.ActorField。
ActorMetadata
python
class ActorMetadata(ActorField)字段(包含继承字段):
ActorMetadata.stamp
python
stamp: ActorStamp必填;声明于 actors.ActorField。
ActorMetadata.known
python
known: bool必填;声明于 actors.ActorField。
ActorMetadata.error
python
error: str必填;声明于 actors.ActorField。
ActorMetadata.value
python
value: ActorTypedValue | None必填;声明于 actors.ActorMetadata。
ActorEffect
python
class ActorEffect(ActorField)字段(包含继承字段):
ActorEffect.stamp
python
stamp: ActorStamp必填;声明于 actors.ActorField。
ActorEffect.known
python
known: bool必填;声明于 actors.ActorField。
ActorEffect.error
python
error: str必填;声明于 actors.ActorField。
ActorEffect.operation
python
operation: int必填;声明于 actors.ActorEffect。
ActorEffect.present
python
present: bool | None必填;声明于 actors.ActorEffect。
ActorEffect.amplifier
python
amplifier: int | None必填;声明于 actors.ActorEffect。
ActorEffect.particles
python
particles: bool | None必填;声明于 actors.ActorEffect。
ActorEffect.duration
python
duration: int | None必填;声明于 actors.ActorEffect。
ActorEffect.tick
python
tick: str | None必填;声明于 actors.ActorEffect。
ActorEquipmentItem
python
class ActorEquipmentItem(TypedDict)字段(包含继承字段):
ActorEquipmentItem.network_id
python
network_id: int必填;声明于 actors.ActorEquipmentItem。
ActorEquipmentItem.stack_id
python
stack_id: int必填;声明于 actors.ActorEquipmentItem。
ActorEquipmentItem.count
python
count: int必填;声明于 actors.ActorEquipmentItem。
ActorEquipmentItem.metadata_value
python
metadata_value: int必填;声明于 actors.ActorEquipmentItem。
ActorEquipmentItem.block_runtime_id
python
block_runtime_id: int必填;声明于 actors.ActorEquipmentItem。
ActorEquipmentItem.nbt
python
nbt: ActorTypedValue必填;声明于 actors.ActorEquipmentItem。
ActorEquipmentItem.can_place_on
python
can_place_on: list[str] | None必填;声明于 actors.ActorEquipmentItem。
ActorEquipmentItem.can_break
python
can_break: list[str] | None必填;声明于 actors.ActorEquipmentItem。
ActorEquipmentItem.fingerprint
python
fingerprint: str必填;声明于 actors.ActorEquipmentItem。
ActorEquipment
python
class ActorEquipment(ActorField)字段(包含继承字段):
ActorEquipment.stamp
python
stamp: ActorStamp必填;声明于 actors.ActorField。
ActorEquipment.known
python
known: bool必填;声明于 actors.ActorField。
ActorEquipment.error
python
error: str必填;声明于 actors.ActorField。
ActorEquipment.item
python
item: ActorEquipmentItem | None必填;声明于 actors.ActorEquipment。
ActorEquipment.inventory_slot
python
inventory_slot: int必填;声明于 actors.ActorEquipment。
ActorEquipment.hotbar_slot
python
hotbar_slot: int必填;声明于 actors.ActorEquipment。
ActorEquipment.window_id
python
window_id: int必填;声明于 actors.ActorEquipment。
ActorAttribute
python
class ActorAttribute(ActorField)字段(包含继承字段):
ActorAttribute.stamp
python
stamp: ActorStamp必填;声明于 actors.ActorField。
ActorAttribute.known
python
known: bool必填;声明于 actors.ActorField。
ActorAttribute.error
python
error: str必填;声明于 actors.ActorField。
ActorAttribute.value
python
value: float | None必填;声明于 actors.ActorAttribute。
ActorAttribute.min
python
min: float | None必填;声明于 actors.ActorAttribute。
ActorAttribute.max
python
max: float | None必填;声明于 actors.ActorAttribute。
ActorAttribute.defaults
python
defaults: dict[str, float] | None必填;声明于 actors.ActorAttribute。
ActorAttribute.modifiers
python
modifiers: list[dict[str, Any]] | None必填;声明于 actors.ActorAttribute。
ActorState
python
class ActorState(TypedDict)字段(包含继承字段):
ActorState.runtime_id
python
runtime_id: str必填;声明于 actors.ActorState。
ActorState.unique_id
python
unique_id: str必填;声明于 actors.ActorState。
ActorState.entity_type
python
entity_type: str必填;声明于 actors.ActorState。
ActorState.spawn_position
python
spawn_position: list[float]必填;声明于 actors.ActorState。
ActorState.position
python
position: ActorPosition | None必填;声明于 actors.ActorState。
ActorState.position_error
python
position_error: str必填;声明于 actors.ActorState。
ActorState.position_error_stamp
python
position_error_stamp: ActorStamp | None必填;声明于 actors.ActorState。
ActorState.visible
python
visible: bool必填;声明于 actors.ActorState。
ActorState.added
python
added: ActorStamp必填;声明于 actors.ActorState。
ActorState.removed
python
removed: ActorStamp | None必填;声明于 actors.ActorState。
ActorState.death
python
death: ActorStamp | None必填;声明于 actors.ActorState。
ActorState.health
python
health: ActorHealth | None必填;声明于 actors.ActorState。
ActorState.health_error
python
health_error: str必填;声明于 actors.ActorState。
ActorState.health_error_stamp
python
health_error_stamp: ActorStamp | None必填;声明于 actors.ActorState。
ActorState.item
python
item: ActorItem | None必填;声明于 actors.ActorState。
ActorState.metadata
python
metadata: dict[str, ActorMetadata]必填;声明于 actors.ActorState。
ActorState.effects
python
effects: dict[str, ActorEffect]必填;声明于 actors.ActorState。
ActorState.equipment
python
equipment: dict[str, ActorEquipment]必填;声明于 actors.ActorState。
ActorState.attributes
python
attributes: dict[str, ActorAttribute]必填;声明于 actors.ActorState。
ActorState.metadata_error
python
metadata_error: str必填;声明于 actors.ActorState。
ActorState.metadata_error_stamp
python
metadata_error_stamp: ActorStamp | None必填;声明于 actors.ActorState。
ActorState.effects_error
python
effects_error: str必填;声明于 actors.ActorState。
ActorState.effects_error_stamp
python
effects_error_stamp: ActorStamp | None必填;声明于 actors.ActorState。
ActorState.equipment_error
python
equipment_error: str必填;声明于 actors.ActorState。
ActorState.equipment_error_stamp
python
equipment_error_stamp: ActorStamp | None必填;声明于 actors.ActorState。
ActorState.attributes_error
python
attributes_error: str必填;声明于 actors.ActorState。
ActorState.attributes_error_stamp
python
attributes_error_stamp: ActorStamp | None必填;声明于 actors.ActorState。
ActorEvent
python
class ActorEvent(TypedDict)字段(包含继承字段):
ActorEvent.revision
python
revision: int必填;声明于 actors.ActorEvent。
ActorEvent.at
python
at: str必填;声明于 actors.ActorEvent。
ActorEvent.packet_id
python
packet_id: int必填;声明于 actors.ActorEvent。
ActorEvent.kind
python
kind: str必填;声明于 actors.ActorEvent。
ActorEvent.runtime_id
python
runtime_id: str必填;声明于 actors.ActorEvent。
ActorEvent.unique_id
python
unique_id: str必填;声明于 actors.ActorEvent。
ActorEvent.taker_runtime_id
python
taker_runtime_id: str必填;声明于 actors.ActorEvent。
ActorEvent.known
python
known: bool必填;声明于 actors.ActorEvent。
ActorEvent.event_type
python
event_type: int必填;声明于 actors.ActorEvent。
ActorEvent.event_data
python
event_data: int必填;声明于 actors.ActorEvent。
ActorEvent.health_error
python
health_error: str必填;声明于 actors.ActorEvent。
ActorEvent.changed_fields
python
changed_fields: list[str]必填;声明于 actors.ActorEvent。
ActorEvent.error
python
error: str必填;声明于 actors.ActorEvent。
ActorObserved
python
class ActorObserved(TypedDict)SDK 说明:
text
Payload of a durable actor.observed event; source_gap has null identity.字段(包含继承字段):
ActorObserved.source
python
source: str必填;声明于 actors.ActorObserved。
ActorObserved.connection_id
python
connection_id: str | None必填;声明于 actors.ActorObserved。
ActorObserved.scope_revision
python
scope_revision: int | None必填;声明于 actors.ActorObserved。
ActorObserved.revision
python
revision: int | None必填;声明于 actors.ActorObserved。
ActorObserved.at
python
at: str | None必填;声明于 actors.ActorObserved。
ActorObserved.packet_id
python
packet_id: int | None必填;声明于 actors.ActorObserved。
ActorObserved.kind
python
kind: str必填;声明于 actors.ActorObserved。
ActorObserved.runtime_id
python
runtime_id: str | None必填;声明于 actors.ActorObserved。
ActorObserved.unique_id
python
unique_id: str | None必填;声明于 actors.ActorObserved。
ActorObserved.taker_runtime_id
python
taker_runtime_id: str | None必填;声明于 actors.ActorObserved。
ActorObserved.known
python
known: bool必填;声明于 actors.ActorObserved。
ActorObserved.gap
python
gap: bool必填;声明于 actors.ActorObserved。
ActorObserved.complete_world_coverage
python
complete_world_coverage: bool必填;声明于 actors.ActorObserved。
ActorObserved.changed_fields
python
changed_fields: list[str]必填;声明于 actors.ActorObserved。
ActorObserved.error
python
error: str必填;声明于 actors.ActorObserved。
ActorObserved.event_type
python
event_type: int | None必填;声明于 actors.ActorObserved。
ActorObserved.event_data
python
event_data: int | None必填;声明于 actors.ActorObserved。
ActorObserved.health_error
python
health_error: str必填;声明于 actors.ActorObserved。
ActorSnapshot
python
class ActorSnapshot(ActorCursor)字段(包含继承字段):
ActorSnapshot.connection_id
python
connection_id: str必填;声明于 actors.ActorCursor。
ActorSnapshot.revision
python
revision: int必填;声明于 actors.ActorCursor。
ActorSnapshot.scope_revision
python
scope_revision: int必填;声明于 actors.ActorCursor。
ActorSnapshot.source
python
source: str必填;声明于 actors.ActorSnapshot。
ActorSnapshot.connected_at
python
connected_at: str必填;声明于 actors.ActorSnapshot。
ActorSnapshot.dropped_through
python
dropped_through: int必填;声明于 actors.ActorSnapshot。
ActorSnapshot.sampled_at
python
sampled_at: str必填;声明于 actors.ActorSnapshot。
ActorSnapshot.last_packet_at
python
last_packet_at: str必填;声明于 actors.ActorSnapshot。
ActorSnapshot.gap
python
gap: bool必填;声明于 actors.ActorSnapshot。
ActorSnapshot.truncated
python
truncated: bool必填;声明于 actors.ActorSnapshot。
ActorSnapshot.complete
python
complete: bool必填;声明于 actors.ActorSnapshot。
ActorSnapshot.complete_world_coverage
python
complete_world_coverage: bool必填;声明于 actors.ActorSnapshot。
ActorSnapshot.actors
python
actors: list[ActorState]必填;声明于 actors.ActorSnapshot。
ActorSnapshot.events
python
events: list[ActorEvent]必填;声明于 actors.ActorSnapshot。
ActorRef
python
@dataclass(frozen=True)
class ActorRefSDK 说明:
text
Identity from one Add in one connection and dimension scope.字段(包含继承字段):
ActorRef.connection_id
python
connection_id: str数据类字段;声明于 actors.ActorRef。
ActorRef.scope_revision
python
scope_revision: int数据类字段;声明于 actors.ActorRef。
ActorRef.runtime_id
python
runtime_id: str数据类字段;声明于 actors.ActorRef。
ActorRef.unique_id
python
unique_id: str数据类字段;声明于 actors.ActorRef。
ActorRef.added_revision
python
added_revision: int数据类字段;声明于 actors.ActorRef。
ActorRef.resolve
python
def resolve(self, snapshot: ActorSnapshot) -> ActorState | NoneSDK 说明:
text
Return current evidence, or None after a gap/removal/death/reuse.
This does not refresh any field or establish world coverage/freshness.actor_ref
python
def actor_ref(snapshot: ActorSnapshot, runtime_id: str) -> ActorRefSDK 说明:
text
Bind an observed live actor without IO; unknown identities are rejected.Actors
python
class ActorsActors.__init__
python
def __init__(self, operations: Operations)Actors.observe
python
def observe(
self,
*,
idempotency_key: str,
deadline: str,
after: ActorCursor | None = None,
runtime_ids: list[str] | None = None,
) -> OperationIntentSDK 说明:
text
Prepare framework.actor.observe; its successful result is ActorSnapshot.
Host checks framework.actor.observe permission. Up to 64 explicit runtime
IDs (decimal strings) avoid unrelated actors exhausting the result limit.
A new query needs its own key; reusing a key reads the earlier receipt.Actors.operations
python
self.operations公开实例属性,在 __init__ 中设置。