跳转到正文

协议模型:S · 2 ​

全部模型 · 协议包用法

选择模型查看构造参数和字段,代码块保留完整模型名称。... 表示可省略的字段,省略时使用该类型的零值。

SetDimensionLocalWeather ​

继承 Packet。

python
class SetDimensionLocalWeather(_Packet):
    packet_id: ClassVar[int] = 210
    packet_name: ClassVar[str] = 'SetDimensionLocalWeather'
    DimensionID: int
    RainLevel: float | FloatBits
    RainTime: int
    LightningLevel: float | FloatBits
    LightningTime: int
    IsWeatherCycle: bool
    def __init__(self, /, *,
        DimensionID: int = ...,
        RainLevel: float | FloatBits = ...,
        RainTime: int = ...,
        LightningLevel: float | FloatBits = ...,
        LightningTime: int = ...,
        IsWeatherCycle: bool = ...,
    ) -> None: ...

SetDisplayObjective ​

继承 Packet。

python
class SetDisplayObjective(_Packet):
    packet_id: ClassVar[int] = 107
    packet_name: ClassVar[str] = 'SetDisplayObjective'
    DisplaySlot: str | StringBytes
    ObjectiveName: str | StringBytes
    DisplayName: str | StringBytes
    CriteriaName: str | StringBytes
    SortOrder: int
    def __init__(self, /, *,
        DisplaySlot: str | StringBytes = ...,
        ObjectiveName: str | StringBytes = ...,
        DisplayName: str | StringBytes = ...,
        CriteriaName: str | StringBytes = ...,
        SortOrder: int = ...,
    ) -> None: ...

SetHealth ​

继承 Packet。

python
class SetHealth(_Packet):
    packet_id: ClassVar[int] = 42
    packet_name: ClassVar[str] = 'SetHealth'
    Health: int
    def __init__(self, /, *,
        Health: int = ...,
    ) -> None: ...

SetHud ​

继承 Packet。

python
class SetHud(_Packet):
    packet_id: ClassVar[int] = 308
    packet_name: ClassVar[str] = 'SetHud'
    Elements: list[int] | tuple[int, ...] | None
    Visibility: int
    def __init__(self, /, *,
        Elements: list[int] | tuple[int, ...] | None = ...,
        Visibility: int = ...,
    ) -> None: ...

SetLastHurtBy ​

继承 Packet。

python
class SetLastHurtBy(_Packet):
    packet_id: ClassVar[int] = 96
    packet_name: ClassVar[str] = 'SetLastHurtBy'
    EntityType: int
    def __init__(self, /, *,
        EntityType: int = ...,
    ) -> None: ...

SetLocalPlayerAsInitialised ​

继承 Packet。

python
class SetLocalPlayerAsInitialised(_Packet):
    packet_id: ClassVar[int] = 113
    packet_name: ClassVar[str] = 'SetLocalPlayerAsInitialised'
    EntityRuntimeID: int
    def __init__(self, /, *,
        EntityRuntimeID: int = ...,
    ) -> None: ...

SetPlayerGameType ​

继承 Packet。

python
class SetPlayerGameType(_Packet):
    packet_id: ClassVar[int] = 62
    packet_name: ClassVar[str] = 'SetPlayerGameType'
    GameType: int
    def __init__(self, /, *,
        GameType: int = ...,
    ) -> None: ...

SetPlayerInventoryOptions ​

继承 Packet。

python
class SetPlayerInventoryOptions(_Packet):
    packet_id: ClassVar[int] = 307
    packet_name: ClassVar[str] = 'SetPlayerInventoryOptions'
    LeftInventoryTab: int
    RightInventoryTab: int
    Filtering: bool
    InventoryLayout: int
    CraftingLayout: int
    Unknown: int
    def __init__(self, /, *,
        LeftInventoryTab: int = ...,
        RightInventoryTab: int = ...,
        Filtering: bool = ...,
        InventoryLayout: int = ...,
        CraftingLayout: int = ...,
        Unknown: int = ...,
    ) -> None: ...

SetScore ​

继承 Packet。

python
class SetScore(_Packet):
    packet_id: ClassVar[int] = 108
    packet_name: ClassVar[str] = 'SetScore'
    ActionType: int
    Entries: list[ScoreboardEntry] | tuple[ScoreboardEntry, ...] | None
    def __init__(self, /, *,
        ActionType: int = ...,
        Entries: list[ScoreboardEntry] | tuple[ScoreboardEntry, ...] | None = ...,
    ) -> None: ...

相关字段类型:ScoreboardEntry。

SetScoreboardIdentity ​

继承 Packet。

python
class SetScoreboardIdentity(_Packet):
    packet_id: ClassVar[int] = 112
    packet_name: ClassVar[str] = 'SetScoreboardIdentity'
    ActionType: int
    Entries: list[ScoreboardIdentityEntry] | tuple[ScoreboardIdentityEntry, ...] | None
    def __init__(self, /, *,
        ActionType: int = ...,
        Entries: list[ScoreboardIdentityEntry] | tuple[ScoreboardIdentityEntry, ...] | None = ...,
    ) -> None: ...

相关字段类型:ScoreboardIdentityEntry。

SetSpawnPosition ​

继承 Packet。

python
class SetSpawnPosition(_Packet):
    packet_id: ClassVar[int] = 43
    packet_name: ClassVar[str] = 'SetSpawnPosition'
    SpawnType: int
    Position: list[int] | tuple[int, ...]
    Dimension: int
    SpawnPosition: list[int] | tuple[int, ...]
    def __init__(self, /, *,
        SpawnType: int = ...,
        Position: list[int] | tuple[int, ...] = ...,
        Dimension: int = ...,
        SpawnPosition: list[int] | tuple[int, ...] = ...,
    ) -> None: ...

SetTime ​

继承 Packet。

python
class SetTime(_Packet):
    packet_id: ClassVar[int] = 10
    packet_name: ClassVar[str] = 'SetTime'
    Time: int
    def __init__(self, /, *,
        Time: int = ...,
    ) -> None: ...

SettingsCommand ​

继承 Packet。

python
class SettingsCommand(_Packet):
    packet_id: ClassVar[int] = 140
    packet_name: ClassVar[str] = 'SettingsCommand'
    CommandLine: str | StringBytes
    SuppressOutput: bool
    def __init__(self, /, *,
        CommandLine: str | StringBytes = ...,
        SuppressOutput: bool = ...,
    ) -> None: ...

SetTitle ​

继承 Packet。

python
class SetTitle(_Packet):
    packet_id: ClassVar[int] = 88
    packet_name: ClassVar[str] = 'SetTitle'
    ActionType: int
    Text: str | StringBytes
    FadeInDuration: int
    RemainDuration: int
    FadeOutDuration: int
    XUID: str | StringBytes
    PlatformOnlineID: str | StringBytes
    FilteredMessage: str | StringBytes
    def __init__(self, /, *,
        ActionType: int = ...,
        Text: str | StringBytes = ...,
        FadeInDuration: int = ...,
        RemainDuration: int = ...,
        FadeOutDuration: int = ...,
        XUID: str | StringBytes = ...,
        PlatformOnlineID: str | StringBytes = ...,
        FilteredMessage: str | StringBytes = ...,
    ) -> None: ...

ShapeData_ ​

继承 Struct。

python
class ShapeData_(_Struct):
    NetworkID: int
    DimensionID: int
    Type: OptionalValue[int]
    Location: OptionalValue[list[float | FloatBits] | tuple[float | FloatBits, ...]]
    Scale: OptionalValue[float | FloatBits]
    Rotation: OptionalValue[list[float | FloatBits] | tuple[float | FloatBits, ...]]
    TotalTimeLeft: OptionalValue[float | FloatBits]
    Colour: OptionalValue[RGBA]
    ExtraShapeData: UnionValue | DynamicValue | ArrowShape | BoxShape | LastShape | LineShape | SphereShape | TextShape | None
    def __init__(self, /, *,
        NetworkID: int = ...,
        DimensionID: int = ...,
        Type: OptionalValue[int] = ...,
        Location: OptionalValue[list[float | FloatBits] | tuple[float | FloatBits, ...]] = ...,
        Scale: OptionalValue[float | FloatBits] = ...,
        Rotation: OptionalValue[list[float | FloatBits] | tuple[float | FloatBits, ...]] = ...,
        TotalTimeLeft: OptionalValue[float | FloatBits] = ...,
        Colour: OptionalValue[RGBA] = ...,
        ExtraShapeData: UnionValue | DynamicValue | ArrowShape | BoxShape | LastShape | LineShape | SphereShape | TextShape | None = ...,
    ) -> None: ...

相关字段类型:ArrowShape、BoxShape、LastShape、LineShape、RGBA、SphereShape、TextShape。

ShapedChemistryRecipe ​

继承 Struct。

python
class ShapedChemistryRecipe(_Struct):
    ShapedRecipe: ShapedRecipe
    def __init__(self, /, *,
        ShapedRecipe: ShapedRecipe = ...,
    ) -> None: ...

相关字段类型:ShapedRecipe。

ShapedRecipe ​

继承 Struct。

python
class ShapedRecipe(_Struct):
    RecipeID: str | StringBytes
    Width: int
    Height: int
    Input: list[ItemDescriptorCount] | tuple[ItemDescriptorCount, ...] | None
    Output: list[ItemStack] | tuple[ItemStack, ...] | None
    UUID: bytes
    Block: str | StringBytes
    Priority: int
    AssumeSymmetry: bool
    UnlockRequirement: RecipeUnlockRequirement
    RecipeNetworkID: int
    def __init__(self, /, *,
        RecipeID: str | StringBytes = ...,
        Width: int = ...,
        Height: int = ...,
        Input: list[ItemDescriptorCount] | tuple[ItemDescriptorCount, ...] | None = ...,
        Output: list[ItemStack] | tuple[ItemStack, ...] | None = ...,
        UUID: bytes = ...,
        Block: str | StringBytes = ...,
        Priority: int = ...,
        AssumeSymmetry: bool = ...,
        UnlockRequirement: RecipeUnlockRequirement = ...,
        RecipeNetworkID: int = ...,
    ) -> None: ...

相关字段类型:ItemDescriptorCount、ItemStack、RecipeUnlockRequirement。

ShapedRecipe_ ​

继承 Struct。

python
class ShapedRecipe_(_Struct):
    ShapedRecipe: ShapedRecipe
    def __init__(self, /, *,
        ShapedRecipe: ShapedRecipe = ...,
    ) -> None: ...

相关字段类型:ShapedRecipe。

ShapelessChemistryRecipe ​

继承 Struct。

python
class ShapelessChemistryRecipe(_Struct):
    ShapelessRecipe: ShapelessRecipe
    def __init__(self, /, *,
        ShapelessRecipe: ShapelessRecipe = ...,
    ) -> None: ...

相关字段类型:ShapelessRecipe。

ShapelessRecipe ​

继承 Struct。

python
class ShapelessRecipe(_Struct):
    RecipeID: str | StringBytes
    Input: list[ItemDescriptorCount] | tuple[ItemDescriptorCount, ...] | None
    Output: list[ItemStack] | tuple[ItemStack, ...] | None
    UUID: bytes
    Block: str | StringBytes
    Priority: int
    UnlockRequirement: RecipeUnlockRequirement
    RecipeNetworkID: int
    def __init__(self, /, *,
        RecipeID: str | StringBytes = ...,
        Input: list[ItemDescriptorCount] | tuple[ItemDescriptorCount, ...] | None = ...,
        Output: list[ItemStack] | tuple[ItemStack, ...] | None = ...,
        UUID: bytes = ...,
        Block: str | StringBytes = ...,
        Priority: int = ...,
        UnlockRequirement: RecipeUnlockRequirement = ...,
        RecipeNetworkID: int = ...,
    ) -> None: ...

相关字段类型:ItemDescriptorCount、ItemStack、RecipeUnlockRequirement。

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