@serenityjs/protocol 0.2.4-beta-20240528033553 → 0.2.4-beta-20240530210858

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -44,7 +44,8 @@ declare enum Packet {
44
44
  PlayerList = 63,// 63
45
45
  RequestChunkRadius = 69,// 69
46
46
  ChunkRadiusUpdate = 70,// 70
47
- AvailableCommands = 76,
47
+ BossEvent = 74,// 74
48
+ AvailableCommands = 76,// 76
48
49
  CommandRequest = 77,// 77
49
50
  CommandOutput = 79,// 79
50
51
  ResourcePackDataInfo = 82,// 82
@@ -59,6 +60,7 @@ declare enum Packet {
59
60
  SetScore = 108,// 108
60
61
  SetScoreboardIdentity = 112,// 112
61
62
  SetLocalPlayerAsInitialized = 113,// 113
63
+ NetworkStackLatency = 115,// 115
62
64
  NetworkChunkPublisherUpdate = 121,// 121
63
65
  BiomeDefinitionList = 122,// 122
64
66
  LevelSoundEvent = 123,// 123
@@ -1633,6 +1635,29 @@ declare enum Enchantment {
1633
1635
  Unknown = 39
1634
1636
  }
1635
1637
 
1638
+ declare enum BossEventUpdateType {
1639
+ Add = 0,
1640
+ PlayerAdded = 1,
1641
+ Remove = 2,
1642
+ PlayerRemoved = 3,
1643
+ UpdatePercent = 4,
1644
+ UpdateName = 5,
1645
+ UpdateProperties = 6,
1646
+ UpdateStyle = 7,
1647
+ Query = 8
1648
+ }
1649
+
1650
+ declare enum BossEventColor {
1651
+ Pink = 0,
1652
+ Blue = 1,
1653
+ Red = 2,
1654
+ Green = 3,
1655
+ Yellow = 4,
1656
+ Magenta = 5,
1657
+ Purple = 6,
1658
+ White = 7
1659
+ }
1660
+
1636
1661
  declare class LoginTokens extends DataType {
1637
1662
  client: string;
1638
1663
  identity: string;
@@ -3013,6 +3038,29 @@ declare class HUDElement extends DataType {
3013
3038
  static write(stream: BinaryStream, value: Array<HUDElement>): void;
3014
3039
  }
3015
3040
 
3041
+ declare class BossEventAdd extends DataType {
3042
+ readonly title: string;
3043
+ readonly percent: number;
3044
+ readonly darkenScreen: number;
3045
+ readonly color: BossEventColor;
3046
+ readonly overlay: number;
3047
+ constructor(title: string, percent: number, darkenScreen: number, color: BossEventColor, overlay: number);
3048
+ static read(stream: BinaryStream, _endian: Endianness, type: BossEventUpdateType): BossEventAdd | null;
3049
+ static write(stream: BinaryStream, value: BossEventAdd, _endian: Endianness, type: BossEventUpdateType): void;
3050
+ }
3051
+
3052
+ declare class BossEventUpdate extends DataType {
3053
+ readonly playerUniqueId?: bigint | null;
3054
+ readonly percent?: number | null;
3055
+ readonly title?: string | null;
3056
+ readonly darkenScreen?: number | null;
3057
+ readonly color?: BossEventColor | null;
3058
+ readonly overlay?: number | null;
3059
+ constructor(playerUniqueId?: bigint | null, percent?: number | null, title?: string | null, darkenScreen?: number | null, color?: BossEventColor | null, overlay?: number | null);
3060
+ static read(stream: BinaryStream, _endian: Endianness, type: BossEventUpdateType): BossEventUpdate | null;
3061
+ static write(stream: BinaryStream, value: BossEventUpdate, _endian: Endianness, type: BossEventUpdateType): void;
3062
+ }
3063
+
3016
3064
  /**
3017
3065
  * Represents a Minecraft Bedrock Edition data packet
3018
3066
  */
@@ -3588,6 +3636,18 @@ declare class TakeItemActorPacket extends DataPacket {
3588
3636
  targetUniqueId: bigint;
3589
3637
  }
3590
3638
 
3639
+ declare class NetworkStackLatencyPacket extends DataPacket {
3640
+ timestamp: bigint;
3641
+ fromServer: boolean;
3642
+ }
3643
+
3644
+ declare class BossEventPacket extends DataPacket {
3645
+ targetUniqueId: bigint;
3646
+ type: BossEventUpdateType;
3647
+ add: BossEventAdd;
3648
+ update: BossEventUpdate;
3649
+ }
3650
+
3591
3651
  declare const Packets: {
3592
3652
  1: typeof LoginPacket;
3593
3653
  2: typeof PlayStatusPacket;
@@ -3629,6 +3689,7 @@ declare const Packets: {
3629
3689
  63: typeof PlayerListPacket;
3630
3690
  69: typeof RequestChunkRadiusPacket;
3631
3691
  70: typeof ChunkRadiusUpdatePacket;
3692
+ 74: typeof BossEventPacket;
3632
3693
  76: typeof AvailableCommandsPacket;
3633
3694
  77: typeof CommandRequestPacket;
3634
3695
  79: typeof CommandOutputPacket;
@@ -3644,6 +3705,7 @@ declare const Packets: {
3644
3705
  108: typeof SetScorePacket;
3645
3706
  112: typeof SetScoreboardIdentityPacket;
3646
3707
  113: typeof SetLocalPlayerAsInitializedPacket;
3708
+ 115: typeof NetworkStackLatencyPacket;
3647
3709
  121: typeof NetworkChunkPublisherUpdatePacket;
3648
3710
  122: typeof BiomeDefinitionListPacket;
3649
3711
  123: typeof LevelSoundEventPacket;
@@ -3681,4 +3743,4 @@ declare const PROTOCOL_VERSION = 671;
3681
3743
  declare const MINECRAFT_VERSION = "1.20.80";
3682
3744
  declare const MINECRAFT_TICK_SPEED = 50;
3683
3745
 
3684
- export { AbilityLayerFlag, AbilityLayerType, AbilityLayers, AbilitySet, ActionIds, AddEntityPacket, AddItemActorPacket, AddPlayerPacket, AnimateAction, AnimateId, AnimatePacket, Attribute, AvailableCommandsPacket, BehaviorPackInfo, BiomeDefinitionListPacket, BlockCoordinates, BlockFace, BlockPickRequestPacket, BlockProperties, ChainedSubcommandValues, ChangeDimensionPacket, ChunkCoords, ChunkRadiusUpdatePacket, CommandOriginData, CommandOutputData, CommandOutputMessage, CommandOutputPacket, CommandParameterType, CommandPermissionLevel, CommandRequestPacket, Commands, ComplexInventoryTransaction, ComponentItem, CompressionMethod, ContainerClosePacket, ContainerId, ContainerName, ContainerOpenPacket, ContainerType, CreativeContentPacket, CreativeItems, DataPacket, DeviceOS, Difficulty, DimensionType, DisconnectPacket, DisconnectReason, DisplaySlotType, DynamicEnums, Enchantment, EntityAttributes, EntityProperties, EnumConstraints, EnumValues, Enums, Experiments, Framer, GameRuleType, GameRules, Gamemode, HUDElement, HUDElementId, HUDVisibility, InteractActions, InteractPacket, InteractPosition, InventoryAction, InventoryContentPacket, InventorySlotPacket, InventorySource, InventorySourceType, InventoryTransaction, InventoryTransactionPacket, ItemComponentPacket, ItemData, ItemInstanceUserData, ItemReleaseInventoryTransaction, ItemReleaseInventoryTransactionType, type ItemStackAction, ItemStackActionType, type ItemStackContainer, ItemStackRequestPacket, ItemStackRequests, ItemStackResponsePacket, ItemStackResponses, ItemStackStatus, ItemStacks, ItemUseInventoryTransaction, ItemUseInventoryTransactionType, ItemUseOnEntityInventoryTransaction, ItemUseOnEntityInventoryTransactionType, LegacyTransaction, LevelChunkPacket, LevelEvent, LevelEventPacket, LevelSoundEvent, LevelSoundEventPacket, Links, LoginPacket, LoginTokens, MINECRAFT_TICK_SPEED, MINECRAFT_VERSION, MetadataDictionary, MetadataFlags, MetadataKey, MetadataType, MobEquipmentPacket, ModalFormCanceled, ModalFormCanceledReason, ModalFormData, ModalFormRequestPacket, ModalFormResponsePacket, ModalFormType, MoveActorAbsolutePacket, MoveMode, MovePlayerPacket, NetworkChunkPublisherUpdatePacket, NetworkItemInstanceDescriptor, NetworkItemStackDescriptor, NetworkSettingsPacket, ObjectiveSortOrder, PROTOCOL_VERSION, PackLinks, PackType, Packet, PacketViolationWarningPacket, Packets, PermissionLevel, PlayStatus, PlayStatusPacket, PlayerActionPacket, PlayerAttributes, PlayerAuthInputData, PlayerAuthInputPacket, PlayerHotbarPacket, PlayerListAction, PlayerListPacket, PlayerListRecord, PostFixes, RemoveEntityPacket, RemoveObjectivePacket, RequestChunkRadiusPacket, RequestNetworkSettingsPacket, ResourceIdVersions, ResourcePackChunkDataPacket, ResourcePackChunkRequestPacket, ResourcePackClientResponsePacket, ResourcePackDataInfoPacket, ResourcePackIds, ResourcePackResponse, ResourcePackStackPacket, ResourcePacksInfoPacket, RespawnPacket, RespawnState, Rotation, ScoreActionType, ScoreEntry, ScoreEntryType, ScoreboardIdentity, ScoreboardIdentityAction, ScriptMessagePacket, SerializedSkin, SetActorMotionPacket, SetCommandsEnabledPacket, SetDisplayObjectivePacket, SetEntityDataPacket, SetHudPacket, SetLocalPlayerAsInitializedPacket, SetPlayerGameTypePacket, SetScorePacket, SetScoreboardIdentityPacket, SetTimePacket, SetTitlePacket, SkinAnimation, SkinImage, SkinPersonaPiece, SkinPersonaTintPiece, StackRequestSlotInfo, StartGamePacket, Subcommands, TakeItemActorPacket, TeleportCause, TextPacket, TextPacketType, TextParameters, TextSource, TexturePackInfo, TitleTypes, ToastRequestPacket, TransactionSourceType, TransferPacket, UpdateAbilitiesPacket, UpdateAdventureSettingsPacket, UpdateAttributesPacket, UpdateBlockFlagsType, UpdateBlockLayerType, UpdateBlockPacket, VariableStringArray as VarStringArray, VarintArray, Vector2f, Vector3f, ViolationSeverity, ViolationType, getPacketId };
3746
+ export { AbilityLayerFlag, AbilityLayerType, AbilityLayers, AbilitySet, ActionIds, AddEntityPacket, AddItemActorPacket, AddPlayerPacket, AnimateAction, AnimateId, AnimatePacket, Attribute, AvailableCommandsPacket, BehaviorPackInfo, BiomeDefinitionListPacket, BlockCoordinates, BlockFace, BlockPickRequestPacket, BlockProperties, BossEventAdd, BossEventColor, BossEventPacket, BossEventUpdate, BossEventUpdateType, ChainedSubcommandValues, ChangeDimensionPacket, ChunkCoords, ChunkRadiusUpdatePacket, CommandOriginData, CommandOutputData, CommandOutputMessage, CommandOutputPacket, CommandParameterType, CommandPermissionLevel, CommandRequestPacket, Commands, ComplexInventoryTransaction, ComponentItem, CompressionMethod, ContainerClosePacket, ContainerId, ContainerName, ContainerOpenPacket, ContainerType, CreativeContentPacket, CreativeItems, DataPacket, DeviceOS, Difficulty, DimensionType, DisconnectPacket, DisconnectReason, DisplaySlotType, DynamicEnums, Enchantment, EntityAttributes, EntityProperties, EnumConstraints, EnumValues, Enums, Experiments, Framer, GameRuleType, GameRules, Gamemode, HUDElement, HUDElementId, HUDVisibility, InteractActions, InteractPacket, InteractPosition, InventoryAction, InventoryContentPacket, InventorySlotPacket, InventorySource, InventorySourceType, InventoryTransaction, InventoryTransactionPacket, ItemComponentPacket, ItemData, ItemInstanceUserData, ItemReleaseInventoryTransaction, ItemReleaseInventoryTransactionType, type ItemStackAction, ItemStackActionType, type ItemStackContainer, ItemStackRequestPacket, ItemStackRequests, ItemStackResponsePacket, ItemStackResponses, ItemStackStatus, ItemStacks, ItemUseInventoryTransaction, ItemUseInventoryTransactionType, ItemUseOnEntityInventoryTransaction, ItemUseOnEntityInventoryTransactionType, LegacyTransaction, LevelChunkPacket, LevelEvent, LevelEventPacket, LevelSoundEvent, LevelSoundEventPacket, Links, LoginPacket, LoginTokens, MINECRAFT_TICK_SPEED, MINECRAFT_VERSION, MetadataDictionary, MetadataFlags, MetadataKey, MetadataType, MobEquipmentPacket, ModalFormCanceled, ModalFormCanceledReason, ModalFormData, ModalFormRequestPacket, ModalFormResponsePacket, ModalFormType, MoveActorAbsolutePacket, MoveMode, MovePlayerPacket, NetworkChunkPublisherUpdatePacket, NetworkItemInstanceDescriptor, NetworkItemStackDescriptor, NetworkSettingsPacket, NetworkStackLatencyPacket, ObjectiveSortOrder, PROTOCOL_VERSION, PackLinks, PackType, Packet, PacketViolationWarningPacket, Packets, PermissionLevel, PlayStatus, PlayStatusPacket, PlayerActionPacket, PlayerAttributes, PlayerAuthInputData, PlayerAuthInputPacket, PlayerHotbarPacket, PlayerListAction, PlayerListPacket, PlayerListRecord, PostFixes, RemoveEntityPacket, RemoveObjectivePacket, RequestChunkRadiusPacket, RequestNetworkSettingsPacket, ResourceIdVersions, ResourcePackChunkDataPacket, ResourcePackChunkRequestPacket, ResourcePackClientResponsePacket, ResourcePackDataInfoPacket, ResourcePackIds, ResourcePackResponse, ResourcePackStackPacket, ResourcePacksInfoPacket, RespawnPacket, RespawnState, Rotation, ScoreActionType, ScoreEntry, ScoreEntryType, ScoreboardIdentity, ScoreboardIdentityAction, ScriptMessagePacket, SerializedSkin, SetActorMotionPacket, SetCommandsEnabledPacket, SetDisplayObjectivePacket, SetEntityDataPacket, SetHudPacket, SetLocalPlayerAsInitializedPacket, SetPlayerGameTypePacket, SetScorePacket, SetScoreboardIdentityPacket, SetTimePacket, SetTitlePacket, SkinAnimation, SkinImage, SkinPersonaPiece, SkinPersonaTintPiece, StackRequestSlotInfo, StartGamePacket, Subcommands, TakeItemActorPacket, TeleportCause, TextPacket, TextPacketType, TextParameters, TextSource, TexturePackInfo, TitleTypes, ToastRequestPacket, TransactionSourceType, TransferPacket, UpdateAbilitiesPacket, UpdateAdventureSettingsPacket, UpdateAttributesPacket, UpdateBlockFlagsType, UpdateBlockLayerType, UpdateBlockPacket, VariableStringArray as VarStringArray, VarintArray, Vector2f, Vector3f, ViolationSeverity, ViolationType, getPacketId };