@serenityjs/protocol 0.3.4-beta-20240613044622 → 0.3.4
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 +8 -3
- package/dist/index.js +65 -45
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -3278,7 +3278,8 @@ declare class CommandRequestPacket extends DataPacket {
|
|
|
3278
3278
|
}
|
|
3279
3279
|
|
|
3280
3280
|
declare class ContainerClosePacket extends DataPacket {
|
|
3281
|
-
|
|
3281
|
+
identifier: ContainerId;
|
|
3282
|
+
type: ContainerType;
|
|
3282
3283
|
serverInitiated: boolean;
|
|
3283
3284
|
}
|
|
3284
3285
|
|
|
@@ -3633,6 +3634,9 @@ declare class StartGamePacket extends DataPacket {
|
|
|
3633
3634
|
experimentalGameplayOverride: boolean;
|
|
3634
3635
|
chatRestrictionLevel: number;
|
|
3635
3636
|
disablePlayerInteractions: boolean;
|
|
3637
|
+
serverIdentfier: string;
|
|
3638
|
+
worldIdentifier: string;
|
|
3639
|
+
scenarioIdentifier: string;
|
|
3636
3640
|
levelId: string;
|
|
3637
3641
|
worldName: string;
|
|
3638
3642
|
premiumWorldTemplateId: string;
|
|
@@ -3665,6 +3669,7 @@ declare class TextPacket extends DataPacket {
|
|
|
3665
3669
|
parameters: Array<string> | null;
|
|
3666
3670
|
xuid: string;
|
|
3667
3671
|
platformChatId: string;
|
|
3672
|
+
filtered: string;
|
|
3668
3673
|
}
|
|
3669
3674
|
|
|
3670
3675
|
declare class ToastRequestPacket extends DataPacket {
|
|
@@ -3902,8 +3907,8 @@ declare class Framer {
|
|
|
3902
3907
|
*/
|
|
3903
3908
|
declare function getPacketId(buffer: Buffer): Packet;
|
|
3904
3909
|
|
|
3905
|
-
declare const PROTOCOL_VERSION =
|
|
3906
|
-
declare const MINECRAFT_VERSION = "1.
|
|
3910
|
+
declare const PROTOCOL_VERSION = 685;
|
|
3911
|
+
declare const MINECRAFT_VERSION = "1.21.0";
|
|
3907
3912
|
declare const MINECRAFT_TICK_SPEED = 50;
|
|
3908
3913
|
|
|
3909
3914
|
export { AbilityLayerFlag, AbilityLayerType, AbilityLayers, AbilitySet, ActionIds, ActorEventIds, ActorEventPacket, AddEntityPacket, AddItemActorPacket, AddPlayerPacket, AnimateAction, AnimateEntity, AnimateEntityPacket, AnimateId, AnimatePacket, Attribute, AvailableCommandsPacket, BehaviorPackInfo, BiomeDefinitionListPacket, BlockActorDataPacket, 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, EmoteFlags, EmoteListPacket, EmotePacket, Emotes, 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, NpcDialogueAction, NpcDialoguePacket, ObjectiveSortOrder, PROTOCOL_VERSION, PackLinks, PackType, Packet, PacketViolationWarningPacket, Packets, PermissionLevel, PlayStatus, PlayStatusPacket, PlayerActionPacket, PlayerAttributes, PlayerAuthInputData, PlayerAuthInputPacket, PlayerHotbarPacket, PlayerListAction, PlayerListPacket, PlayerListRecord, PlayerSkinPacket, 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 };
|
package/dist/index.js
CHANGED
|
@@ -726,47 +726,47 @@ var ContainerName = /* @__PURE__ */ ((ContainerName2) => {
|
|
|
726
726
|
})(ContainerName || {});
|
|
727
727
|
|
|
728
728
|
// src/enums/container-type.ts
|
|
729
|
-
var ContainerType = /* @__PURE__ */ ((
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
return
|
|
729
|
+
var ContainerType = /* @__PURE__ */ ((ContainerType4) => {
|
|
730
|
+
ContainerType4[ContainerType4["None"] = -9] = "None";
|
|
731
|
+
ContainerType4[ContainerType4["Inventory"] = -1] = "Inventory";
|
|
732
|
+
ContainerType4[ContainerType4["Container"] = 0] = "Container";
|
|
733
|
+
ContainerType4[ContainerType4["Workbench"] = 1] = "Workbench";
|
|
734
|
+
ContainerType4[ContainerType4["Furnace"] = 2] = "Furnace";
|
|
735
|
+
ContainerType4[ContainerType4["Enchantment"] = 3] = "Enchantment";
|
|
736
|
+
ContainerType4[ContainerType4["BrewingStand"] = 4] = "BrewingStand";
|
|
737
|
+
ContainerType4[ContainerType4["Anvil"] = 5] = "Anvil";
|
|
738
|
+
ContainerType4[ContainerType4["Dispenser"] = 6] = "Dispenser";
|
|
739
|
+
ContainerType4[ContainerType4["Dropper"] = 7] = "Dropper";
|
|
740
|
+
ContainerType4[ContainerType4["Hopper"] = 8] = "Hopper";
|
|
741
|
+
ContainerType4[ContainerType4["Cauldron"] = 9] = "Cauldron";
|
|
742
|
+
ContainerType4[ContainerType4["MinecartChest"] = 10] = "MinecartChest";
|
|
743
|
+
ContainerType4[ContainerType4["MinecartHopper"] = 11] = "MinecartHopper";
|
|
744
|
+
ContainerType4[ContainerType4["Horse"] = 12] = "Horse";
|
|
745
|
+
ContainerType4[ContainerType4["Beacon"] = 13] = "Beacon";
|
|
746
|
+
ContainerType4[ContainerType4["StructureEditor"] = 14] = "StructureEditor";
|
|
747
|
+
ContainerType4[ContainerType4["Trading"] = 15] = "Trading";
|
|
748
|
+
ContainerType4[ContainerType4["CommandBlock"] = 16] = "CommandBlock";
|
|
749
|
+
ContainerType4[ContainerType4["Jukebox"] = 17] = "Jukebox";
|
|
750
|
+
ContainerType4[ContainerType4["Armor"] = 18] = "Armor";
|
|
751
|
+
ContainerType4[ContainerType4["Hand"] = 19] = "Hand";
|
|
752
|
+
ContainerType4[ContainerType4["CompoundCreator"] = 20] = "CompoundCreator";
|
|
753
|
+
ContainerType4[ContainerType4["ElementConstructor"] = 21] = "ElementConstructor";
|
|
754
|
+
ContainerType4[ContainerType4["MaterialReducer"] = 22] = "MaterialReducer";
|
|
755
|
+
ContainerType4[ContainerType4["LabTable"] = 23] = "LabTable";
|
|
756
|
+
ContainerType4[ContainerType4["Loom"] = 24] = "Loom";
|
|
757
|
+
ContainerType4[ContainerType4["Lectern"] = 25] = "Lectern";
|
|
758
|
+
ContainerType4[ContainerType4["Grindstone"] = 26] = "Grindstone";
|
|
759
|
+
ContainerType4[ContainerType4["BlastFurnace"] = 27] = "BlastFurnace";
|
|
760
|
+
ContainerType4[ContainerType4["Smoker"] = 28] = "Smoker";
|
|
761
|
+
ContainerType4[ContainerType4["Stonecutter"] = 29] = "Stonecutter";
|
|
762
|
+
ContainerType4[ContainerType4["Cartography"] = 30] = "Cartography";
|
|
763
|
+
ContainerType4[ContainerType4["Hud"] = 31] = "Hud";
|
|
764
|
+
ContainerType4[ContainerType4["JigsawEditor"] = 32] = "JigsawEditor";
|
|
765
|
+
ContainerType4[ContainerType4["SmithingTable"] = 33] = "SmithingTable";
|
|
766
|
+
ContainerType4[ContainerType4["ChestBoat"] = 34] = "ChestBoat";
|
|
767
|
+
ContainerType4[ContainerType4["DecoratedPot"] = 35] = "DecoratedPot";
|
|
768
|
+
ContainerType4[ContainerType4["Crafter"] = 36] = "Crafter";
|
|
769
|
+
return ContainerType4;
|
|
770
770
|
})(ContainerType || {});
|
|
771
771
|
|
|
772
772
|
// src/enums/action-ids.ts
|
|
@@ -6310,12 +6310,16 @@ CommandRequestPacket = __decorateClass([
|
|
|
6310
6310
|
var import_binarystream43 = require("@serenityjs/binarystream");
|
|
6311
6311
|
var import_raknet82 = require("@serenityjs/raknet");
|
|
6312
6312
|
var ContainerClosePacket = class extends DataPacket {
|
|
6313
|
-
|
|
6313
|
+
identifier;
|
|
6314
|
+
type;
|
|
6314
6315
|
serverInitiated;
|
|
6315
6316
|
};
|
|
6316
6317
|
__decorateClass([
|
|
6317
6318
|
(0, import_raknet82.Serialize)(import_binarystream43.Int8)
|
|
6318
|
-
], ContainerClosePacket.prototype, "
|
|
6319
|
+
], ContainerClosePacket.prototype, "identifier", 2);
|
|
6320
|
+
__decorateClass([
|
|
6321
|
+
(0, import_raknet82.Serialize)(import_binarystream43.Int8)
|
|
6322
|
+
], ContainerClosePacket.prototype, "type", 2);
|
|
6319
6323
|
__decorateClass([
|
|
6320
6324
|
(0, import_raknet82.Serialize)(import_binarystream43.Bool)
|
|
6321
6325
|
], ContainerClosePacket.prototype, "serverInitiated", 2);
|
|
@@ -7423,6 +7427,9 @@ var StartGamePacket = class extends DataPacket {
|
|
|
7423
7427
|
experimentalGameplayOverride;
|
|
7424
7428
|
chatRestrictionLevel;
|
|
7425
7429
|
disablePlayerInteractions;
|
|
7430
|
+
serverIdentfier;
|
|
7431
|
+
worldIdentifier;
|
|
7432
|
+
scenarioIdentifier;
|
|
7426
7433
|
levelId;
|
|
7427
7434
|
worldName;
|
|
7428
7435
|
premiumWorldTemplateId;
|
|
@@ -7620,6 +7627,15 @@ __decorateClass([
|
|
|
7620
7627
|
__decorateClass([
|
|
7621
7628
|
(0, import_raknet127.Serialize)(import_binarystream83.Bool)
|
|
7622
7629
|
], StartGamePacket.prototype, "disablePlayerInteractions", 2);
|
|
7630
|
+
__decorateClass([
|
|
7631
|
+
(0, import_raknet127.Serialize)(import_binarystream83.VarString)
|
|
7632
|
+
], StartGamePacket.prototype, "serverIdentfier", 2);
|
|
7633
|
+
__decorateClass([
|
|
7634
|
+
(0, import_raknet127.Serialize)(import_binarystream83.VarString)
|
|
7635
|
+
], StartGamePacket.prototype, "worldIdentifier", 2);
|
|
7636
|
+
__decorateClass([
|
|
7637
|
+
(0, import_raknet127.Serialize)(import_binarystream83.VarString)
|
|
7638
|
+
], StartGamePacket.prototype, "scenarioIdentifier", 2);
|
|
7623
7639
|
__decorateClass([
|
|
7624
7640
|
(0, import_raknet127.Serialize)(import_binarystream83.VarString)
|
|
7625
7641
|
], StartGamePacket.prototype, "levelId", 2);
|
|
@@ -7701,6 +7717,7 @@ var TextPacket = class extends DataPacket {
|
|
|
7701
7717
|
parameters;
|
|
7702
7718
|
xuid;
|
|
7703
7719
|
platformChatId;
|
|
7720
|
+
filtered;
|
|
7704
7721
|
};
|
|
7705
7722
|
__decorateClass([
|
|
7706
7723
|
(0, import_raknet128.Serialize)(import_binarystream84.Uint8)
|
|
@@ -7723,6 +7740,9 @@ __decorateClass([
|
|
|
7723
7740
|
__decorateClass([
|
|
7724
7741
|
(0, import_raknet128.Serialize)(import_binarystream84.VarString)
|
|
7725
7742
|
], TextPacket.prototype, "platformChatId", 2);
|
|
7743
|
+
__decorateClass([
|
|
7744
|
+
(0, import_raknet128.Serialize)(import_binarystream84.VarString)
|
|
7745
|
+
], TextPacket.prototype, "filtered", 2);
|
|
7726
7746
|
TextPacket = __decorateClass([
|
|
7727
7747
|
(0, import_raknet128.Proto)(9 /* Text */)
|
|
7728
7748
|
], TextPacket);
|
|
@@ -8416,8 +8436,8 @@ function getPacketId(buffer) {
|
|
|
8416
8436
|
}
|
|
8417
8437
|
|
|
8418
8438
|
// src/constants/index.ts
|
|
8419
|
-
var PROTOCOL_VERSION =
|
|
8420
|
-
var MINECRAFT_VERSION = "1.
|
|
8439
|
+
var PROTOCOL_VERSION = 685;
|
|
8440
|
+
var MINECRAFT_VERSION = "1.21.0";
|
|
8421
8441
|
var MINECRAFT_TICK_SPEED = 50;
|
|
8422
8442
|
// Annotate the CommonJS export names for ESM import in node:
|
|
8423
8443
|
0 && (module.exports = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@serenityjs/protocol",
|
|
3
|
-
"version": "0.3.4
|
|
3
|
+
"version": "0.3.4",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"repository": "https://github.com/SerenityJS/serenity",
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
"preset": "@serenityjs/jest-presets/jest/node"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@serenityjs/eslint-config": "
|
|
22
|
-
"@serenityjs/jest-presets": "
|
|
23
|
-
"@serenityjs/typescript-config": "
|
|
21
|
+
"@serenityjs/eslint-config": "*",
|
|
22
|
+
"@serenityjs/jest-presets": "*",
|
|
23
|
+
"@serenityjs/typescript-config": "*",
|
|
24
24
|
"@types/jest": "^29.5.12",
|
|
25
25
|
"@types/node": "^20.11.24",
|
|
26
26
|
"jest": "^29.7.0",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@serenityjs/binarystream": "^2.5.2",
|
|
32
|
-
"@serenityjs/nbt": "
|
|
33
|
-
"@serenityjs/raknet": "
|
|
32
|
+
"@serenityjs/nbt": "*",
|
|
33
|
+
"@serenityjs/raknet": "*"
|
|
34
34
|
}
|
|
35
35
|
}
|