@serenityjs/protocol 0.4.1-beta-20240731201322 → 0.4.1-beta-20240801005028
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 +20 -1
- package/dist/index.js +56 -15
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -40,6 +40,7 @@ declare enum Packet {
|
|
|
40
40
|
PlayerHotbar = 48,// 48
|
|
41
41
|
InventoryContent = 49,// 49
|
|
42
42
|
InventorySlot = 50,// 50
|
|
43
|
+
ContainerSetData = 51,// 51
|
|
43
44
|
CraftingData = 52,// 52
|
|
44
45
|
BlockActorData = 56,// 56
|
|
45
46
|
LevelChunk = 58,// 58
|
|
@@ -2052,6 +2053,17 @@ declare enum UnlockingContext {
|
|
|
2052
2053
|
PlayerHasManyItems = 3
|
|
2053
2054
|
}
|
|
2054
2055
|
|
|
2056
|
+
declare enum ContainerDataType {
|
|
2057
|
+
FurnanceTickCount = 0,
|
|
2058
|
+
FurnaceLitTime = 1,
|
|
2059
|
+
FurnaceLitDuration = 2,
|
|
2060
|
+
FurnaceStoredXp = 3,
|
|
2061
|
+
FurnaceFuelAux = 4,
|
|
2062
|
+
BrewTime = 5,
|
|
2063
|
+
BrewFuelAmount = 6,
|
|
2064
|
+
BrewFuelTotal = 7
|
|
2065
|
+
}
|
|
2066
|
+
|
|
2055
2067
|
declare class LoginTokens extends DataType {
|
|
2056
2068
|
client: string;
|
|
2057
2069
|
identity: string;
|
|
@@ -4944,6 +4956,12 @@ declare class CraftingDataPacket extends DataPacket {
|
|
|
4944
4956
|
clearRecipes: boolean;
|
|
4945
4957
|
}
|
|
4946
4958
|
|
|
4959
|
+
declare class ContainerSetDataPacket extends DataPacket {
|
|
4960
|
+
containerId: ContainerId;
|
|
4961
|
+
type: ContainerDataType;
|
|
4962
|
+
value: number;
|
|
4963
|
+
}
|
|
4964
|
+
|
|
4947
4965
|
declare const Packets: {
|
|
4948
4966
|
1: typeof LoginPacket;
|
|
4949
4967
|
2: typeof PlayStatusPacket;
|
|
@@ -4981,6 +4999,7 @@ declare const Packets: {
|
|
|
4981
4999
|
48: typeof PlayerHotbarPacket;
|
|
4982
5000
|
49: typeof InventoryContentPacket;
|
|
4983
5001
|
50: typeof InventorySlotPacket;
|
|
5002
|
+
51: typeof ContainerSetDataPacket;
|
|
4984
5003
|
52: typeof CraftingDataPacket;
|
|
4985
5004
|
56: typeof BlockActorDataPacket;
|
|
4986
5005
|
58: typeof LevelChunkPacket;
|
|
@@ -5062,4 +5081,4 @@ declare const PROTOCOL_VERSION = 686;
|
|
|
5062
5081
|
declare const MINECRAFT_VERSION = "1.21.2";
|
|
5063
5082
|
declare const MINECRAFT_TICK_SPEED = 50;
|
|
5064
5083
|
|
|
5065
|
-
export { type AbilityFlag, AbilityLayerFlag, AbilityLayerType, AbilityLayers, AbilitySet, ActionIds, ActorDamageCause, ActorDataId, ActorDataType, ActorEventIds, ActorEventPacket, ActorFlag, AddEntityPacket, AddItemActorPacket, AddPlayerPacket, AnimateAction, AnimateEntity, AnimateEntityPacket, AnimateId, AnimatePacket, Attribute, AttributeModifier, AttributeName, AvailableCommandsPacket, AwardAchievementPacket, BehaviorPackInfo, BiomeDefinitionListPacket, BlockActorDataPacket, BlockCoordinates, BlockFace, BlockPickRequestPacket, BlockProperties, BookActions, BookEditAction, BookEditPacket, BossEventAdd, BossEventColor, BossEventPacket, BossEventUpdate, BossEventUpdateType, CameraAudioListener, CameraFadeDuration, CameraFadeInstruction, CameraInstructions, CameraInstructionsPacket, CameraPreset, CameraPresetsPacket, CameraSetEasing, CameraSetInstruction, CameraShakePacket, ChainedSubcommandValues, ChangeDimensionPacket, ChunkCoords, ChunkRadiusUpdatePacket, ClientboundCloseFormPacket, Color, CommandOriginData, CommandOutputData, CommandOutputMessage, CommandOutputPacket, CommandParameterType, CommandPermissionLevel, CommandRequestPacket, Commands, CompletedUsingItemPacket, ComplexInventoryTransaction, ComponentItem, CompressionMethod, ContainerClosePacket, ContainerId, ContainerMixDataEntry, ContainerName, ContainerOpenPacket, ContainerType, CraftingDataEntry, CraftingDataEntryType, CraftingDataPacket, CreativeContentPacket, CreativeItems, DataItem, DataPacket, DeathInfoPacket, DeathParameters, DeviceOS, Difficulty, DimensionType, DisconnectPacket, DisconnectReason, DisplaySlotType, DynamicEnums, EasingType, EffectType, EmoteFlags, EmoteListPacket, EmotePacket, Emotes, Enchantment, type EncodedAbilityFlags, EntityAttributes, EnumConstraints, EnumValues, Enums, EquipmentSlot, Experiments, Framer, GameRuleType, GameRules, Gamemode, HUDElement, HUDElementId, HUDVisibility, InteractActions, InteractPacket, InteractPosition, InternalType, InventoryAction, InventoryContentPacket, InventoryLayout, InventoryLeftTab, InventoryRightTab, InventorySlotPacket, InventorySource, InventorySourceType, InventoryTransaction, InventoryTransactionPacket, ItemComponentPacket, ItemData, ItemInstanceUserData, ItemReleaseInventoryTransaction, ItemReleaseInventoryTransactionType, type ItemStackAction, ItemStackActionType, type ItemStackContainer, ItemStackRequestPacket, ItemStackRequests, ItemStackResponsePacket, ItemStackResponses, ItemStackStatus, ItemStacks, ItemUseInventoryTransaction, ItemUseInventoryTransactionType, ItemUseMethod, ItemUseOnEntityInventoryTransaction, ItemUseOnEntityInventoryTransactionType, LegacyTransaction, LevelChunkPacket, LevelEvent, LevelEventPacket, LevelSoundEvent, LevelSoundEventPacket, Links, LoginPacket, LoginTokens, MINECRAFT_TICK_SPEED, MINECRAFT_VERSION, MaterialReducerDataEntry, MobEffectEvents, MobEffectPacket, MobEquipmentPacket, ModalFormCanceled, ModalFormCanceledReason, ModalFormData, ModalFormRequestPacket, ModalFormResponsePacket, ModalFormType, MoveActorAbsolutePacket, MoveMode, MovePlayerPacket, NetworkChunkPublisherUpdatePacket, NetworkItemInstanceDescriptor, NetworkItemStackDescriptor, NetworkSettingsPacket, NetworkStackLatencyPacket, NpcDialogueAction, NpcDialoguePacket, NpcRequestPacket, NpcRequestType, ObjectiveSortOrder, OpenSignPacket, Optional, PROTOCOL_VERSION, PackLinks, PackType, Packet, PacketViolationWarningPacket, Packets, PermissionLevel, PlayStatus, PlayStatusPacket, PlayerActionPacket, PlayerAuthInputData, PlayerAuthInputPacket, PlayerHotbarPacket, PlayerListAction, PlayerListPacket, PlayerListRecord, PlayerSkinPacket, PlayerStartItemCooldownPacket, PostFixes, PotionMixDataEntry, PropertySyncData, RecipeIngredient, RecipeUnlockingRequirement, RemoveEntityPacket, RemoveObjectivePacket, RequestChunkRadiusPacket, RequestNetworkSettingsPacket, ResourceIdVersions, ResourcePackChunkDataPacket, ResourcePackChunkRequestPacket, ResourcePackClientResponsePacket, ResourcePackDataInfoPacket, ResourcePackIds, ResourcePackResponse, ResourcePackStackPacket, ResourcePacksInfoPacket, RespawnPacket, RespawnState, Rotation, ScoreActionType, ScoreEntry, ScoreEntryType, ScoreboardIdentity, ScoreboardIdentityAction, ScriptMessagePacket, SerializedSkin, ServerToClientHandshakePacket, ServerboundLoadingScreenPacketPacket, ServerboundLoadingScreenType, SetActorDataPacket, SetActorMotionPacket, SetCommandsEnabledPacket, SetDisplayObjectivePacket, SetHudPacket, SetLocalPlayerAsInitializedPacket, SetPlayerGameTypePacket, SetPlayerInventoryOptionsPacket, SetScorePacket, SetScoreboardIdentityPacket, SetTimePacket, SetTitlePacket, ShakeAction, ShakeType, ShapedRecipe, ShapelessRecipe, SkinAnimation, SkinImage, SkinPersonaPiece, SkinPersonaTintPiece, StackRequestSlotInfo, StartGamePacket, Subcommands, TakeItemActorPacket, TeleportCause, TextPacket, TextPacketType, TextParameters, TextSource, TexturePackInfo, TitleTypes, ToastRequestPacket, TransactionSourceType, TransferPacket, UnlockingContext, UpdateAbilitiesPacket, UpdateAdventureSettingsPacket, UpdateAttributesPacket, UpdateBlockFlagsType, UpdateBlockLayerType, UpdateBlockPacket, VariableStringArray as VarStringArray, VarintArray, Vector2f, Vector3f, ViolationSeverity, ViolationType, getPacketId };
|
|
5084
|
+
export { type AbilityFlag, AbilityLayerFlag, AbilityLayerType, AbilityLayers, AbilitySet, ActionIds, ActorDamageCause, ActorDataId, ActorDataType, ActorEventIds, ActorEventPacket, ActorFlag, AddEntityPacket, AddItemActorPacket, AddPlayerPacket, AnimateAction, AnimateEntity, AnimateEntityPacket, AnimateId, AnimatePacket, Attribute, AttributeModifier, AttributeName, AvailableCommandsPacket, AwardAchievementPacket, BehaviorPackInfo, BiomeDefinitionListPacket, BlockActorDataPacket, BlockCoordinates, BlockFace, BlockPickRequestPacket, BlockProperties, BookActions, BookEditAction, BookEditPacket, BossEventAdd, BossEventColor, BossEventPacket, BossEventUpdate, BossEventUpdateType, CameraAudioListener, CameraFadeDuration, CameraFadeInstruction, CameraInstructions, CameraInstructionsPacket, CameraPreset, CameraPresetsPacket, CameraSetEasing, CameraSetInstruction, CameraShakePacket, ChainedSubcommandValues, ChangeDimensionPacket, ChunkCoords, ChunkRadiusUpdatePacket, ClientboundCloseFormPacket, Color, CommandOriginData, CommandOutputData, CommandOutputMessage, CommandOutputPacket, CommandParameterType, CommandPermissionLevel, CommandRequestPacket, Commands, CompletedUsingItemPacket, ComplexInventoryTransaction, ComponentItem, CompressionMethod, ContainerClosePacket, ContainerDataType, ContainerId, ContainerMixDataEntry, ContainerName, ContainerOpenPacket, ContainerSetDataPacket, ContainerType, CraftingDataEntry, CraftingDataEntryType, CraftingDataPacket, CreativeContentPacket, CreativeItems, DataItem, DataPacket, DeathInfoPacket, DeathParameters, DeviceOS, Difficulty, DimensionType, DisconnectPacket, DisconnectReason, DisplaySlotType, DynamicEnums, EasingType, EffectType, EmoteFlags, EmoteListPacket, EmotePacket, Emotes, Enchantment, type EncodedAbilityFlags, EntityAttributes, EnumConstraints, EnumValues, Enums, EquipmentSlot, Experiments, Framer, GameRuleType, GameRules, Gamemode, HUDElement, HUDElementId, HUDVisibility, InteractActions, InteractPacket, InteractPosition, InternalType, InventoryAction, InventoryContentPacket, InventoryLayout, InventoryLeftTab, InventoryRightTab, InventorySlotPacket, InventorySource, InventorySourceType, InventoryTransaction, InventoryTransactionPacket, ItemComponentPacket, ItemData, ItemInstanceUserData, ItemReleaseInventoryTransaction, ItemReleaseInventoryTransactionType, type ItemStackAction, ItemStackActionType, type ItemStackContainer, ItemStackRequestPacket, ItemStackRequests, ItemStackResponsePacket, ItemStackResponses, ItemStackStatus, ItemStacks, ItemUseInventoryTransaction, ItemUseInventoryTransactionType, ItemUseMethod, ItemUseOnEntityInventoryTransaction, ItemUseOnEntityInventoryTransactionType, LegacyTransaction, LevelChunkPacket, LevelEvent, LevelEventPacket, LevelSoundEvent, LevelSoundEventPacket, Links, LoginPacket, LoginTokens, MINECRAFT_TICK_SPEED, MINECRAFT_VERSION, MaterialReducerDataEntry, MobEffectEvents, MobEffectPacket, MobEquipmentPacket, ModalFormCanceled, ModalFormCanceledReason, ModalFormData, ModalFormRequestPacket, ModalFormResponsePacket, ModalFormType, MoveActorAbsolutePacket, MoveMode, MovePlayerPacket, NetworkChunkPublisherUpdatePacket, NetworkItemInstanceDescriptor, NetworkItemStackDescriptor, NetworkSettingsPacket, NetworkStackLatencyPacket, NpcDialogueAction, NpcDialoguePacket, NpcRequestPacket, NpcRequestType, ObjectiveSortOrder, OpenSignPacket, Optional, PROTOCOL_VERSION, PackLinks, PackType, Packet, PacketViolationWarningPacket, Packets, PermissionLevel, PlayStatus, PlayStatusPacket, PlayerActionPacket, PlayerAuthInputData, PlayerAuthInputPacket, PlayerHotbarPacket, PlayerListAction, PlayerListPacket, PlayerListRecord, PlayerSkinPacket, PlayerStartItemCooldownPacket, PostFixes, PotionMixDataEntry, PropertySyncData, RecipeIngredient, RecipeUnlockingRequirement, RemoveEntityPacket, RemoveObjectivePacket, RequestChunkRadiusPacket, RequestNetworkSettingsPacket, ResourceIdVersions, ResourcePackChunkDataPacket, ResourcePackChunkRequestPacket, ResourcePackClientResponsePacket, ResourcePackDataInfoPacket, ResourcePackIds, ResourcePackResponse, ResourcePackStackPacket, ResourcePacksInfoPacket, RespawnPacket, RespawnState, Rotation, ScoreActionType, ScoreEntry, ScoreEntryType, ScoreboardIdentity, ScoreboardIdentityAction, ScriptMessagePacket, SerializedSkin, ServerToClientHandshakePacket, ServerboundLoadingScreenPacketPacket, ServerboundLoadingScreenType, SetActorDataPacket, SetActorMotionPacket, SetCommandsEnabledPacket, SetDisplayObjectivePacket, SetHudPacket, SetLocalPlayerAsInitializedPacket, SetPlayerGameTypePacket, SetPlayerInventoryOptionsPacket, SetScorePacket, SetScoreboardIdentityPacket, SetTimePacket, SetTitlePacket, ShakeAction, ShakeType, ShapedRecipe, ShapelessRecipe, SkinAnimation, SkinImage, SkinPersonaPiece, SkinPersonaTintPiece, StackRequestSlotInfo, StartGamePacket, Subcommands, TakeItemActorPacket, TeleportCause, TextPacket, TextPacketType, TextParameters, TextSource, TexturePackInfo, TitleTypes, ToastRequestPacket, TransactionSourceType, TransferPacket, UnlockingContext, UpdateAbilitiesPacket, UpdateAdventureSettingsPacket, UpdateAttributesPacket, UpdateBlockFlagsType, UpdateBlockLayerType, UpdateBlockPacket, VariableStringArray as VarStringArray, VarintArray, Vector2f, Vector3f, ViolationSeverity, ViolationType, getPacketId };
|
package/dist/index.js
CHANGED
|
@@ -96,10 +96,12 @@ __export(src_exports, {
|
|
|
96
96
|
ComponentItem: () => ComponentItem,
|
|
97
97
|
CompressionMethod: () => CompressionMethod,
|
|
98
98
|
ContainerClosePacket: () => ContainerClosePacket,
|
|
99
|
+
ContainerDataType: () => ContainerDataType,
|
|
99
100
|
ContainerId: () => ContainerId,
|
|
100
101
|
ContainerMixDataEntry: () => ContainerMixDataEntry,
|
|
101
102
|
ContainerName: () => ContainerName,
|
|
102
103
|
ContainerOpenPacket: () => ContainerOpenPacket,
|
|
104
|
+
ContainerSetDataPacket: () => ContainerSetDataPacket,
|
|
103
105
|
ContainerType: () => ContainerType,
|
|
104
106
|
CraftingDataEntry: () => CraftingDataEntry,
|
|
105
107
|
CraftingDataEntryType: () => CraftingDataEntryType,
|
|
@@ -342,6 +344,7 @@ var Packet = /* @__PURE__ */ ((Packet2) => {
|
|
|
342
344
|
Packet2[Packet2["PlayerHotbar"] = 48] = "PlayerHotbar";
|
|
343
345
|
Packet2[Packet2["InventoryContent"] = 49] = "InventoryContent";
|
|
344
346
|
Packet2[Packet2["InventorySlot"] = 50] = "InventorySlot";
|
|
347
|
+
Packet2[Packet2["ContainerSetData"] = 51] = "ContainerSetData";
|
|
345
348
|
Packet2[Packet2["CraftingData"] = 52] = "CraftingData";
|
|
346
349
|
Packet2[Packet2["BlockActorData"] = 56] = "BlockActorData";
|
|
347
350
|
Packet2[Packet2["LevelChunk"] = 58] = "LevelChunk";
|
|
@@ -714,16 +717,16 @@ var InteractActions = /* @__PURE__ */ ((InteractActions3) => {
|
|
|
714
717
|
})(InteractActions || {});
|
|
715
718
|
|
|
716
719
|
// src/enums/container-id.ts
|
|
717
|
-
var ContainerId = /* @__PURE__ */ ((
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
return
|
|
720
|
+
var ContainerId = /* @__PURE__ */ ((ContainerId8) => {
|
|
721
|
+
ContainerId8[ContainerId8["None"] = -1] = "None";
|
|
722
|
+
ContainerId8[ContainerId8["Inventory"] = 0] = "Inventory";
|
|
723
|
+
ContainerId8[ContainerId8["First"] = 1] = "First";
|
|
724
|
+
ContainerId8[ContainerId8["Last"] = 100] = "Last";
|
|
725
|
+
ContainerId8[ContainerId8["Offhand"] = 119] = "Offhand";
|
|
726
|
+
ContainerId8[ContainerId8["Armor"] = 120] = "Armor";
|
|
727
|
+
ContainerId8[ContainerId8["SelectionSlots"] = 122] = "SelectionSlots";
|
|
728
|
+
ContainerId8[ContainerId8["Ui"] = 124] = "Ui";
|
|
729
|
+
return ContainerId8;
|
|
727
730
|
})(ContainerId || {});
|
|
728
731
|
|
|
729
732
|
// src/enums/container-name.ts
|
|
@@ -2511,6 +2514,19 @@ var UnlockingContext = /* @__PURE__ */ ((UnlockingContext2) => {
|
|
|
2511
2514
|
return UnlockingContext2;
|
|
2512
2515
|
})(UnlockingContext || {});
|
|
2513
2516
|
|
|
2517
|
+
// src/enums/container-data-type.ts
|
|
2518
|
+
var ContainerDataType = /* @__PURE__ */ ((ContainerDataType3) => {
|
|
2519
|
+
ContainerDataType3[ContainerDataType3["FurnanceTickCount"] = 0] = "FurnanceTickCount";
|
|
2520
|
+
ContainerDataType3[ContainerDataType3["FurnaceLitTime"] = 1] = "FurnaceLitTime";
|
|
2521
|
+
ContainerDataType3[ContainerDataType3["FurnaceLitDuration"] = 2] = "FurnaceLitDuration";
|
|
2522
|
+
ContainerDataType3[ContainerDataType3["FurnaceStoredXp"] = 3] = "FurnaceStoredXp";
|
|
2523
|
+
ContainerDataType3[ContainerDataType3["FurnaceFuelAux"] = 4] = "FurnaceFuelAux";
|
|
2524
|
+
ContainerDataType3[ContainerDataType3["BrewTime"] = 5] = "BrewTime";
|
|
2525
|
+
ContainerDataType3[ContainerDataType3["BrewFuelAmount"] = 6] = "BrewFuelAmount";
|
|
2526
|
+
ContainerDataType3[ContainerDataType3["BrewFuelTotal"] = 7] = "BrewFuelTotal";
|
|
2527
|
+
return ContainerDataType3;
|
|
2528
|
+
})(ContainerDataType || {});
|
|
2529
|
+
|
|
2514
2530
|
// src/proto/data/add-entity.ts
|
|
2515
2531
|
var import_binarystream42 = require("@serenityjs/binarystream");
|
|
2516
2532
|
var import_raknet95 = require("@serenityjs/raknet");
|
|
@@ -10546,6 +10562,27 @@ CraftingDataPacket = __decorateClass([
|
|
|
10546
10562
|
(0, import_raknet190.Proto)(52 /* CraftingData */)
|
|
10547
10563
|
], CraftingDataPacket);
|
|
10548
10564
|
|
|
10565
|
+
// src/proto/data/container-set-data.ts
|
|
10566
|
+
var import_raknet191 = require("@serenityjs/raknet");
|
|
10567
|
+
var import_binarystream127 = require("@serenityjs/binarystream");
|
|
10568
|
+
var ContainerSetDataPacket = class extends DataPacket {
|
|
10569
|
+
containerId;
|
|
10570
|
+
type;
|
|
10571
|
+
value;
|
|
10572
|
+
};
|
|
10573
|
+
__decorateClass([
|
|
10574
|
+
(0, import_raknet191.Serialize)(import_binarystream127.Uint8)
|
|
10575
|
+
], ContainerSetDataPacket.prototype, "containerId", 2);
|
|
10576
|
+
__decorateClass([
|
|
10577
|
+
(0, import_raknet191.Serialize)(import_binarystream127.ZigZag)
|
|
10578
|
+
], ContainerSetDataPacket.prototype, "type", 2);
|
|
10579
|
+
__decorateClass([
|
|
10580
|
+
(0, import_raknet191.Serialize)(import_binarystream127.ZigZag)
|
|
10581
|
+
], ContainerSetDataPacket.prototype, "value", 2);
|
|
10582
|
+
ContainerSetDataPacket = __decorateClass([
|
|
10583
|
+
(0, import_raknet191.Proto)(51 /* ContainerSetData */)
|
|
10584
|
+
], ContainerSetDataPacket);
|
|
10585
|
+
|
|
10549
10586
|
// src/proto/data/packets.ts
|
|
10550
10587
|
var Packets = {
|
|
10551
10588
|
[1 /* Login */]: LoginPacket,
|
|
@@ -10619,6 +10656,8 @@ var Packets = {
|
|
|
10619
10656
|
// 49
|
|
10620
10657
|
[50 /* InventorySlot */]: InventorySlotPacket,
|
|
10621
10658
|
// 50
|
|
10659
|
+
[51 /* ContainerSetData */]: ContainerSetDataPacket,
|
|
10660
|
+
// 51
|
|
10622
10661
|
[52 /* CraftingData */]: CraftingDataPacket,
|
|
10623
10662
|
// 52
|
|
10624
10663
|
[56 /* BlockActorData */]: BlockActorDataPacket,
|
|
@@ -10754,10 +10793,10 @@ function VarintArray(type) {
|
|
|
10754
10793
|
}
|
|
10755
10794
|
|
|
10756
10795
|
// src/proto/framer.ts
|
|
10757
|
-
var
|
|
10796
|
+
var import_binarystream128 = require("@serenityjs/binarystream");
|
|
10758
10797
|
var Framer = class {
|
|
10759
10798
|
static unframe(buffer) {
|
|
10760
|
-
const stream = new
|
|
10799
|
+
const stream = new import_binarystream128.BinaryStream(buffer);
|
|
10761
10800
|
const frames = [];
|
|
10762
10801
|
do {
|
|
10763
10802
|
const length = stream.readVarInt();
|
|
@@ -10767,7 +10806,7 @@ var Framer = class {
|
|
|
10767
10806
|
return frames;
|
|
10768
10807
|
}
|
|
10769
10808
|
static frame(...buffers) {
|
|
10770
|
-
const stream = new
|
|
10809
|
+
const stream = new import_binarystream128.BinaryStream();
|
|
10771
10810
|
for (const buffer of buffers) {
|
|
10772
10811
|
stream.writeVarInt(buffer.length);
|
|
10773
10812
|
stream.writeBuffer(buffer);
|
|
@@ -10777,9 +10816,9 @@ var Framer = class {
|
|
|
10777
10816
|
};
|
|
10778
10817
|
|
|
10779
10818
|
// src/proto/packet-id.ts
|
|
10780
|
-
var
|
|
10819
|
+
var import_binarystream129 = require("@serenityjs/binarystream");
|
|
10781
10820
|
function getPacketId(buffer) {
|
|
10782
|
-
const stream =
|
|
10821
|
+
const stream = import_binarystream129.BinaryStream.fromBuffer(buffer);
|
|
10783
10822
|
return stream.readVarInt();
|
|
10784
10823
|
}
|
|
10785
10824
|
|
|
@@ -10857,10 +10896,12 @@ var MINECRAFT_TICK_SPEED = 50;
|
|
|
10857
10896
|
ComponentItem,
|
|
10858
10897
|
CompressionMethod,
|
|
10859
10898
|
ContainerClosePacket,
|
|
10899
|
+
ContainerDataType,
|
|
10860
10900
|
ContainerId,
|
|
10861
10901
|
ContainerMixDataEntry,
|
|
10862
10902
|
ContainerName,
|
|
10863
10903
|
ContainerOpenPacket,
|
|
10904
|
+
ContainerSetDataPacket,
|
|
10864
10905
|
ContainerType,
|
|
10865
10906
|
CraftingDataEntry,
|
|
10866
10907
|
CraftingDataEntryType,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@serenityjs/protocol",
|
|
3
|
-
"version": "0.4.1-beta-
|
|
3
|
+
"version": "0.4.1-beta-20240801005028",
|
|
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": "0.4.1-beta-
|
|
22
|
-
"@serenityjs/jest-presets": "0.4.1-beta-
|
|
23
|
-
"@serenityjs/typescript-config": "0.4.1-beta-
|
|
21
|
+
"@serenityjs/eslint-config": "0.4.1-beta-20240801005028",
|
|
22
|
+
"@serenityjs/jest-presets": "0.4.1-beta-20240801005028",
|
|
23
|
+
"@serenityjs/typescript-config": "0.4.1-beta-20240801005028",
|
|
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.6.6",
|
|
32
|
-
"@serenityjs/nbt": "0.4.1-beta-
|
|
33
|
-
"@serenityjs/raknet": "0.4.1-beta-
|
|
32
|
+
"@serenityjs/nbt": "0.4.1-beta-20240801005028",
|
|
33
|
+
"@serenityjs/raknet": "0.4.1-beta-20240801005028"
|
|
34
34
|
}
|
|
35
35
|
}
|