跳转到正文

协议模型:P · 2 ​

全部模型 · 协议包用法

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

PlayerArmourDamageEntry ​

继承 Struct。

python
class PlayerArmourDamageEntry(_Struct):
    ArmourSlot: int
    Damage: int
    def __init__(self, /, *,
        ArmourSlot: int = ...,
        Damage: int = ...,
    ) -> None: ...

PlayerArmourDamageEntry_ ​

继承 Struct。

python
class PlayerArmourDamageEntry_(_Struct):
    List: list[PlayerArmourDamageEntry] | tuple[PlayerArmourDamageEntry, ...] | None
    def __init__(self, /, *,
        List: list[PlayerArmourDamageEntry] | tuple[PlayerArmourDamageEntry, ...] | None = ...,
    ) -> None: ...

相关字段类型:PlayerArmourDamageEntry。

PlayerAuthInput ​

继承 Packet。

python
class PlayerAuthInput(_Packet):
    packet_id: ClassVar[int] = 144
    packet_name: ClassVar[str] = 'PlayerAuthInput'
    Pitch: float | FloatBits
    Yaw: float | FloatBits
    Position: list[float | FloatBits] | tuple[float | FloatBits, ...]
    MoveVector: list[float | FloatBits] | tuple[float | FloatBits, ...]
    HeadYaw: float | FloatBits
    InputData: str
    InputMode: int
    PlayMode: int
    InteractionModel: int
    InteractPitch: float | FloatBits
    InteractYaw: float | FloatBits
    Tick: int
    Delta: list[float | FloatBits] | tuple[float | FloatBits, ...]
    ItemInteractionData: UseItemTransactionData
    ItemStackRequest: ProtocolItemStackRequest
    BlockActions: list[PlayerBlockAction] | tuple[PlayerBlockAction, ...] | None
    VehicleRotation: list[float | FloatBits] | tuple[float | FloatBits, ...]
    ClientPredictedVehicle: int
    AnalogueMoveVector: list[float | FloatBits] | tuple[float | FloatBits, ...]
    CameraOrientation: list[float | FloatBits] | tuple[float | FloatBits, ...]
    RawMoveVector: list[float | FloatBits] | tuple[float | FloatBits, ...]
    PitchRepeat: float | FloatBits
    YawRepeat: float | FloatBits
    CameraDeparted: bool
    CheatOnGround: bool
    Unknown1: bool
    Unknown2: bool
    Unknown3: float | FloatBits
    def __init__(self, /, *,
        Pitch: float | FloatBits = ...,
        Yaw: float | FloatBits = ...,
        Position: list[float | FloatBits] | tuple[float | FloatBits, ...] = ...,
        MoveVector: list[float | FloatBits] | tuple[float | FloatBits, ...] = ...,
        HeadYaw: float | FloatBits = ...,
        InputData: str = ...,
        InputMode: int = ...,
        PlayMode: int = ...,
        InteractionModel: int = ...,
        InteractPitch: float | FloatBits = ...,
        InteractYaw: float | FloatBits = ...,
        Tick: int = ...,
        Delta: list[float | FloatBits] | tuple[float | FloatBits, ...] = ...,
        ItemInteractionData: UseItemTransactionData = ...,
        ItemStackRequest: ProtocolItemStackRequest = ...,
        BlockActions: list[PlayerBlockAction] | tuple[PlayerBlockAction, ...] | None = ...,
        VehicleRotation: list[float | FloatBits] | tuple[float | FloatBits, ...] = ...,
        ClientPredictedVehicle: int = ...,
        AnalogueMoveVector: list[float | FloatBits] | tuple[float | FloatBits, ...] = ...,
        CameraOrientation: list[float | FloatBits] | tuple[float | FloatBits, ...] = ...,
        RawMoveVector: list[float | FloatBits] | tuple[float | FloatBits, ...] = ...,
        PitchRepeat: float | FloatBits = ...,
        YawRepeat: float | FloatBits = ...,
        CameraDeparted: bool = ...,
        CheatOnGround: bool = ...,
        Unknown1: bool = ...,
        Unknown2: bool = ...,
        Unknown3: float | FloatBits = ...,
    ) -> None: ...

相关字段类型:PlayerBlockAction、ProtocolItemStackRequest、UseItemTransactionData。

PlayerBlockAction ​

继承 Struct。

python
class PlayerBlockAction(_Struct):
    Action: int
    BlockPos: list[int] | tuple[int, ...]
    Face: int
    def __init__(self, /, *,
        Action: int = ...,
        BlockPos: list[int] | tuple[int, ...] = ...,
        Face: int = ...,
    ) -> None: ...

PlayerDiedEvent ​

继承 Struct。

python
class PlayerDiedEvent(_Struct):
    AttackerEntityID: int
    AttackerVariant: int
    EntityDamageCause: int
    InRaid: bool
    def __init__(self, /, *,
        AttackerEntityID: int = ...,
        AttackerVariant: int = ...,
        EntityDamageCause: int = ...,
        InRaid: bool = ...,
    ) -> None: ...

PlayerEnchantOptions ​

继承 Packet。

python
class PlayerEnchantOptions(_Packet):
    packet_id: ClassVar[int] = 146
    packet_name: ClassVar[str] = 'PlayerEnchantOptions'
    Options: list[EnchantmentOption] | tuple[EnchantmentOption, ...] | None
    def __init__(self, /, *,
        Options: list[EnchantmentOption] | tuple[EnchantmentOption, ...] | None = ...,
    ) -> None: ...

相关字段类型:EnchantmentOption。

PlayerFog ​

继承 Packet。

python
class PlayerFog(_Packet):
    packet_id: ClassVar[int] = 160
    packet_name: ClassVar[str] = 'PlayerFog'
    Stack: list[str | StringBytes] | tuple[str | StringBytes, ...] | None
    def __init__(self, /, *,
        Stack: list[str | StringBytes] | tuple[str | StringBytes, ...] | None = ...,
    ) -> None: ...

PlayerHotBar ​

继承 Packet。

python
class PlayerHotBar(_Packet):
    packet_id: ClassVar[int] = 48
    packet_name: ClassVar[str] = 'PlayerHotBar'
    SelectedHotBarSlot: int
    WindowID: int
    SelectHotBarSlot: bool
    def __init__(self, /, *,
        SelectedHotBarSlot: int = ...,
        WindowID: int = ...,
        SelectHotBarSlot: bool = ...,
    ) -> None: ...

PlayerList ​

继承 Packet。

python
class PlayerList(_Packet):
    packet_id: ClassVar[int] = 63
    packet_name: ClassVar[str] = 'PlayerList'
    ActionType: int
    Entries: list[PlayerListEntry] | tuple[PlayerListEntry, ...] | None
    VipFormats: list[NeteaseNameData] | tuple[NeteaseNameData, ...] | None
    NameTags: list[NeteaseNameData] | tuple[NeteaseNameData, ...] | None
    BloomImages: list[str | StringBytes] | tuple[str | StringBytes, ...] | None
    GrowthLevels: list[int] | tuple[int, ...] | None
    HideUserDataScreen: list[bool] | tuple[bool, ...] | None
    def __init__(self, /, *,
        ActionType: int = ...,
        Entries: list[PlayerListEntry] | tuple[PlayerListEntry, ...] | None = ...,
        VipFormats: list[NeteaseNameData] | tuple[NeteaseNameData, ...] | None = ...,
        NameTags: list[NeteaseNameData] | tuple[NeteaseNameData, ...] | None = ...,
        BloomImages: list[str | StringBytes] | tuple[str | StringBytes, ...] | None = ...,
        GrowthLevels: list[int] | tuple[int, ...] | None = ...,
        HideUserDataScreen: list[bool] | tuple[bool, ...] | None = ...,
    ) -> None: ...

相关字段类型:NeteaseNameData、PlayerListEntry。

PlayerListEntry ​

继承 Struct。

python
class PlayerListEntry(_Struct):
    UUID: bytes
    EntityUniqueID: int
    Username: str | StringBytes
    XUID: str | StringBytes
    PlatformChatID: str | StringBytes
    BuildPlatform: int
    Skin: Skin
    Teacher: bool
    Host: bool
    SubClient: bool
    PlayerColour: RGBA
    def __init__(self, /, *,
        UUID: bytes = ...,
        EntityUniqueID: int = ...,
        Username: str | StringBytes = ...,
        XUID: str | StringBytes = ...,
        PlatformChatID: str | StringBytes = ...,
        BuildPlatform: int = ...,
        Skin: Skin = ...,
        Teacher: bool = ...,
        Host: bool = ...,
        SubClient: bool = ...,
        PlayerColour: RGBA = ...,
    ) -> None: ...

相关字段类型:RGBA、Skin。

PlayerLocation ​

继承 Packet。

python
class PlayerLocation(_Packet):
    packet_id: ClassVar[int] = 326
    packet_name: ClassVar[str] = 'PlayerLocation'
    Type: int
    EntityUniqueID: int
    Position: list[float | FloatBits] | tuple[float | FloatBits, ...]
    def __init__(self, /, *,
        Type: int = ...,
        EntityUniqueID: int = ...,
        Position: list[float | FloatBits] | tuple[float | FloatBits, ...] = ...,
    ) -> None: ...

PlayerMovementSettings ​

继承 Struct。

python
class PlayerMovementSettings(_Struct):
    RewindHistorySize: int
    ServerAuthoritativeBlockBreaking: bool
    def __init__(self, /, *,
        RewindHistorySize: int = ...,
        ServerAuthoritativeBlockBreaking: bool = ...,
    ) -> None: ...

PlayerSkin ​

继承 Packet。

python
class PlayerSkin(_Packet):
    packet_id: ClassVar[int] = 93
    packet_name: ClassVar[str] = 'PlayerSkin'
    UUID: bytes
    Skin: Skin
    NewSkinName: str | StringBytes
    OldSkinName: str | StringBytes
    def __init__(self, /, *,
        UUID: bytes = ...,
        Skin: Skin = ...,
        NewSkinName: str | StringBytes = ...,
        OldSkinName: str | StringBytes = ...,
    ) -> None: ...

相关字段类型:Skin。

PlayerToggleCrafterSlotRequest ​

继承 Packet。

python
class PlayerToggleCrafterSlotRequest(_Packet):
    packet_id: ClassVar[int] = 306
    packet_name: ClassVar[str] = 'PlayerToggleCrafterSlotRequest'
    PosX: int
    PosY: int
    PosZ: int
    Slot: int
    Disabled: bool
    def __init__(self, /, *,
        PosX: int = ...,
        PosY: int = ...,
        PosZ: int = ...,
        Slot: int = ...,
        Disabled: bool = ...,
    ) -> None: ...

PlayerUpdateEntityOverrides ​

继承 Packet。

python
class PlayerUpdateEntityOverrides(_Packet):
    packet_id: ClassVar[int] = 325
    packet_name: ClassVar[str] = 'PlayerUpdateEntityOverrides'
    EntityUniqueID: int
    PropertyIndex: int
    Type: int
    IntValue: int
    FloatValue: float | FloatBits
    def __init__(self, /, *,
        EntityUniqueID: int = ...,
        PropertyIndex: int = ...,
        Type: int = ...,
        IntValue: int = ...,
        FloatValue: float | FloatBits = ...,
    ) -> None: ...

PlayerVideoCapture ​

继承 Packet。

python
class PlayerVideoCapture(_Packet):
    packet_id: ClassVar[int] = 324
    packet_name: ClassVar[str] = 'PlayerVideoCapture'
    Action: int
    FrameRate: int
    FilePrefix: str | StringBytes
    def __init__(self, /, *,
        Action: int = ...,
        FrameRate: int = ...,
        FilePrefix: str | StringBytes = ...,
    ) -> None: ...

PlaySound ​

继承 Packet。

python
class PlaySound(_Packet):
    packet_id: ClassVar[int] = 86
    packet_name: ClassVar[str] = 'PlaySound'
    SoundName: str | StringBytes
    Position: list[float | FloatBits] | tuple[float | FloatBits, ...]
    Volume: float | FloatBits
    Pitch: float | FloatBits
    def __init__(self, /, *,
        SoundName: str | StringBytes = ...,
        Position: list[float | FloatBits] | tuple[float | FloatBits, ...] = ...,
        Volume: float | FloatBits = ...,
        Pitch: float | FloatBits = ...,
    ) -> None: ...

PlayStatus ​

继承 Packet。

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

PortalBuiltEvent ​

继承 Struct。

python
class PortalBuiltEvent(_Struct):
    DimensionID: int
    def __init__(self, /, *,
        DimensionID: int = ...,
    ) -> None: ...

PortalUsedEvent ​

继承 Struct。

python
class PortalUsedEvent(_Struct):
    FromDimensionID: int
    ToDimensionID: int
    def __init__(self, /, *,
        FromDimensionID: int = ...,
        ToDimensionID: int = ...,
    ) -> None: ...

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