@serenityjs/protocol 1.0.0

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.
@@ -0,0 +1,2802 @@
1
+ import { DataType, BasePacket } from '@serenityjs/raknet';
2
+ import { BinaryStream, Endianness, VarInt } from '@serenityjs/binarystream';
3
+ import { CompoundTag, StringTag } from '@serenityjs/nbt';
4
+ import { Buffer as Buffer$1 } from 'node:buffer';
5
+
6
+ declare enum Packet {
7
+ Login = 1,// 1
8
+ PlayStatus = 2,// 2
9
+ Disconnect = 5,// 5
10
+ ResourcePacksInfo = 6,// 6
11
+ ResourcePackStack = 7,// 7
12
+ ResourcePackClientResponse = 8,// 8
13
+ Text = 9,// 9
14
+ StartGame = 11,// 11
15
+ AddPlayer = 12,// 12
16
+ AddEntity = 13,// 13 // TODO: Rename this to AddActor
17
+ RemoveEntity = 14,// 14 // TODO: Rename this to RemoveActor
18
+ AddItemActor = 15,// 15
19
+ MoveActorAbsolute = 18,// 18
20
+ MovePlayer = 19,// 19
21
+ UpdateBlock = 21,// 21
22
+ LevelEvent = 25,// 25
23
+ UpdateAttributes = 29,// 29
24
+ InventoryTransaction = 30,// 30
25
+ MobEquipment = 31,// 31
26
+ Interact = 33,// 33
27
+ BlockPickRequest = 34,// 34
28
+ PlayerAction = 36,// 36
29
+ SetEntityData = 39,// 39
30
+ SetActorMotion = 40,// 40
31
+ Animate = 44,// 44
32
+ Respawn = 45,// 45
33
+ ContainerOpen = 46,// 46
34
+ ContainerClose = 47,// 47
35
+ PlayerHotbar = 48,// 48
36
+ InventoryContent = 49,// 49
37
+ InventorySlot = 50,// 50
38
+ LevelChunk = 58,// 58
39
+ SetCommandsEnabled = 59,// 59
40
+ ChangeDimension = 61,// 61
41
+ SetPlayerGameType = 62,// 62
42
+ PlayerList = 63,// 63
43
+ RequestChunkRadius = 69,// 69
44
+ ChunkRadiusUpdate = 70,// 70
45
+ AvailableCommands = 76,
46
+ CommandRequest = 77,// 77
47
+ CommandOutput = 79,// 79
48
+ SetTitle = 88,// 88
49
+ ModalFormRequest = 100,// 100
50
+ ModalFormResponse = 101,// 101
51
+ SetLocalPlayerAsInitialized = 113,// 113
52
+ NetworkChunkPublisherUpdate = 121,// 121
53
+ BiomeDefinitionList = 122,// 122
54
+ LevelSoundEvent = 123,// 123
55
+ NetworkSettings = 143,// 143
56
+ PlayerAuthInput = 144,// 144
57
+ CreativeContent = 145,// 145
58
+ ItemStackRequest = 147,// 147
59
+ ItemStackResponse = 148,// 148
60
+ PacketViolationWarning = 156,// 156
61
+ ItemComponent = 162,// 162
62
+ ScriptMessage = 177,// 177
63
+ ToastRequest = 186,// 186
64
+ UpdateAbilities = 187,// 187
65
+ UpdateAdventureSettings = 188,// 188
66
+ RequestNetworkSettings = 193
67
+ }
68
+
69
+ declare enum DisconnectReason {
70
+ Unknown = 0,
71
+ CantConnectNoInternet = 1,
72
+ NoPermissions = 2,
73
+ UnrecoverableError = 3,
74
+ ThirdPartyBlocked = 4,
75
+ ThirdPartyNoInternet = 5,
76
+ ThirdPartyBadIp = 6,
77
+ ThirdPartyNoServerOrServerLocked = 7,
78
+ VersionMismatch = 8,
79
+ SkinIssue = 9,
80
+ InviteSessionNotFound = 10,
81
+ EduLevelSettingsMissing = 11,
82
+ LocalServerNotFound = 12,
83
+ LegacyDisconnect = 13,
84
+ UserLeaveGameAttempted = 14,
85
+ PlatformLockedSkinsError = 15,
86
+ RealmsWorldUnassigned = 16,
87
+ RealmsServerCantConnect = 17,
88
+ RealmsServerHidden = 18,
89
+ RealmsServerDisabledBeta = 19,
90
+ RealmsServerDisabled = 20,
91
+ CrossPlatformDisallowed = 21,
92
+ CantConnect = 22,
93
+ SessionNotFound = 23,
94
+ ClientSettingsIncompatibleWithServer = 24,
95
+ ServerFull = 25,
96
+ InvalidPlatformSkin = 26,
97
+ EditionVersionMismatch = 27,
98
+ EditionMismatch = 28,
99
+ LevelNewerThanExeVersion = 29,
100
+ NoFailOccurred = 30,
101
+ BannedSkin = 31,
102
+ Timeout = 32,
103
+ ServerNotFound = 33,
104
+ OutdatedServer = 34,
105
+ OutdatedClient = 35,
106
+ NoPremiumPlatform = 36,
107
+ MultiplayerDisabled = 37,
108
+ NoWifi = 38,
109
+ WorldCorruption = 39,
110
+ NoReason = 40,
111
+ Disconnected = 41,
112
+ InvalidPlayer = 42,
113
+ LoggedInOtherLocation = 43,
114
+ ServerIdConflict = 44,
115
+ NotAllowed = 45,
116
+ NotAuthenticated = 46,
117
+ InvalidTenant = 47,
118
+ UnknownPacket = 48,
119
+ UnexpectedPacket = 49,
120
+ InvalidCommandRequestPacket = 50,
121
+ HostSuspended = 51,
122
+ LoginPacketNoRequest = 52,
123
+ LoginPacketNoCert = 53,
124
+ MissingClient = 54,
125
+ Kicked = 55,
126
+ KickedForExploit = 56,
127
+ KickedForIdle = 57,
128
+ ResourcePackProblem = 58,
129
+ IncompatiblePack = 59,
130
+ OutOfStorage = 60,
131
+ InvalidLevel = 61,
132
+ DisconnectPacketDeprecated = 62,
133
+ BlockMismatch = 63,
134
+ InvalidHeights = 64,
135
+ InvalidWidths = 65,
136
+ ConnectionLost = 66,
137
+ ZombieConnection = 67,
138
+ Shutdown = 68,
139
+ ReasonNotSet = 69,
140
+ LoadingStateTimeout = 70,
141
+ ResourcePackLoadingFailed = 71,
142
+ SearchingForSessionLoadingScreenFailed = 72,
143
+ ConnProtocolVersion = 73,
144
+ SubsystemStatusError = 74,
145
+ EmptyAuthFromDiscovery = 75,
146
+ EmptyUrlFromDiscovery = 76,
147
+ ExpiredAuthFromDiscovery = 77,
148
+ UnknownSignalServiceSignInFailure = 78,
149
+ XblJoinLobbyFailure = 79,
150
+ UnspecifiedClientInstanceDisconnection = 80,
151
+ ConnSessionNotFound = 81,
152
+ ConnCreatePeerConnection = 82,
153
+ ConnIce = 83,
154
+ ConnConnectRequest = 84,
155
+ ConnConnectResponse = 85,
156
+ ConnNegotiationTimeout = 86,
157
+ ConnInactivityTimeout = 87,
158
+ StaleConnectionBeingReplaced = 88,
159
+ RealmsSessionNotFound = 89,
160
+ BadPacket = 90
161
+ }
162
+
163
+ declare enum CompressionMethod {
164
+ Zlib = 0,
165
+ Snappy = 1,
166
+ NotPresent = 2,
167
+ None = 255
168
+ }
169
+
170
+ declare enum PlayStatus {
171
+ LoginSuccess = 0,
172
+ FailedClient = 1,
173
+ FailedServer = 2,
174
+ PlayerSpawn = 3,
175
+ FailedInvalidTenant = 4,
176
+ FailedVanillaEdu = 5,
177
+ FailedIncompatible = 6,
178
+ FailedServerFull = 7,
179
+ FailedEditorVanillaMismatch = 8,
180
+ FailedVanillaEditorMismatch = 9
181
+ }
182
+
183
+ declare enum ResourcePackResponse {
184
+ None = 0,
185
+ Refused = 1,
186
+ SendPacks = 2,
187
+ HaveAllPacks = 3,
188
+ Completed = 4
189
+ }
190
+
191
+ declare enum Gamemode {
192
+ Survival = 0,
193
+ Creative = 1,
194
+ Adventure = 2,
195
+ SurvivalSpectator = 3,
196
+ CreativeSpectator = 4,
197
+ Fallback = 5,
198
+ Spectator = 6
199
+ }
200
+
201
+ declare enum Difficulty {
202
+ Peaceful = 0,
203
+ Easy = 1,
204
+ Normal = 2,
205
+ Hard = 3
206
+ }
207
+
208
+ declare enum GameRuleType {
209
+ Bool = 1,
210
+ Int = 2,
211
+ Float = 3
212
+ }
213
+
214
+ declare enum PermissionLevel {
215
+ Visitor = 0,
216
+ Member = 1,
217
+ Operator = 2,
218
+ Custom = 3
219
+ }
220
+
221
+ declare enum MoveMode {
222
+ Normal = 0,
223
+ Reset = 1,
224
+ Teleport = 2,
225
+ Rotation = 3
226
+ }
227
+
228
+ declare enum RecordAction {
229
+ Add = 0,
230
+ Remove = 1
231
+ }
232
+
233
+ declare enum ViolationType {
234
+ Malformed = 0
235
+ }
236
+
237
+ declare enum ViolationSeverity {
238
+ Warning = 0,
239
+ FanalWarning = 1,
240
+ Terminating = 2
241
+ }
242
+
243
+ declare enum CommandPermissionLevel {
244
+ Normal = 0,
245
+ Operator = 1,
246
+ Automation = 2,
247
+ Host = 3,
248
+ Owner = 4,
249
+ Internal = 5
250
+ }
251
+
252
+ declare enum CommandParameterType {
253
+ Int = 1,
254
+ Float = 3,
255
+ Value = 4,
256
+ WildcardInt = 5,
257
+ Operator = 6,
258
+ CompareOperator = 7,
259
+ Target = 8,
260
+ WildcardTarget = 10,
261
+ Filepath = 17,
262
+ FullIntegerRange = 23,
263
+ EquipmentSlot = 47,
264
+ String = 48,
265
+ IntPosition = 64,
266
+ FloatPosition = 65,
267
+ Message = 67,
268
+ RawText = 70,
269
+ Json = 74,
270
+ BlockState = 84,
271
+ Command = 87
272
+ }
273
+
274
+ declare enum AbilityLayerType {
275
+ Cache = 0,
276
+ Base = 1,
277
+ Spectator = 2,
278
+ Commands = 3,
279
+ Editor = 4
280
+ }
281
+
282
+ declare enum AbilityLayerFlag {
283
+ Build = 0,
284
+ Mine = 1,
285
+ DoorsAndSwitches = 2,
286
+ OpenContainers = 3,
287
+ AttackPlayers = 4,
288
+ AttackMobs = 5,
289
+ OperatorCommands = 6,
290
+ Teleport = 7,
291
+ Invulnerable = 8,
292
+ Flying = 9,
293
+ MayFly = 10,
294
+ InstantBuild = 11,
295
+ Lightning = 12,
296
+ FlySpeed = 13,
297
+ WalkSpeed = 14,
298
+ Muted = 15,
299
+ WorldBuilder = 16,
300
+ NoClip = 17,
301
+ PrivilegedBuilder = 18,
302
+ Count = 19
303
+ }
304
+
305
+ declare enum TextPacketType {
306
+ Raw = 0,
307
+ Chat = 1,
308
+ Translation = 2,
309
+ Popup = 3,
310
+ JukeboxPopup = 4,
311
+ Tip = 5,
312
+ System = 6,
313
+ Whisper = 7,
314
+ Announcement = 8,
315
+ JsonWhisper = 9,
316
+ Json = 10,
317
+ JsonAnnouncement = 11
318
+ }
319
+
320
+ declare enum TitleTypes {
321
+ Clear = 0,
322
+ Reset = 1,
323
+ SetTitle = 2,
324
+ SetSubtitle = 3,
325
+ ActionBarMessage = 4,
326
+ SetDurations = 5,
327
+ SetTitleJson = 6,
328
+ SetSubtitleJson = 7,
329
+ ActionBarMessageJson = 8
330
+ }
331
+
332
+ declare enum InteractActions {
333
+ LeaveVehicle = 3,
334
+ MouseOverEntity = 4,
335
+ NpcOpen = 5,
336
+ OpenInventory = 6
337
+ }
338
+
339
+ declare enum ContainerId {
340
+ None = -1,
341
+ Inventory = 0,
342
+ First = 1,
343
+ Last = 100,
344
+ Offhand = 119,
345
+ Armor = 120,
346
+ SelectionSlots = 122,
347
+ Ui = 124
348
+ }
349
+
350
+ declare enum ContainerName {
351
+ AnvilInput = 0,
352
+ AnvilMaterial = 1,
353
+ AnvilResult = 2,
354
+ SmithingTableInput = 3,
355
+ SmithingTableMaterial = 4,
356
+ SmithingTableResult = 5,
357
+ Armor = 6,
358
+ Container = 7,
359
+ BeaconPayment = 8,
360
+ BrewingInput = 9,
361
+ BrewingResult = 10,
362
+ BrewingFuel = 11,
363
+ HotbarAndInventory = 12,
364
+ CraftingInput = 13,
365
+ CraftingOutput = 14,
366
+ RecipeConstruction = 15,
367
+ RecipeNature = 16,
368
+ RecipeItems = 17,
369
+ RecipeSearch = 18,
370
+ RecipeSearchBar = 19,
371
+ RecipeEquipment = 20,
372
+ RecipeBook = 21,
373
+ EnchantingInput = 22,
374
+ EnchantingLapis = 23,
375
+ FurnaceFuel = 24,
376
+ FurnaceIngredient = 25,
377
+ FurnaceOutput = 26,
378
+ HorseEquip = 27,
379
+ Hotbar = 28,
380
+ Inventory = 29,
381
+ Shulker = 30,
382
+ TradeIngredient1 = 31,
383
+ TradeIngredient2 = 32,
384
+ TradeResult = 33,
385
+ Offhand = 34,
386
+ CompCreateInput = 35,
387
+ CompCreateOutput = 36,
388
+ ElementConstructOutput = 37,
389
+ MatReduceInput = 38,
390
+ MatReduceOutput = 39,
391
+ LabTableInput = 40,
392
+ LoomInput = 41,
393
+ LoomDye = 42,
394
+ LoomMaterial = 43,
395
+ LoomResult = 44,
396
+ BlastFurnaceIngredient = 45,
397
+ SmokerIngredient = 46,
398
+ Trade2Ingredient1 = 47,
399
+ Trade2Ingredient2 = 48,
400
+ Trade2Result = 49,
401
+ GrindstoneInput = 50,
402
+ GrindstoneAdditional = 51,
403
+ GrindstoneResult = 52,
404
+ StonecutterInput = 53,
405
+ StonecutterResult = 54,
406
+ CartographyInput = 55,
407
+ CartographyAdditional = 56,
408
+ CartographyResult = 57,
409
+ Barrel = 58,
410
+ Cursor = 59,
411
+ CreativeOutput = 60,
412
+ SmithingTableTemplate = 61,
413
+ Crafter = 62
414
+ }
415
+
416
+ declare enum ContainerType {
417
+ None = -9,
418
+ Inventory = -1,
419
+ Container = 0,
420
+ Workbench = 1,
421
+ Furnace = 2,
422
+ Enchantment = 3,
423
+ BrewingStand = 4,
424
+ Anvil = 5,
425
+ Dispenser = 6,
426
+ Dropper = 7,
427
+ Hopper = 8,
428
+ Cauldron = 9,
429
+ MinecartChest = 10,
430
+ MinecartHopper = 11,
431
+ Horse = 12,
432
+ Beacon = 13,
433
+ StructureEditor = 14,
434
+ Trading = 15,
435
+ CommandBlock = 16,
436
+ Jukebox = 17,
437
+ Armor = 18,
438
+ Hand = 19,
439
+ CompoundCreator = 20,
440
+ ElementConstructor = 21,
441
+ MaterialReducer = 22,
442
+ LabTable = 23,
443
+ Loom = 24,
444
+ Lectern = 25,
445
+ Grindstone = 26,
446
+ BlastFurnace = 27,
447
+ Smoker = 28,
448
+ Stonecutter = 29,
449
+ Cartography = 30,
450
+ Hud = 31,
451
+ JigsawEditor = 32,
452
+ SmithingTable = 33,
453
+ ChestBoat = 34,
454
+ DecoratedPot = 35,
455
+ Crafter = 36
456
+ }
457
+
458
+ declare enum ActionIds {
459
+ StartBreak = 0,
460
+ AbortBreak = 1,
461
+ StopBreak = 2,
462
+ GetUpdatedBlock = 3,
463
+ DropItem = 4,
464
+ StartSleeping = 5,
465
+ StopSleeping = 6,
466
+ Respawn = 7,
467
+ Jump = 8,
468
+ StartSprint = 9,
469
+ StopSprint = 10,
470
+ StartSneak = 11,
471
+ StopSneak = 12,
472
+ CreativePlayerDestroyBlock = 13,
473
+ DimensionChangeAck = 14,
474
+ StartGlide = 15,
475
+ StopGlide = 16,
476
+ BuildDenied = 17,
477
+ CrackBreak = 18,
478
+ ChangeSkin = 19,
479
+ SetEnchantmentSeed = 20,
480
+ Swimming = 21,
481
+ StopSwimming = 22,
482
+ StartSpinAttack = 23,
483
+ StopSpinAttack = 24,
484
+ InteractBlock = 25,
485
+ PredictBreak = 26,
486
+ ContinueBreak = 27,
487
+ StartItemUseOn = 28,
488
+ StopItemUseOn = 29,
489
+ HandledTeleport = 30,
490
+ MissedSwing = 31,
491
+ StartCrawling = 32,
492
+ StopCrawling = 33,
493
+ StartFlying = 34,
494
+ StopFlying = 35,
495
+ ReceivedServerData = 36
496
+ }
497
+
498
+ declare enum Attribute {
499
+ Absorption = "minecraft:absorption",
500
+ AttackDamage = "minecraft:attack_damage",
501
+ FallDamage = "minecraft:fall_damage",
502
+ FollowRange = "minecraft:follow_range",
503
+ Health = "minecraft:health",
504
+ HorseJumpStrength = "minecraft:horse.jump_strength",
505
+ KnockbackResistence = "minecraft:knockback_resistance",
506
+ LavaMovement = "minecraft:lava_movement",
507
+ Luck = "minecraft:luck",
508
+ Movement = "minecraft:movement",
509
+ PlayerExhaustion = "minecraft:player.exhaustion",
510
+ PlayerExperience = "minecraft:player.experience",
511
+ PlayerHunger = "minecraft:player.hunger",
512
+ PlayerLevel = "minecraft:player.level",
513
+ PlayerSaturation = "minecraft:player.saturation",
514
+ UnderwaterMovement = "minecraft:underwater_movement",
515
+ ZombieSpawnReinforcements = "minecraft:zombie.spawn_reinforcements"
516
+ }
517
+
518
+ declare enum MetadataKey {
519
+ Flags = 0,
520
+ Health = 1,
521
+ Variant = 2,
522
+ Color = 3,
523
+ Nametag = 4,
524
+ OwnerEID = 5,
525
+ TargetEID = 6,
526
+ Air = 7,
527
+ PotionColor = 8,
528
+ PotionAmbient = 9,
529
+ JumpDuration = 10,
530
+ HurtTime = 11,
531
+ HurtDirection = 12,
532
+ PaddleTimeLeft = 13,
533
+ PaddleTimeRight = 14,
534
+ ExperienceValue = 15,
535
+ MinecartDisplayBlock = 16,
536
+ MinecartDisplayOffset = 17,
537
+ MinecartHasDisplay = 18,
538
+ OldSwell = 20,
539
+ SwellDirection = 21,
540
+ ChargeAmount = 22,
541
+ EndermanHeldRuntimeID = 23,
542
+ EntityAge = 24,
543
+ PlayerFlags = 26,
544
+ PlayerIndex = 27,
545
+ PlayerBedPositionBlockCoords = 28,
546
+ FireballPowerX = 29,
547
+ FireballPowerY = 30,
548
+ FireballPowerZ = 31,
549
+ AuxPower = 32,
550
+ FishX = 33,
551
+ FishZ = 34,
552
+ FishAngle = 35,
553
+ PotionAuxValue = 36,
554
+ LeadHolderEID = 37,
555
+ Scale = 38,
556
+ InteractiveTag = 39,
557
+ NPCSkinID = 40,
558
+ URLTag = 41,
559
+ MaxAirDataMaxAir = 42,
560
+ MarkVariant = 43,
561
+ ContainerType = 44,
562
+ ContainerBaseSize = 45,
563
+ ContainerExtraSlotsPerStrength = 46,
564
+ BlockTarget = 47,
565
+ WitherInvulnerableTicks = 48,
566
+ WitherTarget1 = 49,
567
+ WitherTarget2 = 50,
568
+ WitherTarget3 = 51,
569
+ AerialAttack = 52,
570
+ BoundingBoxWidth = 53,
571
+ BoundingBoxHeight = 54,
572
+ FuseLength = 55,
573
+ RiderSeatPositionVector3F = 56,
574
+ RiderRotationLocked = 57,
575
+ RiderMaxRotation = 58,
576
+ RiderMinRotation = 59,
577
+ RiderRotationOffset = 60,
578
+ AreaEffectCloudRadius = 61,
579
+ AreaEffectCloudWaiting = 62,
580
+ AreaEffectCloudParticleID = 63,
581
+ ShulkerPeekID = 64,
582
+ ShulkerAttachFace = 65,
583
+ ShulkerAttached = 66,
584
+ ShulkerAttachPos = 67,
585
+ TradingPlayerEID = 68,
586
+ TradingCareer = 69,
587
+ HasCommandBlock = 70,
588
+ CommandBlockCommand = 71,
589
+ CommandBlockLastOutput = 72,
590
+ CommandBlockTrackOutput = 73,
591
+ ControllingRiderSeatNumber = 74,
592
+ Strength = 75,
593
+ MaxStrength = 76,
594
+ SpellCastingColor = 77,
595
+ LimitedLife = 78,
596
+ ArmorStandPoseIndex = 79,
597
+ EnderCrystalTimeOffset = 80,
598
+ AlwaysShowNametag = 81,
599
+ Color2 = 82,
600
+ NameAuthor = 83,
601
+ ScoreTag = 84,
602
+ BalloonAttachedEntity = 85,
603
+ PufferfishSize = 86,
604
+ BubbleTime = 87,
605
+ Agent = 88,
606
+ SittingAmount = 89,
607
+ SittingAmountPrevious = 90,
608
+ EatingCounter = 91,
609
+ FlagsExtended = 92,
610
+ LayingAmount = 93,
611
+ LayingAmountPrevious = 94,
612
+ Duration = 95,
613
+ SpawnTime = 96,
614
+ ChangeRate = 97,
615
+ ChangeOnPickup = 98,
616
+ PickupCount = 99,
617
+ InteractText = 100,
618
+ TradeTier = 101,
619
+ MaxTradeTier = 102,
620
+ TradeExperience = 103,
621
+ SkinID = 104,
622
+ SpawningFrames = 105,
623
+ CommandBlockTickDelay = 106,
624
+ CommandBlockExecuteOnFirstTick = 107,
625
+ AmbientSoundInterval = 108,
626
+ AmbientSoundIntervalRange = 109,
627
+ AmbientSoundEventName = 110,
628
+ FallDamageMultiplier = 111,
629
+ NameRawText = 112,
630
+ CanRideTarget = 113,
631
+ LowTierCuredDiscount = 114,
632
+ HighTierCuredDiscount = 115,
633
+ NearbyCuredDiscount = 116,
634
+ NearbyCuredDiscountTimestamp = 117,
635
+ Hitbox = 118,
636
+ IsBuoyant = 119,
637
+ BaseRuntimeID = 120,
638
+ FreezingEffectStrength = 121,
639
+ BuoyancyData = 122,
640
+ GoatHornCount = 123,
641
+ UpdateProperties = 124,
642
+ MovementSoundDistanceOffset = 125,
643
+ HeartbeatIntervalTicks = 126,
644
+ HeartbeatSoundEvent = 127,
645
+ PlayerLastDeathPosition = 128,
646
+ PlayerLastDeathDimension = 129,
647
+ PlayerHasDied = 130,
648
+ CollisionBox = 131
649
+ }
650
+
651
+ declare enum MetadataType {
652
+ Byte = 0,
653
+ Short = 1,
654
+ Int = 2,
655
+ Float = 3,
656
+ String = 4,
657
+ Compound = 5,
658
+ Vec3int = 6,
659
+ Long = 7,
660
+ Vec3f = 8
661
+ }
662
+
663
+ declare enum MetadataFlags {
664
+ OnFire = 0,
665
+ Sneaking = 1,
666
+ Riding = 2,
667
+ Sprinting = 3,
668
+ Action = 4,
669
+ Invisible = 5,
670
+ Tempted = 6,
671
+ InLove = 7,
672
+ Saddled = 8,
673
+ Powered = 9,
674
+ Ignited = 10,
675
+ Baby = 11,
676
+ Converting = 12,
677
+ Critical = 13,
678
+ CanShowNametag = 14,
679
+ AlwaysShowNametag = 15,
680
+ NoAI = 16,
681
+ Silent = 17,
682
+ WallClimbing = 18,
683
+ CanClimb = 19,
684
+ Swimmer = 20,
685
+ CanFly = 21,
686
+ Walker = 22,
687
+ Resting = 23,
688
+ Sitting = 24,
689
+ Angry = 25,
690
+ Interested = 26,
691
+ Charged = 27,
692
+ Tamed = 28,
693
+ Orphaned = 29,
694
+ Leashed = 30,
695
+ Sheared = 31,
696
+ Gliding = 32,
697
+ Elder = 33,
698
+ Moving = 34,
699
+ Breathing = 35,
700
+ Chested = 36,
701
+ Stackable = 37,
702
+ ShowBase = 38,
703
+ Rearing = 39,
704
+ Vibrating = 40,
705
+ Idling = 41,
706
+ EvokerSpell = 42,
707
+ ChargeAttack = 43,
708
+ WASDControlled = 44,
709
+ CanPowerJump = 45,
710
+ CanDash = 46,
711
+ Linger = 47,
712
+ HasCollision = 48,
713
+ AffectedByGravity = 49,
714
+ FireImmune = 50,
715
+ Dancing = 51,
716
+ Enchanted = 52,
717
+ ShowTridentRope = 53,// Trident show an animated rope when enchanted with loyalty after they are thrown and return to their owner. To be combined with data_owner_eid.
718
+ ContainerPrivate = 54,// Inventory is private, doesn't drop contents when killed if true.
719
+ Transforming = 55,
720
+ SpinAttack = 56,
721
+ Swimming = 57,
722
+ Bribed = 58,// Dolphins have this set when they go to find treasure for the player.
723
+ Pregnant = 59,
724
+ LayingEgg = 60,
725
+ RiderCanPick = 61,// ???
726
+ TransitionSitting = 62,
727
+ Eating = 63,
728
+ LayingDown = 64
729
+ }
730
+
731
+ declare enum TransactionType {
732
+ Normal = 0,
733
+ InventoryMismatch = 1,
734
+ ItemUse = 2,
735
+ ItemUseOnEntity = 3,
736
+ ItemRelease = 4
737
+ }
738
+
739
+ declare enum TransactionSourceType {
740
+ Container = 0,
741
+ Global = 1,
742
+ WorldInteraction = 2,
743
+ Creative = 3,
744
+ CraftSlot = 100,
745
+ Craft = 9999
746
+ }
747
+
748
+ declare enum UseItemAction {
749
+ ClickBlock = 0,
750
+ ClickAir = 1,
751
+ BreakBlock = 2
752
+ }
753
+
754
+ declare enum UseItemOnEntityAction {
755
+ Interact = 0,
756
+ Attack = 1
757
+ }
758
+
759
+ declare enum ItemReleaseAction {
760
+ Release = 0,
761
+ Consume = 1
762
+ }
763
+
764
+ declare enum DeviceOS {
765
+ Undefined = 0,
766
+ Android = 1,
767
+ Ios = 2,
768
+ MacOS = 3,
769
+ FireOS = 4,
770
+ GearVR = 5,
771
+ Hololens = 6,
772
+ Win10 = 7,
773
+ Win32 = 8,
774
+ Dedicated = 9,
775
+ TVOS = 10,
776
+ Orbis = 11,
777
+ Switch = 12,
778
+ Xbox = 13,
779
+ WindowsPhone = 14,
780
+ Linux = 15
781
+ }
782
+
783
+ declare enum RespawnState {
784
+ ServerSearchingForSpawn = 0,
785
+ ServerReadyToSpawn = 1,
786
+ ClientReadyToSpawn = 2
787
+ }
788
+
789
+ declare enum FormType {
790
+ Action = "form",
791
+ Message = "modal",
792
+ Modal = "custom_form"
793
+ }
794
+
795
+ declare enum UpdateBlockLayerType {
796
+ Normal = 0,
797
+ WaterLogged = 1
798
+ }
799
+
800
+ declare enum UpdateBlockFlagsType {
801
+ None = 0,
802
+ Neighbors = 1,
803
+ Network = 2,
804
+ NoGraphic = 4,
805
+ Priority = 8
806
+ }
807
+
808
+ declare enum DimensionType {
809
+ Overworld = 0,
810
+ Nether = 1,
811
+ End = 2
812
+ }
813
+
814
+ declare enum ModalFormCanceledReason {
815
+ Closed = 0,
816
+ Busy = 1
817
+ }
818
+
819
+ declare enum ItemStackActionType {
820
+ Take = 0,
821
+ Place = 1,
822
+ Swap = 2,
823
+ Drop = 3,
824
+ Destroy = 4,
825
+ Consume = 5,
826
+ Create = 6,
827
+ PlaceInContainer = 7,
828
+ TakeFromContainer = 8,
829
+ LabTableCombine = 9,
830
+ BeaconPayment = 10,
831
+ MineBlock = 11,
832
+ CraftRecipe = 12,
833
+ CraftRecipeAuto = 13,
834
+ CraftCreative = 14,
835
+ Optional = 15,
836
+ CraftGrindstoneRequest = 16,
837
+ CraftLoomRequest = 17,
838
+ NonImplemented = 18,
839
+ ResultsDeprecated = 19
840
+ }
841
+
842
+ declare enum ItemStackStatus {
843
+ Ok = 0,
844
+ Error = 1
845
+ }
846
+
847
+ declare enum AbilitySet {
848
+ AttackMobs = "minecraft:ability.attack_mobs",
849
+ AttackPlayers = "minecraft:ability.attack_players",
850
+ Build = "minecraft:ability.build",
851
+ Count = "minecraft:ability.count",
852
+ DoorsAndSwitches = "minecraft:ability.doors_and_switches",
853
+ FlySpeed = "minecraft:ability.fly_speed",
854
+ Flying = "minecraft:ability.flying",
855
+ InstantBuild = "minecraft:ability.instant_build",
856
+ Invulnerable = "minecraft:ability.invulnerable",
857
+ Lightning = "minecraft:ability.lightning",
858
+ MayFly = "minecraft:ability.may_fly",
859
+ Mine = "minecraft:ability.mine",
860
+ Muted = "minecraft:ability.muted",
861
+ NoClip = "minecraft:ability.no_clip",
862
+ OpenContainers = "minecraft:ability.open_containers",
863
+ OperatorCommands = "minecraft:ability.operator_commands",
864
+ PrivilegedBuilder = "minecraft:ability.privileged_builder",
865
+ Teleport = "minecraft:ability.teleport",
866
+ WalkSpeed = "minecraft:ability.walk_speed",
867
+ WorldBuilder = "minecraft:ability.world_builder"
868
+ }
869
+
870
+ declare enum AnimateId {
871
+ None = 0,
872
+ SwingArm = 1,
873
+ Unknown = 2,
874
+ WakeUp = 3,
875
+ CriticalHit = 4,
876
+ MagicCriticalHit = 5,
877
+ RowRight = 128,
878
+ RowLeft = 129
879
+ }
880
+
881
+ declare enum LevelEvent {
882
+ Undefined = 0,
883
+ SoundClick = 1000,
884
+ SoundClickFail = 1001,
885
+ SoundLaunch = 1002,
886
+ SoundOpenDoor = 1003,
887
+ SoundFizz = 1004,
888
+ SoundFuse = 1005,
889
+ SoundPlayRecording = 1006,
890
+ SoundGhastWarning = 1007,
891
+ SoundGhastFireball = 1008,
892
+ SoundBlazeFireball = 1009,
893
+ SoundZombieWoodenDoor = 1010,
894
+ SoundZombieDoorCrash = 1012,
895
+ SoundZombieInfected = 1016,
896
+ SoundZombieConverted = 1017,
897
+ SoundEndermanTeleport = 1018,
898
+ SoundAnvilBroken = 1020,
899
+ SoundAnvilUsed = 1021,
900
+ SoundAnvilLand = 1022,
901
+ SoundInfinityArrowPickup = 1030,
902
+ SoundTeleportEnderPearl = 1032,
903
+ SoundAddItem = 1040,
904
+ SoundItemFrameBreak = 1041,
905
+ SoundItemFramePlace = 1042,
906
+ SoundItemFrameRemoveItem = 1043,
907
+ SoundItemFrameRotateItem = 1044,
908
+ SoundExperienceOrbPickup = 1051,
909
+ SoundTotemUsed = 1052,
910
+ SoundArmorStandBreak = 1060,
911
+ SoundArmorStandHit = 1061,
912
+ SoundArmorStandLand = 1062,
913
+ SoundArmorStandPlace = 1063,
914
+ SoundPointedDripstoneLand = 1064,
915
+ SoundDyeUsed = 1065,
916
+ SoundInkSacUsed = 1066,
917
+ SoundAmethystResonate = 1067,
918
+ QueueCustomMusic = 1900,
919
+ PlayCustomMusic = 1901,
920
+ StopCustomMusic = 1902,
921
+ SetMusicVolume = 1903,
922
+ ParticlesShoot = 2000,
923
+ ParticlesDestroyBlock = 2001,
924
+ ParticlesPotionSplash = 2002,
925
+ ParticlesEyeOfEnderDeath = 2003,
926
+ ParticlesMobBlockSpawn = 2004,
927
+ ParticleCropGrowth = 2005,
928
+ ParticleSoundGuardianGhost = 2006,
929
+ ParticleDeathSmoke = 2007,
930
+ ParticleDenyBlock = 2008,
931
+ ParticleGenericSpawn = 2009,
932
+ ParticlesDragonEgg = 2010,
933
+ ParticlesCropEaten = 2011,
934
+ ParticlesCrit = 2012,
935
+ ParticlesTeleport = 2013,
936
+ ParticlesCrackBlock = 2014,
937
+ ParticlesBubble = 2015,
938
+ ParticlesEvaporate = 2016,
939
+ ParticlesDestroyArmorStand = 2017,
940
+ ParticlesBreakingEgg = 2018,
941
+ ParticleDestroyEgg = 2019,
942
+ ParticlesEvaporateWater = 2020,
943
+ ParticlesDestroyBlockNoSound = 2021,
944
+ ParticlesKnockbackRoar = 2022,
945
+ ParticlesTeleportTrail = 2023,
946
+ ParticlesPointCloud = 2024,
947
+ ParticlesExplosion = 2025,
948
+ ParticlesBlockExplosion = 2026,
949
+ ParticlesVibrationSignal = 2027,
950
+ ParticlesDripstoneDrip = 2028,
951
+ ParticlesFizzEffect = 2029,
952
+ WaxOn = 2030,
953
+ WaxOff = 2031,
954
+ Scrape = 2032,
955
+ ParticlesElectricSpark = 2033,
956
+ ParticleTurtleEgg = 2034,
957
+ ParticlesSculkShriek = 2035,
958
+ SculkCatalystBloom = 2036,
959
+ SculkCharge = 2037,
960
+ SculkChargePop = 2038,
961
+ SonicExplosion = 2039,
962
+ DustPlume = 2040,
963
+ StartRaining = 3001,
964
+ StartThunderstorm = 3002,
965
+ StopRaining = 3003,
966
+ StopThunderstorm = 3004,
967
+ GlobalPause = 3005,
968
+ SimTimeStep = 3006,
969
+ SimTimeScale = 3007,
970
+ ActivateBlock = 3500,
971
+ CauldronExplode = 3501,
972
+ CauldronDyeArmor = 3502,
973
+ CauldronCleanArmor = 3503,
974
+ CauldronFillPotion = 3504,
975
+ CauldronTakePotion = 3505,
976
+ CauldronFillWater = 3506,
977
+ CauldronTakeWater = 3507,
978
+ CauldronAddDye = 3508,
979
+ CauldronCleanBanner = 3509,
980
+ CauldronFlush = 3510,
981
+ AgentSpawnEffect = 3511,
982
+ CauldronFillLava = 3512,
983
+ CauldronTakeLava = 3513,
984
+ CauldronFillPowderSnow = 3514,
985
+ CauldronTakePowderSnow = 3515,
986
+ StartBlockCracking = 3600,
987
+ StopBlockCracking = 3601,
988
+ UpdateBlockCracking = 3602,
989
+ ParticlesCrackBlockDown = 3603,
990
+ ParticlesCrackBlockUp = 3604,
991
+ ParticlesCrackBlockNorth = 3605,
992
+ ParticlesCrackBlockSouth = 3606,
993
+ ParticlesCrackBlockWest = 3607,
994
+ ParticlesCrackBlockEast = 3608,
995
+ ParticlesShootWhiteSmoke = 3609,
996
+ ParticlesBreezeWindExplosion = 3610,
997
+ ParticlesTrialSpawnerDetection = 3611,
998
+ ParticlesTrialSpawnerSpawning = 3612,
999
+ ParticlesTrialSpawnerEjecting = 3613,
1000
+ ParticlesWindExplosion = 3614,
1001
+ AllPlayersSleeping = 3615,
1002
+ deprecated = 3616,
1003
+ SleepingPlayers = 9801,
1004
+ JumpPrevented = 9810,
1005
+ AnimationVaultActivate = 9811,
1006
+ AnimationVaultDeactivate = 9812,
1007
+ AnimationVaultEjectItem = 9813,
1008
+ ParticleLegacyEvent = 16384
1009
+ }
1010
+
1011
+ declare enum LevelSoundEvent {
1012
+ ItemUseOn = 0,
1013
+ Hit = 1,
1014
+ Step = 2,
1015
+ Fly = 3,
1016
+ Jump = 4,
1017
+ Break = 5,
1018
+ Place = 6,
1019
+ HeavyStep = 7,
1020
+ Gallop = 8,
1021
+ Fall = 9,
1022
+ Ambient = 10,
1023
+ AmbientBaby = 11,
1024
+ AmbientInWater = 12,
1025
+ Breathe = 13,
1026
+ Death = 14,
1027
+ DeathInWater = 15,
1028
+ DeathToZombie = 16,
1029
+ Hurt = 17,
1030
+ HurtInWater = 18,
1031
+ Mad = 19,
1032
+ Boost = 20,
1033
+ Bow = 21,
1034
+ SquishBig = 22,
1035
+ SquishSmall = 23,
1036
+ FallBig = 24,
1037
+ FallSmall = 25,
1038
+ Splash = 26,
1039
+ Fizz = 27,
1040
+ Flap = 28,
1041
+ Swim = 29,
1042
+ Drink = 30,
1043
+ Eat = 31,
1044
+ Takeoff = 32,
1045
+ Shake = 33,
1046
+ Plop = 34,
1047
+ Land = 35,
1048
+ Saddle = 36,
1049
+ Armor = 37,
1050
+ ArmorPlace = 38,
1051
+ AddChest = 39,
1052
+ Throw = 40,
1053
+ Attack = 41,
1054
+ AttackNoDamage = 42,
1055
+ AttackStrong = 43,
1056
+ Warn = 44,
1057
+ Shear = 45,
1058
+ Milk = 46,
1059
+ Thunder = 47,
1060
+ Explode = 48,
1061
+ Fire = 49,
1062
+ Ignite = 50,
1063
+ Fuse = 51,
1064
+ Stare = 52,
1065
+ Spawn = 53,
1066
+ Shoot = 54,
1067
+ BreakBlock = 55,
1068
+ Launch = 56,
1069
+ Blast = 57,
1070
+ LargeBlast = 58,
1071
+ Twinkle = 59,
1072
+ Remedy = 60,
1073
+ Unfect = 61,
1074
+ LevelUp = 62,
1075
+ BowHit = 63,
1076
+ BulletHit = 64,
1077
+ ExtinguishFire = 65,
1078
+ ItemFizz = 66,
1079
+ ChestOpen = 67,
1080
+ ChestClosed = 68,
1081
+ ShulkerBoxOpen = 69,
1082
+ ShulkerBoxClosed = 70,
1083
+ EnderChestOpen = 71,
1084
+ EnderChestClosed = 72,
1085
+ PowerOn = 73,
1086
+ PowerOff = 74,
1087
+ Attach = 75,
1088
+ Detach = 76,
1089
+ Deny = 77,
1090
+ Tripod = 78,
1091
+ Pop = 79,
1092
+ DropSlot = 80,
1093
+ Note = 81,
1094
+ Thorns = 82,
1095
+ PistonIn = 83,
1096
+ PistonOut = 84,
1097
+ Portal = 85,
1098
+ Water = 86,
1099
+ LavaPop = 87,
1100
+ Lava = 88,
1101
+ Burp = 89,
1102
+ BucketFillWater = 90,
1103
+ BucketFillLava = 91,
1104
+ BucketEmptyWater = 92,
1105
+ BucketEmptyLava = 93,
1106
+ EquipChain = 94,
1107
+ EquipDiamond = 95,
1108
+ EquipGeneric = 96,
1109
+ EquipGold = 97,
1110
+ EquipIron = 98,
1111
+ EquipLeather = 99,
1112
+ EquipElytra = 100,
1113
+ Record13 = 101,
1114
+ RecordCat = 102,
1115
+ RecordBlocks = 103,
1116
+ RecordChirp = 104,
1117
+ RecordFar = 105,
1118
+ RecordMall = 106,
1119
+ RecordMellohi = 107,
1120
+ RecordStal = 108,
1121
+ RecordStrad = 109,
1122
+ RecordWard = 110,
1123
+ Record11 = 111,
1124
+ RecordWait = 112,
1125
+ RecordNull = 113,
1126
+ Flop = 114,
1127
+ GuardianCurse = 115,
1128
+ MobWarning = 116,
1129
+ MobWarningBaby = 117,
1130
+ Teleport = 118,
1131
+ ShulkerOpen = 119,
1132
+ ShulkerClose = 120,
1133
+ Haggle = 121,
1134
+ HaggleYes = 122,
1135
+ HaggleNo = 123,
1136
+ HaggleIdle = 124,
1137
+ ChorusGrow = 125,
1138
+ ChorusDeath = 126,
1139
+ Glass = 127,
1140
+ PotionBrewed = 128,
1141
+ CastSpell = 129,
1142
+ PrepareAttackSpell = 130,
1143
+ PrepareSummon = 131,
1144
+ PrepareWololo = 132,
1145
+ Fang = 133,
1146
+ Charge = 134,
1147
+ TakePicture = 135,
1148
+ PlaceLeashKnot = 136,
1149
+ BreakLeashKnot = 137,
1150
+ AmbientGrowl = 138,
1151
+ AmbientWhine = 139,
1152
+ AmbientPant = 140,
1153
+ AmbientPurr = 141,
1154
+ AmbientPurreow = 142,
1155
+ DeathMinVolume = 143,
1156
+ DeathMidVolume = 144,
1157
+ ImitateBlaze = 145,
1158
+ ImitateCaveSpider = 146,
1159
+ ImitateCreeper = 147,
1160
+ ImitateElderGuardian = 148,
1161
+ ImitateEnderDragon = 149,
1162
+ ImitateEnderman = 150,
1163
+ ImitateEndermite = 151,
1164
+ ImitateEvocationIllager = 152,
1165
+ ImitateGhast = 153,
1166
+ ImitateHusk = 154,
1167
+ ImitateIllusionIllager = 155,
1168
+ ImitateMagmaCube = 156,
1169
+ ImitatePolarBear = 157,
1170
+ ImitateShulker = 158,
1171
+ ImitateSilverfish = 159,
1172
+ ImitateSkeleton = 160,
1173
+ ImitateSlime = 161,
1174
+ ImitateSpider = 162,
1175
+ ImitateStray = 163,
1176
+ ImitateVex = 164,
1177
+ ImitateVindicationIllager = 165,
1178
+ ImitateWitch = 166,
1179
+ ImitateWither = 167,
1180
+ ImitateWitherSkeleton = 168,
1181
+ ImitateWolf = 169,
1182
+ ImitateZombie = 170,
1183
+ ImitateZombiePigman = 171,
1184
+ ImitateZombieVillager = 172,
1185
+ EnderEyePlaced = 173,
1186
+ EndPortalCreated = 174,
1187
+ AnvilUse = 175,
1188
+ BottleDragonBreath = 176,
1189
+ PortalTravel = 177,
1190
+ TridentHit = 178,
1191
+ TridentReturn = 179,
1192
+ TridentRiptide_1 = 180,
1193
+ TridentRiptide_2 = 181,
1194
+ TridentRiptide_3 = 182,
1195
+ TridentThrow = 183,
1196
+ TridentThunder = 184,
1197
+ TridentHitGround = 185,
1198
+ Default = 186,
1199
+ FletchingTableUse = 187,
1200
+ ElementConstructOpen = 188,
1201
+ IceBombHit = 189,
1202
+ BalloonPop = 190,
1203
+ LTReactionIceBomb = 191,
1204
+ LTReactionBleach = 192,
1205
+ LTReactionElephantToothpaste = 193,
1206
+ LTReactionElephantToothpaste2 = 194,
1207
+ LTReactionGlowStick = 195,
1208
+ LTReactionGlowStick2 = 196,
1209
+ LTReactionLuminol = 197,
1210
+ LTReactionSalt = 198,
1211
+ LTReactionFertilizer = 199,
1212
+ LTReactionFireball = 200,
1213
+ LTReactionMagnesiumSalt = 201,
1214
+ LTReactionMiscFire = 202,
1215
+ LTReactionFire = 203,
1216
+ LTReactionMiscExplosion = 204,
1217
+ LTReactionMiscMystical = 205,
1218
+ LTReactionMiscMystical2 = 206,
1219
+ LTReactionProduct = 207,
1220
+ SparklerUse = 208,
1221
+ GlowStickUse = 209,
1222
+ SparklerActive = 210,
1223
+ ConvertToDrowned = 211,
1224
+ BucketFillFish = 212,
1225
+ BucketEmptyFish = 213,
1226
+ BubbleColumnUpwards = 214,
1227
+ BubbleColumnDownwards = 215,
1228
+ BubblePop = 216,
1229
+ BubbleUpInside = 217,
1230
+ BubbleDownInside = 218,
1231
+ HurtBaby = 219,
1232
+ DeathBaby = 220,
1233
+ StepBaby = 221,
1234
+ SpawnBaby = 222,
1235
+ Born = 223,
1236
+ TurtleEggBreak = 224,
1237
+ TurtleEggCrack = 225,
1238
+ TurtleEggHatched = 226,
1239
+ LayEgg = 227,
1240
+ TurtleEggAttacked = 228,
1241
+ BeaconActivate = 229,
1242
+ BeaconAmbient = 230,
1243
+ BeaconDeactivate = 231,
1244
+ BeaconPower = 232,
1245
+ ConduitActivate = 233,
1246
+ ConduitAmbient = 234,
1247
+ ConduitAttack = 235,
1248
+ ConduitDeactivate = 236,
1249
+ ConduitShort = 237,
1250
+ Swoop = 238,
1251
+ BambooSaplingPlace = 239,
1252
+ PreSneeze = 240,
1253
+ Sneeze = 241,
1254
+ AmbientTame = 242,
1255
+ Scared = 243,
1256
+ ScaffoldingClimb = 244,
1257
+ CrossbowLoadingStart = 245,
1258
+ CrossbowLoadingMiddle = 246,
1259
+ CrossbowLoadingEnd = 247,
1260
+ CrossbowShoot = 248,
1261
+ CrossbowQuickChargeStart = 249,
1262
+ CrossbowQuickChargeMiddle = 250,
1263
+ CrossbowQuickChargeEnd = 251,
1264
+ AmbientAggressive = 252,
1265
+ AmbientWorried = 253,
1266
+ CantBreed = 254,
1267
+ ShieldBlock = 255,
1268
+ LecternBookPlace = 256,
1269
+ GrindstoneUse = 257,
1270
+ Bell = 258,
1271
+ CampfireCrackle = 259,
1272
+ Roar = 260,
1273
+ Stun = 261,
1274
+ SweetBerryBushHurt = 262,
1275
+ SweetBerryBushPick = 263,
1276
+ CartographyTableUse = 264,
1277
+ StonecutterUse = 265,
1278
+ ComposterEmpty = 266,
1279
+ ComposterFill = 267,
1280
+ ComposterFillLayer = 268,
1281
+ ComposterReady = 269,
1282
+ BarrelOpen = 270,
1283
+ BarrelClose = 271,
1284
+ RaidHorn = 272,
1285
+ LoomUse = 273,
1286
+ AmbientInRaid = 274,
1287
+ UICartographyTableUse = 275,
1288
+ UIStonecutterUse = 276,
1289
+ UILoomUse = 277,
1290
+ SmokerUse = 278,
1291
+ BlastFurnaceUse = 279,
1292
+ SmithingTableUse = 280,
1293
+ Screech = 281,
1294
+ Sleep = 282,
1295
+ FurnaceUse = 283,
1296
+ MooshroomConvert = 284,
1297
+ MilkSuspiciously = 285,
1298
+ Celebrate = 286,
1299
+ JumpPrevent = 287,
1300
+ AmbientPollinate = 288,
1301
+ BeehiveDrip = 289,
1302
+ BeehiveEnter = 290,
1303
+ BeehiveExit = 291,
1304
+ BeehiveWork = 292,
1305
+ BeehiveShear = 293,
1306
+ HoneybottleDrink = 294,
1307
+ AmbientCave = 295,
1308
+ Retreat = 296,
1309
+ ConvertToZombified = 297,
1310
+ Admire = 298,
1311
+ StepLava = 299,
1312
+ Tempt = 300,
1313
+ Panic = 301,
1314
+ Angry = 302,
1315
+ AmbientMoodWarpedForest = 303,
1316
+ AmbientMoodSoulsandValley = 304,
1317
+ AmbientMoodNetherWastes = 305,
1318
+ AmbientMoodBasaltDeltas = 306,
1319
+ AmbientMoodCrimsonForest = 307,
1320
+ RespawnAnchorCharge = 308,
1321
+ RespawnAnchorDeplete = 309,
1322
+ RespawnAnchorSetSpawn = 310,
1323
+ RespawnAnchorAmbient = 311,
1324
+ SoulEscapeQuiet = 312,
1325
+ SoulEscapeLoud = 313,
1326
+ RecordPigstep = 314,
1327
+ LinkCompassToLodestone = 315,
1328
+ UseSmithingTable = 316,
1329
+ EquipNetherite = 317,
1330
+ AmbientLoopWarpedForest = 318,
1331
+ AmbientLoopSoulsandValley = 319,
1332
+ AmbientLoopNetherWastes = 320,
1333
+ AmbientLoopBasaltDeltas = 321,
1334
+ AmbientLoopCrimsonForest = 322,
1335
+ AmbientAdditionWarpedForest = 323,
1336
+ AmbientAdditionSoulsandValley = 324,
1337
+ AmbientAdditionNetherWastes = 325,
1338
+ AmbientAdditionBasaltDeltas = 326,
1339
+ AmbientAdditionCrimsonForest = 327,
1340
+ SculkSensorPowerOn = 328,
1341
+ SculkSensorPowerOff = 329,
1342
+ BucketFillPowderSnow = 330,
1343
+ BucketEmptyPowderSnow = 331,
1344
+ PointedDripstoneCauldronDripWater = 332,
1345
+ PointedDripstoneCauldronDripLava = 333,
1346
+ PointedDripstoneDripWater = 334,
1347
+ PointedDripstoneDripLava = 335,
1348
+ CaveVinesPickBerries = 336,
1349
+ BigDripleafTiltDown = 337,
1350
+ BigDripleafTiltUp = 338,
1351
+ CopperWaxOn = 339,
1352
+ CopperWaxOff = 340,
1353
+ Scrape = 341,
1354
+ PlayerHurtDrown = 342,
1355
+ PlayerHurtOnFire = 343,
1356
+ PlayerHurtFreeze = 344,
1357
+ UseSpyglass = 345,
1358
+ StopUsingSpyglass = 346,
1359
+ AmethystBlockChime = 347,
1360
+ AmbientScreamer = 348,
1361
+ HurtScreamer = 349,
1362
+ DeathScreamer = 350,
1363
+ MilkScreamer = 351,
1364
+ JumpToBlock = 352,
1365
+ PreRam = 353,
1366
+ PreRamScreamer = 354,
1367
+ RamImpact = 355,
1368
+ RamImpactScreamer = 356,
1369
+ SquidInkSquirt = 357,
1370
+ GlowSquidInkSquirt = 358,
1371
+ ConvertToStray = 359,
1372
+ CakeAddCandle = 360,
1373
+ ExtinguishCandle = 361,
1374
+ AmbientCandle = 362,
1375
+ BlockClick = 363,
1376
+ BlockClickFail = 364,
1377
+ SculkCatalystBloom = 365,
1378
+ SculkShriekerShriek = 366,
1379
+ NearbyClose = 367,
1380
+ NearbyCloser = 368,
1381
+ NearbyClosest = 369,
1382
+ Agitated = 370,
1383
+ RecordOtherside = 371,
1384
+ Tongue = 372,
1385
+ CrackIronGolem = 373,
1386
+ RepairIronGolem = 374,
1387
+ Listening = 375,
1388
+ Heartbeat = 376,
1389
+ HornBreak = 377,
1390
+ SculkSpread = 379,
1391
+ SculkCharge = 380,
1392
+ SculkSensorPlace = 381,
1393
+ SculkShriekerPlace = 382,
1394
+ GoatCall0 = 383,
1395
+ GoatCall1 = 384,
1396
+ GoatCall2 = 385,
1397
+ GoatCall3 = 386,
1398
+ GoatCall4 = 387,
1399
+ GoatCall5 = 388,
1400
+ GoatCall6 = 389,
1401
+ GoatCall7 = 390,
1402
+ ImitateWarden = 426,
1403
+ ListeningAngry = 427,
1404
+ Item_Given = 428,
1405
+ Item_Taken = 429,
1406
+ Disappeared = 430,
1407
+ Reappeared = 431,
1408
+ DrinkMilk = 432,
1409
+ FrogspawnHatched = 433,
1410
+ LaySpawn = 434,
1411
+ FrogspawnBreak = 435,
1412
+ SonicBoom = 436,
1413
+ SonicCharge = 437,
1414
+ Item_Thrown = 438,
1415
+ Record5 = 439,
1416
+ ConvertToFrog = 440,
1417
+ RecordPlaying = 441,
1418
+ EnchantingTableUse = 442,
1419
+ StepSand = 443,
1420
+ DashReady = 444,
1421
+ BundleDropContents = 445,
1422
+ BundleInsert = 446,
1423
+ BundleRemoveOne = 447,
1424
+ PressurePlateClickOff = 448,
1425
+ PressurePlateClickOn = 449,
1426
+ ButtonClickOff = 450,
1427
+ ButtonClickOn = 451,
1428
+ DoorOpen = 452,
1429
+ DoorClose = 453,
1430
+ TrapdoorOpen = 454,
1431
+ TrapdoorClose = 455,
1432
+ FenceGateOpen = 456,
1433
+ FenceGateClose = 457,
1434
+ Insert = 458,
1435
+ Pickup = 459,
1436
+ InsertEnchanted = 460,
1437
+ PickupEnchanted = 461,
1438
+ Brush = 462,
1439
+ BrushCompleted = 463,
1440
+ ShatterDecoratedPot = 464,
1441
+ BreakDecoratedPot = 465,
1442
+ SnifferEggCrack = 466,
1443
+ SnifferEggHatched = 467,
1444
+ WaxedSignInteractFail = 468,
1445
+ RecordRelic = 469,
1446
+ Bump = 470,
1447
+ PumpkinCarve = 471,
1448
+ ConvertHuskToZombie = 472,
1449
+ PigDeath = 473,
1450
+ HoglinConvertToZombified = 474,
1451
+ AmbientUnderwaterEnter = 475,
1452
+ AmbientUnderwaterExit = 476,
1453
+ BottleFill = 477,
1454
+ BottleEmpty = 478,
1455
+ CrafterCraft = 479,
1456
+ CrafterFail = 480,
1457
+ DecoratedPotInsert = 481,
1458
+ DecoratedPotInsertFail = 482,
1459
+ CrafterDisableSlot = 483,
1460
+ CopperBulbTurnOn = 490,
1461
+ CopperBulbTurnOff = 491,
1462
+ Undefined = 492
1463
+ }
1464
+
1465
+ declare class LoginTokens extends DataType {
1466
+ client: string;
1467
+ identity: string;
1468
+ constructor(client: string, identity: string);
1469
+ static read(stream: BinaryStream): LoginTokens;
1470
+ static write(stream: BinaryStream, value: LoginTokens): void;
1471
+ }
1472
+
1473
+ declare class BehaviorPackInfo extends DataType {
1474
+ contentIdentity: string;
1475
+ contentKey: string;
1476
+ hasScripts: boolean;
1477
+ size: number;
1478
+ subpackName: string;
1479
+ uuid: string;
1480
+ version: string;
1481
+ constructor(contentIdentity: string, contentKey: string, hasScripts: boolean, size: number, subpackName: string, uuid: string, version: string);
1482
+ static read(stream: BinaryStream): Array<BehaviorPackInfo>;
1483
+ static write(stream: BinaryStream, value: Array<BehaviorPackInfo>): void;
1484
+ }
1485
+
1486
+ declare class TexturePackInfo extends DataType {
1487
+ contentIdentity: string;
1488
+ contentKey: string;
1489
+ hasScripts: boolean;
1490
+ rtxEnabled: boolean;
1491
+ size: number;
1492
+ subpackName: string;
1493
+ uuid: string;
1494
+ version: string;
1495
+ constructor(contentIdentity: string, contentKey: string, hasScripts: boolean, rtxEnabled: boolean, size: number, subpackName: string, uuid: string, version: string);
1496
+ static read(stream: BinaryStream): Array<TexturePackInfo>;
1497
+ static write(stream: BinaryStream, value: Array<TexturePackInfo>): void;
1498
+ }
1499
+
1500
+ declare class PackLinks extends DataType {
1501
+ id: string;
1502
+ url: string;
1503
+ constructor(id: string, url: string);
1504
+ static read(stream: BinaryStream): Array<PackLinks>;
1505
+ static write(stream: BinaryStream, value: Array<PackLinks>): void;
1506
+ }
1507
+
1508
+ declare class ResourcePackIds extends DataType {
1509
+ static read(stream: BinaryStream): Array<string>;
1510
+ static write(stream: BinaryStream, value: Array<string>): void;
1511
+ }
1512
+
1513
+ declare class ResourceIdVersions extends DataType {
1514
+ name: string;
1515
+ uuid: string;
1516
+ version: string;
1517
+ constructor(name: string, uuid: string, version: string);
1518
+ static read(stream: BinaryStream): Array<ResourceIdVersions>;
1519
+ static write(stream: BinaryStream, value: Array<ResourceIdVersions>): void;
1520
+ }
1521
+
1522
+ declare class Experiments extends DataType {
1523
+ enabled: boolean;
1524
+ name: string;
1525
+ constructor(name: string, enabled: boolean);
1526
+ static read(stream: BinaryStream): Array<Experiments>;
1527
+ static write(stream: BinaryStream, value: Array<Experiments>): void;
1528
+ }
1529
+
1530
+ /**
1531
+ * A 3D vector with floating point precision.
1532
+ *
1533
+ */
1534
+ declare class Vector3f extends DataType {
1535
+ /**
1536
+ * The x coordinate of the vector.
1537
+ */
1538
+ x: number;
1539
+ /**
1540
+ * The y coordinate of the vector.
1541
+ */
1542
+ y: number;
1543
+ /**
1544
+ * The z coordinate of the vector.
1545
+ */
1546
+ z: number;
1547
+ /**
1548
+ * Creates a new 3D vector.
1549
+ *
1550
+ * @param x The x coordinate of the vector.
1551
+ * @param y The y coordinate of the vector.
1552
+ * @param z The z coordinate of the vector.
1553
+ */
1554
+ constructor(x: number, y: number, z: number);
1555
+ /**
1556
+ * Floors the coordinates of the 3D vector.
1557
+ *
1558
+ * @returns The 3D vector with the coordinates floored.
1559
+ */
1560
+ floor(): this;
1561
+ /**
1562
+ * Reads a 3D vector from the stream.
1563
+ *
1564
+ * @param stream The stream to read from.
1565
+ * @returns The 3D vector that was read.
1566
+ */
1567
+ static read(stream: BinaryStream): Vector3f;
1568
+ /**
1569
+ * Writes a 3D vector to the stream.
1570
+ *
1571
+ * @param stream The stream to write to.
1572
+ * @param value The 3D vector to write.
1573
+ */
1574
+ static write(stream: BinaryStream, value: Vector3f): void;
1575
+ }
1576
+
1577
+ /**
1578
+ * A 2D vector with floating point precision.
1579
+ *
1580
+ */
1581
+ declare class Vector2f extends DataType {
1582
+ /**
1583
+ * The x coordinate of the vector.
1584
+ */
1585
+ x: number;
1586
+ /**
1587
+ * The y coordinate of the vector.
1588
+ */
1589
+ y: number;
1590
+ /**
1591
+ * Creates a new 2D vector.
1592
+ *
1593
+ * @param x The x coordinate of the vector.
1594
+ * @param y The y coordinate of the vector.
1595
+ */
1596
+ constructor(x: number, y: number);
1597
+ static read(stream: BinaryStream): Vector2f;
1598
+ static write(stream: BinaryStream, value: Vector2f): void;
1599
+ }
1600
+
1601
+ declare class BlockCoordinates extends DataType {
1602
+ x: number;
1603
+ y: number;
1604
+ z: number;
1605
+ constructor(x: number, y: number, z: number);
1606
+ static read(stream: BinaryStream): BlockCoordinates;
1607
+ static write(stream: BinaryStream, value: BlockCoordinates): void;
1608
+ }
1609
+
1610
+ declare class GameRules extends DataType {
1611
+ editable: boolean;
1612
+ name: string;
1613
+ type: GameRuleType;
1614
+ value: boolean | number | string;
1615
+ constructor(editable: boolean, name: string, type: GameRuleType, value: boolean | number | string);
1616
+ static read(stream: BinaryStream): Array<GameRules>;
1617
+ static write(stream: BinaryStream, value: Array<GameRules>): void;
1618
+ }
1619
+
1620
+ declare class BlockProperties extends DataType {
1621
+ name: string;
1622
+ nbt: CompoundTag<unknown>;
1623
+ constructor(name: string, nbt: CompoundTag<unknown>);
1624
+ static read(stream: BinaryStream): Array<BlockProperties>;
1625
+ static write(stream: BinaryStream, value: Array<BlockProperties>): void;
1626
+ }
1627
+
1628
+ declare class ItemData extends DataType {
1629
+ componentBased: boolean;
1630
+ name: string;
1631
+ networkId: number;
1632
+ constructor(componentBased: boolean, name: string, networkId: number);
1633
+ static read(stream: BinaryStream): Array<ItemData>;
1634
+ static write(stream: BinaryStream, value: Array<ItemData>): void;
1635
+ }
1636
+
1637
+ declare class TeleportCause extends DataType {
1638
+ cause: number;
1639
+ sourceEntityType: number;
1640
+ constructor(cause: number, sourceEntityType: number);
1641
+ static read(stream: BinaryStream, endian: Endianness, mode: MoveMode): TeleportCause | null;
1642
+ static write(stream: BinaryStream, value: TeleportCause, endian: Endianness, mode: MoveMode): void;
1643
+ }
1644
+
1645
+ declare class Records extends DataType {
1646
+ buildPlatform?: number;
1647
+ entityUniqueId?: bigint;
1648
+ isHost?: boolean;
1649
+ isTeacher?: boolean;
1650
+ isSubclient?: boolean;
1651
+ platformChatId?: string;
1652
+ skin?: Buffer$1;
1653
+ username?: string;
1654
+ uuid: string;
1655
+ xuid?: string;
1656
+ constructor(uuid: string, buildPlatform?: number, entityUniqueId?: bigint, isHost?: boolean, isTeacher?: boolean, isSubclient?: boolean, platformChatId?: string, skin?: Buffer$1, username?: string, xuid?: string);
1657
+ static read(stream: BinaryStream, endian: Endianness, action: RecordAction): Array<Records>;
1658
+ static write(stream: BinaryStream, value: Array<Records>, endian: Endianness, action: RecordAction): void;
1659
+ }
1660
+
1661
+ interface AbilityFlag {
1662
+ flag: AbilityLayerFlag;
1663
+ value: boolean;
1664
+ }
1665
+ interface EncodedAbilityFlags {
1666
+ flagsHash: number;
1667
+ valuesHash: number;
1668
+ }
1669
+ declare class AbilityLayers extends DataType {
1670
+ flags: Array<AbilityFlag>;
1671
+ flySpeed: number;
1672
+ type: AbilityLayerType;
1673
+ walkSpeed: number;
1674
+ constructor(flags: Array<AbilityFlag>, flySpeed: number, type: AbilityLayerType, walkSpeed: number);
1675
+ static read(stream: BinaryStream): Array<AbilityLayers>;
1676
+ static write(stream: BinaryStream, value: Array<AbilityLayers>): void;
1677
+ static encodeFlags(flags: Array<AbilityFlag>): EncodedAbilityFlags;
1678
+ static decodeFlags(encoded: EncodedAbilityFlags): Array<AbilityFlag>;
1679
+ }
1680
+
1681
+ declare class TextSource extends DataType {
1682
+ static read(stream: BinaryStream, _: Endianness, type: TextPacketType): string | null;
1683
+ static write(stream: BinaryStream, value: string, _: Endianness, type: TextPacketType): void;
1684
+ }
1685
+
1686
+ declare class TextParameters extends DataType {
1687
+ static read(stream: BinaryStream, _: Endianness, type: TextPacketType): Array<string> | null;
1688
+ static write(stream: BinaryStream, value: Array<string>, _: Endianness, type: TextPacketType): void;
1689
+ }
1690
+
1691
+ declare class InteractPosition extends DataType {
1692
+ static read(stream: BinaryStream, endian: Endianness, action: InteractActions): Vector3f | null;
1693
+ static write(stream: BinaryStream, value: Vector3f, endian: Endianness, action: InteractActions): void;
1694
+ }
1695
+
1696
+ interface AttributeModifier {
1697
+ amount: number;
1698
+ id: string;
1699
+ name: string;
1700
+ operand: number;
1701
+ operation: number;
1702
+ serializable: boolean;
1703
+ }
1704
+ declare class PlayerAttributes extends DataType {
1705
+ current: number;
1706
+ default: number;
1707
+ max: number;
1708
+ min: number;
1709
+ modifiers: Array<AttributeModifier>;
1710
+ name: Attribute;
1711
+ constructor(current: number, default_: number, max: number, min: number, modifiers: Array<AttributeModifier>, name: Attribute);
1712
+ static read(stream: BinaryStream): Array<PlayerAttributes>;
1713
+ static write(stream: BinaryStream, value: Array<PlayerAttributes>): void;
1714
+ }
1715
+
1716
+ declare class ChunkCoords extends DataType {
1717
+ x: number;
1718
+ z: number;
1719
+ constructor(x: number, z: number);
1720
+ static read(stream: BinaryStream): Array<ChunkCoords>;
1721
+ static write(stream: BinaryStream, value: Array<ChunkCoords>): void;
1722
+ }
1723
+
1724
+ declare class MetadataDictionary extends DataType {
1725
+ flag?: MetadataFlags;
1726
+ key: MetadataKey;
1727
+ type: MetadataType;
1728
+ value: Vector3f | bigint | boolean | number | string;
1729
+ constructor(key: MetadataKey, type: MetadataType, value: Vector3f | bigint | boolean | number | string, flag?: MetadataFlags);
1730
+ static read(stream: BinaryStream): Array<MetadataDictionary>;
1731
+ static write(stream: BinaryStream, value: Array<MetadataDictionary>): void;
1732
+ }
1733
+
1734
+ interface EntityPropertyData {
1735
+ index: number;
1736
+ value: number;
1737
+ }
1738
+ declare class EntityProperties extends DataType {
1739
+ floats: Array<EntityPropertyData>;
1740
+ ints: Array<EntityPropertyData>;
1741
+ constructor(floats: Array<EntityPropertyData>, ints: Array<EntityPropertyData>);
1742
+ static read(stream: BinaryStream): EntityProperties;
1743
+ static write(stream: BinaryStream, value: EntityProperties): void;
1744
+ }
1745
+
1746
+ interface Transactions {
1747
+ changedSlots: Array<number>;
1748
+ containerId: number;
1749
+ }
1750
+ declare class TransactionLegacy extends DataType {
1751
+ requestId: number;
1752
+ transactions: Array<Transactions> | null;
1753
+ constructor(requestId: number, transactions: Array<Transactions> | null);
1754
+ static read(stream: BinaryStream): TransactionLegacy;
1755
+ static write(stream: BinaryStream, value: TransactionLegacy): void;
1756
+ }
1757
+
1758
+ interface ItemStackNbt {
1759
+ display?: CompoundTag<ItemStackDisplay> | null;
1760
+ }
1761
+ interface ItemStackDisplay {
1762
+ Name?: StringTag;
1763
+ }
1764
+
1765
+ declare class ItemInstanceUserData extends DataType {
1766
+ nbt: CompoundTag<ItemStackNbt> | null;
1767
+ canPlaceOn: Array<string>;
1768
+ canDestroy: Array<string>;
1769
+ ticking?: bigint | null;
1770
+ /**
1771
+ * Creates an instance of ItemInstanceUserData.
1772
+ * @param nbt NBT data for the item.
1773
+ * @param canPlaceOn Blocks the item can be placed on.
1774
+ * @param canDestroy Blocks the item can destroy.
1775
+ */
1776
+ constructor(nbt: CompoundTag<ItemStackNbt> | null, canPlaceOn: Array<string>, canDestroy: Array<string>, ticking?: bigint | null);
1777
+ static read(stream: BinaryStream, _endian: Endianness, id: number): ItemInstanceUserData;
1778
+ static write(stream: BinaryStream, value: ItemInstanceUserData, _endian: Endianness, id: number): void;
1779
+ }
1780
+
1781
+ declare class NetworkItemStackDescriptor extends DataType {
1782
+ network: number;
1783
+ stackSize?: number;
1784
+ metadata?: number;
1785
+ stackNetId?: number | null;
1786
+ blockRuntimeId?: number;
1787
+ extras?: ItemInstanceUserData | null;
1788
+ /**
1789
+ * Creates an instance of NetworkItemStackDescriptor.
1790
+ * @param id The network id of the item.
1791
+ * @param stackSize The size of the stack.
1792
+ * @param metadata The metadata of the item.
1793
+ * @param includeStackNetId Whether to include the stack net id.
1794
+ * @param auxValue The aux value of the item.
1795
+ * @param userData The user data of the item.
1796
+ */
1797
+ constructor(network: number, stackSize?: number, metadata?: number, stackNetId?: number | null, blockRuntimeId?: number, extras?: ItemInstanceUserData | null);
1798
+ static read(stream: BinaryStream): NetworkItemStackDescriptor;
1799
+ static write(stream: BinaryStream, value: NetworkItemStackDescriptor): void;
1800
+ }
1801
+
1802
+ declare class TransactionActions extends DataType {
1803
+ action: number | null;
1804
+ flags: number | null;
1805
+ inventoryId: ContainerId | null;
1806
+ newItem: NetworkItemStackDescriptor;
1807
+ oldItem: NetworkItemStackDescriptor;
1808
+ slot: number;
1809
+ sourceType: TransactionSourceType;
1810
+ constructor(action: number | null, flags: number | null, inventoryId: ContainerId | null, newItem: NetworkItemStackDescriptor, oldItem: NetworkItemStackDescriptor, slot: number, sourceType: TransactionSourceType);
1811
+ static read(stream: BinaryStream): Array<TransactionActions>;
1812
+ static write(stream: BinaryStream, value: TransactionActions): void;
1813
+ }
1814
+
1815
+ declare class TransactionUseItem extends DataType {
1816
+ action: UseItemAction;
1817
+ blockPosition: BlockCoordinates;
1818
+ blockRuntimeId: number;
1819
+ clickPosition: Vector3f;
1820
+ face: number;
1821
+ heldItem: NetworkItemStackDescriptor;
1822
+ hotbarSlot: number;
1823
+ playerPosition: Vector3f;
1824
+ constructor(action: UseItemAction, blockPosition: BlockCoordinates, blockRuntimeId: number, clickPosition: Vector3f, face: number, heldItem: NetworkItemStackDescriptor, hotbarSlot: number, playerPosition: Vector3f);
1825
+ static read(stream: BinaryStream): TransactionUseItem;
1826
+ static write(stream: BinaryStream, value: TransactionUseItem): void;
1827
+ }
1828
+
1829
+ declare class TransactionUseItemOnEntity extends DataType {
1830
+ /**
1831
+ * The action.
1832
+ */
1833
+ action: UseItemOnEntityAction;
1834
+ /**
1835
+ * The click position.
1836
+ */
1837
+ clickPosition: Vector3f;
1838
+ /**
1839
+ * The entity runtime id.
1840
+ */
1841
+ entityRuntimeId: bigint;
1842
+ /**
1843
+ * The held item.
1844
+ */
1845
+ heldItem: NetworkItemStackDescriptor;
1846
+ /**
1847
+ * The hotbar slot.
1848
+ */
1849
+ hotbarSlot: number;
1850
+ /**
1851
+ * The player position.
1852
+ */
1853
+ playerPosition: Vector3f;
1854
+ /**
1855
+ * Creates a new TransactionUseItemOnEntity.
1856
+ */
1857
+ constructor(action: UseItemOnEntityAction, clickPosition: Vector3f, entityRuntimeId: bigint, heldItem: NetworkItemStackDescriptor, hotbarSlot: number, playerPosition: Vector3f);
1858
+ static read(stream: BinaryStream): TransactionUseItemOnEntity;
1859
+ static write(stream: BinaryStream, value: TransactionUseItemOnEntity): void;
1860
+ }
1861
+
1862
+ declare class TransactionData extends DataType {
1863
+ action: ItemReleaseAction | UseItemAction | UseItemOnEntityAction | null;
1864
+ blockPosition: BlockCoordinates | null;
1865
+ blockRuntimeId: number | null;
1866
+ clickPosition: Vector3f | null;
1867
+ entityRuntimeId: bigint | null;
1868
+ face: number | null;
1869
+ headPosition: Vector3f | null;
1870
+ heldItem: NetworkItemStackDescriptor | null;
1871
+ hotbarSlot: number | null;
1872
+ playerPosition: Vector3f | null;
1873
+ constructor(action: ItemReleaseAction | UseItemAction | UseItemOnEntityAction | null, blockPosition: BlockCoordinates | null, blockRuntimeId: number | null, clickPosition: Vector3f | null, entityRuntimeId: bigint | null, face: number | null, headPosition: Vector3f | null, heldItem: NetworkItemStackDescriptor | null, hotbarSlot: number | null, playerPosition: Vector3f | null);
1874
+ static read(stream: BinaryStream, endian: Endianness, type: TransactionType): TransactionData | null;
1875
+ }
1876
+
1877
+ declare class TransactionItemRelease extends DataType {
1878
+ action: ItemReleaseAction;
1879
+ headPosition: Vector3f;
1880
+ heldItem: NetworkItemStackDescriptor;
1881
+ hotbarSlot: number;
1882
+ constructor(action: ItemReleaseAction, headPosition: Vector3f, heldItem: NetworkItemStackDescriptor, hotbarSlot: number);
1883
+ static read(stream: BinaryStream): TransactionItemRelease;
1884
+ static write(stream: BinaryStream, value: TransactionItemRelease): void;
1885
+ }
1886
+
1887
+ declare class Links extends DataType {
1888
+ immediate: boolean;
1889
+ riddenEntityId: bigint;
1890
+ riderEntityId: bigint;
1891
+ riderInitiated: boolean;
1892
+ type: number;
1893
+ constructor(immediate: boolean, riddenEntityId: bigint, riderEntityId: bigint, riderInitiated: boolean, type: number);
1894
+ static read(stream: BinaryStream): Array<Links>;
1895
+ static write(stream: BinaryStream, value: Array<Links>): void;
1896
+ }
1897
+
1898
+ declare class ModalFormData extends DataType {
1899
+ static read(stream: BinaryStream, _endian: Endianness, response: boolean): string | null;
1900
+ static write(stream: BinaryStream, value: string | null, _endian: Endianness, response: boolean): void;
1901
+ }
1902
+
1903
+ declare class ModalFormCanceled extends DataType {
1904
+ static read(stream: BinaryStream, _endian: Endianness, canceled: boolean): ModalFormCanceledReason | null;
1905
+ static write(stream: BinaryStream, value: ModalFormCanceledReason | null, _endian: Endianness, canceled: boolean): void;
1906
+ }
1907
+
1908
+ declare class EntityAttributes extends DataType {
1909
+ /**
1910
+ * The name of the attribute.
1911
+ */
1912
+ name: string;
1913
+ /**
1914
+ * The minimum value of the attribute.
1915
+ */
1916
+ min: number;
1917
+ /**
1918
+ * The current value of the attribute.
1919
+ */
1920
+ value: number;
1921
+ /**
1922
+ * The maximum value of the attribute.
1923
+ */
1924
+ max: number;
1925
+ /**
1926
+ * Construct an instance of the class.
1927
+ *
1928
+ * @param name - The name of the attribute.
1929
+ * @param min - The minimum value of the attribute.
1930
+ * @param value - The current value of the attribute.
1931
+ * @param max - The maximum value of the attribute.
1932
+ */
1933
+ constructor(name: string, min: number, value: number, max: number);
1934
+ /**
1935
+ * Read the attributes from the stream.
1936
+ *
1937
+ * @param stream - The stream to read the attributes from.
1938
+ * @returns An array of attributes.
1939
+ */
1940
+ static read(stream: BinaryStream): Array<EntityAttributes>;
1941
+ /**
1942
+ * Write the attributes to the stream.
1943
+ *
1944
+ * @param stream - The stream to write the attributes to.
1945
+ * @param value - The attributes to write.
1946
+ */
1947
+ static write(stream: BinaryStream, value: Array<EntityAttributes>): void;
1948
+ }
1949
+
1950
+ declare class StackRequestSlotInfo extends DataType {
1951
+ type: ContainerName;
1952
+ slot: number;
1953
+ stackId: number;
1954
+ constructor(type: number, slot: number, stackId: number);
1955
+ static read(stream: BinaryStream): StackRequestSlotInfo;
1956
+ static write(stream: BinaryStream, value: StackRequestSlotInfo): void;
1957
+ }
1958
+
1959
+ declare class NetworkItemInstanceDescriptor extends DataType {
1960
+ network: number;
1961
+ stackSize?: number;
1962
+ metadata?: number;
1963
+ blockRuntimeId?: number;
1964
+ extras?: ItemInstanceUserData | null;
1965
+ /**
1966
+ * Creates an instance of NetworkItemInstanceDescriptor.
1967
+ * @param id The network id of the item.
1968
+ * @param stackSize The size of the stack.
1969
+ * @param metadata The metadata of the item.
1970
+ * @param auxValue The aux value of the item.
1971
+ * @param userData The user data of the item.
1972
+ */
1973
+ constructor(network: number, stackSize?: number, metadata?: number, blockRuntimeId?: number, extras?: ItemInstanceUserData | null);
1974
+ static read(stream: BinaryStream): NetworkItemInstanceDescriptor;
1975
+ static write(stream: BinaryStream, value: NetworkItemInstanceDescriptor): void;
1976
+ }
1977
+
1978
+ interface ItemStackAction {
1979
+ cost?: number;
1980
+ count?: number;
1981
+ destination?: StackRequestSlotInfo;
1982
+ filterStringIndex?: number;
1983
+ networkId?: number;
1984
+ pattern?: string;
1985
+ predictedDurability?: number;
1986
+ primaryEffect?: number;
1987
+ randomly?: boolean;
1988
+ recipeNetworkId?: number;
1989
+ resultItems?: Array<NetworkItemInstanceDescriptor>;
1990
+ resultedSlotId?: number;
1991
+ runtimeId?: number;
1992
+ secondaryEffect?: number;
1993
+ source?: StackRequestSlotInfo;
1994
+ timesCrafted?: number;
1995
+ type: ItemStackActionType;
1996
+ unknown1?: number;
1997
+ }
1998
+ declare class ItemStackRequests extends DataType {
1999
+ id: number;
2000
+ actions: Array<ItemStackAction>;
2001
+ names: Array<string>;
2002
+ cause: number;
2003
+ constructor(id: number, actions: Array<ItemStackAction>, names: Array<string>, cause: number);
2004
+ static read(stream: BinaryStream): Array<ItemStackRequests>;
2005
+ }
2006
+
2007
+ interface ItemStackContainer {
2008
+ slots: Array<ContainerSlot>;
2009
+ type: ContainerName;
2010
+ }
2011
+ interface ContainerSlot {
2012
+ amount: number;
2013
+ durabilityCorrection: number;
2014
+ hotbarSlot: number;
2015
+ nametag: string;
2016
+ runtimeId: number;
2017
+ slot: number;
2018
+ }
2019
+ declare class ItemStackResponses extends DataType {
2020
+ status: ItemStackStatus;
2021
+ id: number;
2022
+ containers?: Array<ItemStackContainer>;
2023
+ constructor(status: number, id: number, containers?: Array<ItemStackContainer>);
2024
+ static read(stream: BinaryStream): Array<ItemStackResponses>;
2025
+ static write(stream: BinaryStream, value: Array<ItemStackResponses>): void;
2026
+ }
2027
+
2028
+ declare class ItemStacks extends DataType {
2029
+ static read(stream: BinaryStream): Array<NetworkItemStackDescriptor>;
2030
+ static write(stream: BinaryStream, value: Array<NetworkItemStackDescriptor>): void;
2031
+ }
2032
+
2033
+ declare class VariableStringArray extends DataType {
2034
+ static read(stream: BinaryStream): Array<string>;
2035
+ static write(stream: BinaryStream, value: Array<string>): void;
2036
+ }
2037
+
2038
+ declare class Enums extends DataType {
2039
+ name: string;
2040
+ values: Array<number>;
2041
+ constructor(name: string, values: Array<number>);
2042
+ static read(stream: BinaryStream, endian: Endianness, enumValues: Array<string>): Array<Enums>;
2043
+ static write(stream: BinaryStream, value: Array<Enums>, endian: Endianness, enumValues: Array<string>): void;
2044
+ }
2045
+
2046
+ interface SubcommandValue {
2047
+ index: number;
2048
+ value: number;
2049
+ }
2050
+ declare class Subcommands extends DataType {
2051
+ name: string;
2052
+ values: Array<SubcommandValue>;
2053
+ constructor(name: string, values: Array<SubcommandValue>);
2054
+ static read(stream: BinaryStream): Array<Subcommands>;
2055
+ static write(stream: BinaryStream, value: Array<Subcommands>): void;
2056
+ }
2057
+
2058
+ interface CommandsOverload {
2059
+ chaining: boolean;
2060
+ parameters: Array<OverloadParameter>;
2061
+ }
2062
+ interface OverloadParameter {
2063
+ enumType: number;
2064
+ name: string;
2065
+ optional: boolean;
2066
+ options: number;
2067
+ valueType: number;
2068
+ }
2069
+ declare class Commands extends DataType {
2070
+ name: string;
2071
+ description: string;
2072
+ flags: number;
2073
+ permissionLevel: number;
2074
+ alias: number;
2075
+ subcommands: Array<number>;
2076
+ overloads: Array<CommandsOverload>;
2077
+ constructor(name: string, description: string, flags: number, permissionLevel: number, alias: number, subcommands: Array<number>, overloads: Array<CommandsOverload>);
2078
+ static read(stream: BinaryStream): Array<Commands>;
2079
+ static write(stream: BinaryStream, value: Array<Commands>): void;
2080
+ }
2081
+
2082
+ declare class DynamicEnums extends DataType {
2083
+ name: string;
2084
+ values: Array<string>;
2085
+ constructor(name: string, values: Array<string>);
2086
+ static read(stream: BinaryStream): Array<DynamicEnums>;
2087
+ static write(stream: BinaryStream, value: Array<DynamicEnums>): void;
2088
+ }
2089
+
2090
+ declare class EnumConstraints extends DataType {
2091
+ valueIndex: number;
2092
+ enumIndex: number;
2093
+ constaints: Array<number>;
2094
+ constructor(valueIndex: number, enumIndex: number, constaints: Array<number>);
2095
+ static read(stream: BinaryStream): Array<EnumConstraints>;
2096
+ static write(stream: BinaryStream, value: Array<EnumConstraints>): void;
2097
+ }
2098
+
2099
+ declare class AnimateAction extends DataType {
2100
+ static read(stream: BinaryStream, endian: Endianness, id: AnimateId): number | null;
2101
+ static write(stream: BinaryStream, value: number | null): void;
2102
+ }
2103
+
2104
+ declare enum CommandOriginDataTypes {
2105
+ ORIGIN_PLAYER = 0,
2106
+ ORIGIN_BLOCK = 1,
2107
+ ORIGIN_MINECART_BLOCK = 2,
2108
+ ORIGIN_DEV_CONSOLE = 3,
2109
+ ORIGIN_TEST = 4,
2110
+ ORIGIN_AUTOMATION_PLAYER = 5,
2111
+ ORIGIN_CLIENT_AUTOMATION = 6,
2112
+ ORIGIN_DEDICATED_SERVER = 7,
2113
+ ORIGIN_ENTITY = 8,
2114
+ ORIGIN_VIRTUAL = 9,
2115
+ ORIGIN_GAME_ARGUMENT = 10,
2116
+ ORIGIN_ENTITY_SERVER = 11
2117
+ }
2118
+ declare class CommandOriginData extends DataType {
2119
+ origin: CommandOriginDataTypes;
2120
+ uuid: string;
2121
+ requestId: string;
2122
+ playerActorUniqueId: bigint;
2123
+ constructor(origin: CommandOriginDataTypes, uuid: string, requestId: string, playerActorUniqueId: bigint);
2124
+ static read(stream: BinaryStream): CommandOriginData;
2125
+ static write(stream: BinaryStream, value: CommandOriginData): void;
2126
+ }
2127
+
2128
+ declare class CommandOutputMessage extends DataType {
2129
+ isInternal: boolean;
2130
+ messageId: string;
2131
+ parameters: Array<string>;
2132
+ constructor(isInternal: boolean, messageId: string, parameters: Array<string>);
2133
+ static read(stream: BinaryStream): CommandOutputMessage;
2134
+ static write(stream: BinaryStream, value: CommandOutputMessage): void;
2135
+ }
2136
+
2137
+ declare enum CommandOutputType {
2138
+ TYPE_LAST = 0,
2139
+ TYPE_SILENT = 1,
2140
+ TYPE_ALL = 2,
2141
+ TYPE_DATA_SET = 3
2142
+ }
2143
+ declare class CommandOutputData extends DataType {
2144
+ originData: CommandOriginData;
2145
+ outputType: CommandOutputType;
2146
+ successCount: number;
2147
+ messages: Array<CommandOutputMessage>;
2148
+ data: string;
2149
+ constructor(originData: CommandOriginData, outputType: CommandOutputType, successCount: number, messages: Array<CommandOutputMessage>, data: string);
2150
+ static read(stream: BinaryStream): CommandOutputData;
2151
+ static write(stream: BinaryStream, value: CommandOutputData): void;
2152
+ }
2153
+
2154
+ declare class Rotation extends DataType {
2155
+ /**
2156
+ * The yaw of the vector.
2157
+ */
2158
+ yaw: number;
2159
+ /**
2160
+ * The pitch of the vector.
2161
+ */
2162
+ pitch: number;
2163
+ /**
2164
+ * The head yaw of the vector.
2165
+ */
2166
+ headYaw: number;
2167
+ /**
2168
+ * Rotation
2169
+ *
2170
+ * @param yaw The yaw of the vector.
2171
+ * @param pitch The pitch of the vector.
2172
+ * @param headYaw The head yaw of the vector.
2173
+ */
2174
+ constructor(yaw: number, pitch: number, headYaw: number);
2175
+ /**
2176
+ * Floors the coordinates of the 3D vector.
2177
+ *
2178
+ * @returns The 3D vector with the coordinates floored.
2179
+ */
2180
+ floor(): this;
2181
+ /**
2182
+ * Converts the rotation to a vector3f.
2183
+ *
2184
+ * @returns The vector3f that was converted.
2185
+ */
2186
+ static fromVector3f(vector: Vector3f): Rotation;
2187
+ /**
2188
+ * Reads a rotation from the stream.
2189
+ *
2190
+ * @param stream The stream to read from.
2191
+ * @returns The rotation that was read.
2192
+ */
2193
+ static read(stream: BinaryStream): Rotation;
2194
+ /**
2195
+ * Writes a rotation to the stream.
2196
+ *
2197
+ * @param stream The stream to write to.
2198
+ * @param value The rotation to write.
2199
+ */
2200
+ static write(stream: BinaryStream, value: Rotation): void;
2201
+ }
2202
+
2203
+ declare class CreativeItems extends DataType {
2204
+ static read(stream: BinaryStream): Array<NetworkItemInstanceDescriptor>;
2205
+ static write(stream: BinaryStream, value: Array<NetworkItemInstanceDescriptor>): void;
2206
+ }
2207
+
2208
+ declare class ComponentItem extends DataType {
2209
+ readonly name: string;
2210
+ readonly data: CompoundTag;
2211
+ constructor(name: string, data: CompoundTag);
2212
+ static read(stream: BinaryStream): Array<ComponentItem>;
2213
+ static write(stream: BinaryStream, value: Array<ComponentItem>): void;
2214
+ }
2215
+
2216
+ /**
2217
+ * Represents a Minecraft Bedrock Edition data packet
2218
+ */
2219
+ declare abstract class DataPacket extends BasePacket {
2220
+ static readonly id: Packet;
2221
+ static readonly id_type: typeof VarInt;
2222
+ serialize(): Buffer;
2223
+ deserialize(): this;
2224
+ }
2225
+
2226
+ declare class AddEntityPacket extends DataPacket {
2227
+ uniqueEntityId: bigint;
2228
+ runtimeId: bigint;
2229
+ identifier: string;
2230
+ position: Vector3f;
2231
+ velocity: Vector3f;
2232
+ pitch: number;
2233
+ yaw: number;
2234
+ headYaw: number;
2235
+ bodyYaw: number;
2236
+ attributes: Array<EntityAttributes>;
2237
+ metadata: Array<MetadataDictionary>;
2238
+ properties: EntityProperties;
2239
+ links: Array<Links>;
2240
+ }
2241
+
2242
+ declare class AddItemActorPacket extends DataPacket {
2243
+ uniqueId: bigint;
2244
+ runtimeId: bigint;
2245
+ item: NetworkItemStackDescriptor;
2246
+ position: Vector3f;
2247
+ velocity: Vector3f;
2248
+ metadata: Array<MetadataDictionary>;
2249
+ fromFishing: boolean;
2250
+ }
2251
+
2252
+ declare class AddPlayerPacket extends DataPacket {
2253
+ uuid: string;
2254
+ username: string;
2255
+ runtimeId: bigint;
2256
+ platformChatId: string;
2257
+ position: Vector3f;
2258
+ velocity: Vector3f;
2259
+ pitch: number;
2260
+ yaw: number;
2261
+ headYaw: number;
2262
+ heldItem: NetworkItemStackDescriptor;
2263
+ gamemode: Gamemode;
2264
+ metadata: Array<MetadataDictionary>;
2265
+ properties: EntityProperties;
2266
+ uniqueEntityId: bigint;
2267
+ premissionLevel: PermissionLevel;
2268
+ commandPermission: CommandPermissionLevel;
2269
+ abilities: Array<AbilityLayers>;
2270
+ links: Array<Links>;
2271
+ deviceId: string;
2272
+ deviceOS: DeviceOS;
2273
+ }
2274
+
2275
+ declare class AnimatePacket extends DataPacket {
2276
+ id: AnimateId;
2277
+ runtimeEntityId: bigint;
2278
+ boatRowingTime: number | null;
2279
+ }
2280
+
2281
+ declare class AvailableCommandsPacket extends DataPacket {
2282
+ enumValues: Array<string>;
2283
+ subcommandValues: Array<string>;
2284
+ suffixes: Array<string>;
2285
+ enums: Array<Enums>;
2286
+ subcommands: Array<Subcommands>;
2287
+ commands: Array<Commands>;
2288
+ dynamicEnums: Array<DynamicEnums>;
2289
+ enumConstraints: Array<EnumConstraints>;
2290
+ }
2291
+
2292
+ declare class BiomeDefinitionListPacket extends DataPacket {
2293
+ biomes: Buffer$1;
2294
+ serialize(): Buffer$1;
2295
+ deserialize(): this;
2296
+ }
2297
+
2298
+ declare class BlockPickRequestPacket extends DataPacket {
2299
+ x: number;
2300
+ y: number;
2301
+ z: number;
2302
+ addData: boolean;
2303
+ selectedSlot: number;
2304
+ }
2305
+
2306
+ declare class ChangeDimensionPacket extends DataPacket {
2307
+ dimension: DimensionType;
2308
+ position: Vector3f;
2309
+ respawn: boolean;
2310
+ }
2311
+
2312
+ declare class ChunkRadiusUpdatePacket extends DataPacket {
2313
+ radius: number;
2314
+ }
2315
+
2316
+ declare class CommandOutputPacket extends DataPacket {
2317
+ originData: CommandOutputData;
2318
+ }
2319
+
2320
+ declare class CommandRequestPacket extends DataPacket {
2321
+ rawCommand: string;
2322
+ originData: CommandOriginData;
2323
+ isInternal: boolean;
2324
+ version: number;
2325
+ }
2326
+
2327
+ declare class ContainerClosePacket extends DataPacket {
2328
+ containerId: ContainerId;
2329
+ serverInitiated: boolean;
2330
+ }
2331
+
2332
+ declare class ContainerOpenPacket extends DataPacket {
2333
+ containerId: ContainerId;
2334
+ containerType: ContainerType;
2335
+ position: BlockCoordinates;
2336
+ targetRuntimeEntityId: bigint;
2337
+ }
2338
+
2339
+ declare class CreativeContentPacket extends DataPacket {
2340
+ items: Array<NetworkItemInstanceDescriptor>;
2341
+ }
2342
+
2343
+ declare class DisconnectPacket extends DataPacket {
2344
+ reason: DisconnectReason;
2345
+ hideDisconnectScreen: boolean;
2346
+ message: string;
2347
+ }
2348
+
2349
+ declare class InteractPacket extends DataPacket {
2350
+ action: InteractActions;
2351
+ targetUniqueEntityId: bigint;
2352
+ position: Vector3f;
2353
+ }
2354
+
2355
+ declare class InventoryContentPacket extends DataPacket {
2356
+ containerId: ContainerId;
2357
+ items: Array<NetworkItemStackDescriptor>;
2358
+ }
2359
+
2360
+ declare class InventorySlotPacket extends DataPacket {
2361
+ containerId: ContainerId;
2362
+ slot: number;
2363
+ item: NetworkItemStackDescriptor;
2364
+ }
2365
+
2366
+ declare class InventoryTransactionPacket extends DataPacket {
2367
+ legacy: TransactionLegacy;
2368
+ type: TransactionType;
2369
+ actions: Array<TransactionActions>;
2370
+ data: TransactionData;
2371
+ }
2372
+
2373
+ declare class ItemComponentPacket extends DataPacket {
2374
+ items: Array<ComponentItem>;
2375
+ }
2376
+
2377
+ declare class ItemStackRequestPacket extends DataPacket {
2378
+ requests: Array<ItemStackRequests>;
2379
+ }
2380
+
2381
+ declare class ItemStackResponsePacket extends DataPacket {
2382
+ responses: Array<ItemStackResponses>;
2383
+ }
2384
+
2385
+ declare class LevelChunkPacket extends DataPacket {
2386
+ x: number;
2387
+ z: number;
2388
+ dimension: DimensionType;
2389
+ subChunkCount: number;
2390
+ cacheEnabled: boolean;
2391
+ blobs: Array<bigint>;
2392
+ data: Buffer$1;
2393
+ serialize(): Buffer$1;
2394
+ deserialize(): this;
2395
+ }
2396
+
2397
+ declare class LevelEventPacket extends DataPacket {
2398
+ event: LevelEvent;
2399
+ position: Vector3f;
2400
+ data: number;
2401
+ }
2402
+
2403
+ declare class LevelSoundEventPacket extends DataPacket {
2404
+ event: LevelSoundEvent;
2405
+ position: Vector3f;
2406
+ data: number;
2407
+ actorIdentifier: string;
2408
+ isBabyMob: boolean;
2409
+ isGlobal: boolean;
2410
+ }
2411
+
2412
+ declare class LoginPacket extends DataPacket {
2413
+ protocol: number;
2414
+ tokens: LoginTokens;
2415
+ }
2416
+
2417
+ declare class MobEquipmentPacket extends DataPacket {
2418
+ runtimeEntityId: bigint;
2419
+ item: NetworkItemStackDescriptor;
2420
+ slot: number;
2421
+ selectedSlot: number;
2422
+ containerId: ContainerId;
2423
+ }
2424
+
2425
+ declare class ModalFormRequestPacket extends DataPacket {
2426
+ id: number;
2427
+ payload: string;
2428
+ }
2429
+
2430
+ declare class ModalFormResponsePacket extends DataPacket {
2431
+ id: number;
2432
+ response: boolean;
2433
+ data: string | null;
2434
+ canceled: boolean;
2435
+ reason: ModalFormCanceledReason | null;
2436
+ }
2437
+
2438
+ declare class MoveActorAbsolutePacket extends DataPacket {
2439
+ runtimeId: bigint;
2440
+ flags: number;
2441
+ position: Vector3f;
2442
+ rotation: Rotation;
2443
+ }
2444
+
2445
+ declare class MovePlayerPacket extends DataPacket {
2446
+ runtimeId: bigint;
2447
+ position: Vector3f;
2448
+ pitch: number;
2449
+ yaw: number;
2450
+ headYaw: number;
2451
+ mode: MoveMode;
2452
+ onGround: boolean;
2453
+ riddenRuntimeId: bigint;
2454
+ cause: TeleportCause | null;
2455
+ tick: bigint;
2456
+ }
2457
+
2458
+ declare class NetworkChunkPublisherUpdatePacket extends DataPacket {
2459
+ coordinate: BlockCoordinates;
2460
+ radius: number;
2461
+ savedChunks: Array<ChunkCoords>;
2462
+ }
2463
+
2464
+ declare class NetworkSettingsPacket extends DataPacket {
2465
+ compressionThreshold: number;
2466
+ compressionMethod: CompressionMethod;
2467
+ clientThrottle: boolean;
2468
+ clientThreshold: number;
2469
+ clientScalar: number;
2470
+ }
2471
+
2472
+ declare class PacketViolationWarningPacket extends DataPacket {
2473
+ type: ViolationType;
2474
+ severity: ViolationSeverity;
2475
+ packet: Packet;
2476
+ context: string;
2477
+ }
2478
+
2479
+ declare class PlayStatusPacket extends DataPacket {
2480
+ status: PlayStatus;
2481
+ }
2482
+
2483
+ declare class PlayerActionPacket extends DataPacket {
2484
+ entityRuntimeId: bigint;
2485
+ action: ActionIds;
2486
+ blockPosition: BlockCoordinates;
2487
+ resultPosition: BlockCoordinates;
2488
+ face: number;
2489
+ }
2490
+
2491
+ declare class PlayerAuthInputPacket extends DataPacket {
2492
+ pitch: number;
2493
+ yaw: number;
2494
+ position: Vector3f;
2495
+ motion: Vector2f;
2496
+ headYaw: number;
2497
+ inputData: bigint;
2498
+ inputMode: number;
2499
+ }
2500
+
2501
+ declare class PlayerHotbarPacket extends DataPacket {
2502
+ selectedSlot: number;
2503
+ windowId: number;
2504
+ selectSlot: boolean;
2505
+ }
2506
+
2507
+ declare class PlayerListPacket extends DataPacket {
2508
+ action: RecordAction;
2509
+ records: Array<Records>;
2510
+ }
2511
+
2512
+ declare class RemoveEntityPacket extends DataPacket {
2513
+ uniqueEntityId: bigint;
2514
+ }
2515
+
2516
+ declare class RequestChunkRadiusPacket extends DataPacket {
2517
+ radius: number;
2518
+ maxRadius: number;
2519
+ }
2520
+
2521
+ declare class RequestNetworkSettingsPacket extends DataPacket {
2522
+ protocol: number;
2523
+ }
2524
+
2525
+ declare class ResourcePackClientResponsePacket extends DataPacket {
2526
+ response: ResourcePackResponse;
2527
+ packs: Array<string>;
2528
+ }
2529
+
2530
+ declare class ResourcePackStackPacket extends DataPacket {
2531
+ mustAccept: boolean;
2532
+ behaviorPacks: Array<ResourceIdVersions>;
2533
+ texturePacks: Array<ResourceIdVersions>;
2534
+ gameVersion: string;
2535
+ experiments: Array<Experiments>;
2536
+ experimentsPreviouslyToggled: boolean;
2537
+ }
2538
+
2539
+ declare class ResourcePacksInfoPacket extends DataPacket {
2540
+ mustAccept: boolean;
2541
+ hasAddons: boolean;
2542
+ hasScripts: boolean;
2543
+ forceServerPacks: boolean;
2544
+ behaviorPacks: Array<BehaviorPackInfo>;
2545
+ texturePacks: Array<TexturePackInfo>;
2546
+ links: Array<PackLinks>;
2547
+ }
2548
+
2549
+ declare class RespawnPacket extends DataPacket {
2550
+ position: Vector3f;
2551
+ state: RespawnState;
2552
+ runtimeEntityId: bigint;
2553
+ }
2554
+
2555
+ declare class ScriptMessagePacket extends DataPacket {
2556
+ messageId: string;
2557
+ data: string;
2558
+ }
2559
+
2560
+ declare class SetActorMotionPacket extends DataPacket {
2561
+ runtimeId: bigint;
2562
+ motion: Vector3f;
2563
+ tick: bigint;
2564
+ }
2565
+
2566
+ declare class SetCommandsEnabledPacket extends DataPacket {
2567
+ enabled: boolean;
2568
+ }
2569
+
2570
+ declare class SetEntityDataPacket extends DataPacket {
2571
+ runtimeEntityId: bigint;
2572
+ metadata: Array<MetadataDictionary>;
2573
+ properties: EntityProperties;
2574
+ tick: bigint;
2575
+ }
2576
+
2577
+ declare class SetLocalPlayerAsInitializedPacket extends DataPacket {
2578
+ runtimeEntityId: bigint;
2579
+ }
2580
+
2581
+ declare class SetPlayerGameTypePacket extends DataPacket {
2582
+ gamemode: Gamemode;
2583
+ }
2584
+
2585
+ declare class SetTitlePacket extends DataPacket {
2586
+ type: TitleTypes;
2587
+ text: string;
2588
+ fadeInTime: number;
2589
+ stayTime: number;
2590
+ fadeOutTime: number;
2591
+ xuid: string;
2592
+ platformOnlineId: string;
2593
+ }
2594
+
2595
+ declare class StartGamePacket extends DataPacket {
2596
+ entityId: bigint;
2597
+ runtimeEntityId: bigint;
2598
+ playerGamemode: Gamemode;
2599
+ playerPosition: Vector3f;
2600
+ pitch: number;
2601
+ yaw: number;
2602
+ seed: bigint;
2603
+ biomeType: number;
2604
+ biomeName: string;
2605
+ dimension: number;
2606
+ generator: number;
2607
+ worldGamemode: Gamemode;
2608
+ difficulty: Difficulty;
2609
+ spawnPosition: BlockCoordinates;
2610
+ achievementsDisabled: boolean;
2611
+ editorWorldType: number;
2612
+ createdInEdior: boolean;
2613
+ exportedFromEdior: boolean;
2614
+ dayCycleStopTime: number;
2615
+ eduOffer: number;
2616
+ eduFeatures: boolean;
2617
+ eduProductUuid: string;
2618
+ rainLevel: number;
2619
+ lightningLevel: number;
2620
+ confirmedPlatformLockedContent: boolean;
2621
+ multiplayerGame: boolean;
2622
+ broadcastToLan: boolean;
2623
+ xblBroadcastMode: number;
2624
+ platformBroadcastMode: number;
2625
+ commandsEnabled: boolean;
2626
+ texturePacksRequired: boolean;
2627
+ gamerules: Array<GameRules>;
2628
+ experiments: Array<Experiments>;
2629
+ experimentsPreviouslyToggled: boolean;
2630
+ bonusChest: boolean;
2631
+ mapEnabled: boolean;
2632
+ permissionLevel: PermissionLevel;
2633
+ serverChunkTickRange: number;
2634
+ hasLockedBehaviorPack: boolean;
2635
+ hasLockedResourcePack: boolean;
2636
+ isFromLockedWorldTemplate: boolean;
2637
+ useMsaGamertagsOnly: boolean;
2638
+ isFromWorldTemplate: boolean;
2639
+ isWorldTemplateOptionLocked: boolean;
2640
+ onlySpawnV1Villagers: boolean;
2641
+ personaDisabled: boolean;
2642
+ customSkinsDisabled: boolean;
2643
+ emoteChatMuted: boolean;
2644
+ gameVersion: string;
2645
+ limitedWorldWidth: number;
2646
+ limitedWorldLength: number;
2647
+ isNewNether: boolean;
2648
+ eduResourceUriButtonName: string;
2649
+ eduResourceUriLink: string;
2650
+ experimentalGameplayOverride: boolean;
2651
+ chatRestrictionLevel: number;
2652
+ disablePlayerInteractions: boolean;
2653
+ levelId: string;
2654
+ worldName: string;
2655
+ premiumWorldTemplateId: string;
2656
+ isTrial: boolean;
2657
+ movementAuthority: number;
2658
+ rewindHistorySize: number;
2659
+ serverAuthoritativeBlockBreaking: boolean;
2660
+ currentTick: bigint;
2661
+ enchantmentSeed: number;
2662
+ blockProperties: Array<BlockProperties>;
2663
+ items: Array<ItemData>;
2664
+ multiplayerCorrelationId: string;
2665
+ serverAuthoritativeInventory: boolean;
2666
+ engine: string;
2667
+ propertyData1: unknown;
2668
+ propertyData2: unknown;
2669
+ propertyData3: unknown;
2670
+ blockPaletteChecksum: bigint;
2671
+ worldTemplateId: string;
2672
+ clientSideGeneration: boolean;
2673
+ blockNetworkIdsAreHashes: boolean;
2674
+ serverControlledSounds: boolean;
2675
+ }
2676
+
2677
+ declare class TextPacket extends DataPacket {
2678
+ type: TextPacketType;
2679
+ needsTranslation: boolean;
2680
+ source: string | null;
2681
+ message: string;
2682
+ parameters: Array<string> | null;
2683
+ xuid: string;
2684
+ platformChatId: string;
2685
+ }
2686
+
2687
+ declare class ToastRequestPacket extends DataPacket {
2688
+ title: string;
2689
+ message: string;
2690
+ }
2691
+
2692
+ declare class UpdateAbilitiesPacket extends DataPacket {
2693
+ entityUniqueId: bigint;
2694
+ permissionLevel: PermissionLevel;
2695
+ commandPersmissionLevel: CommandPermissionLevel;
2696
+ abilities: Array<AbilityLayers>;
2697
+ }
2698
+
2699
+ declare class UpdateAdventureSettingsPacket extends DataPacket {
2700
+ noPvm: boolean;
2701
+ noPvp: boolean;
2702
+ immutableWorld: boolean;
2703
+ showNameTags: boolean;
2704
+ autoJump: boolean;
2705
+ }
2706
+
2707
+ declare class UpdateAttributesPacket extends DataPacket {
2708
+ runtimeEntityId: bigint;
2709
+ attributes: Array<PlayerAttributes>;
2710
+ tick: bigint;
2711
+ }
2712
+
2713
+ declare class UpdateBlockPacket extends DataPacket {
2714
+ position: BlockCoordinates;
2715
+ blockRuntimeId: number;
2716
+ flags: UpdateBlockFlagsType;
2717
+ layer: UpdateBlockLayerType;
2718
+ }
2719
+
2720
+ declare const Packets: {
2721
+ 1: typeof LoginPacket;
2722
+ 2: typeof PlayStatusPacket;
2723
+ 5: typeof DisconnectPacket;
2724
+ 6: typeof ResourcePacksInfoPacket;
2725
+ 7: typeof ResourcePackStackPacket;
2726
+ 8: typeof ResourcePackClientResponsePacket;
2727
+ 9: typeof TextPacket;
2728
+ 11: typeof StartGamePacket;
2729
+ 12: typeof AddPlayerPacket;
2730
+ 13: typeof AddEntityPacket;
2731
+ 14: typeof RemoveEntityPacket;
2732
+ 15: typeof AddItemActorPacket;
2733
+ 18: typeof MoveActorAbsolutePacket;
2734
+ 19: typeof MovePlayerPacket;
2735
+ 21: typeof UpdateBlockPacket;
2736
+ 25: typeof LevelEventPacket;
2737
+ 29: typeof UpdateAttributesPacket;
2738
+ 30: typeof InventoryTransactionPacket;
2739
+ 31: typeof MobEquipmentPacket;
2740
+ 33: typeof InteractPacket;
2741
+ 34: typeof BlockPickRequestPacket;
2742
+ 36: typeof PlayerActionPacket;
2743
+ 39: typeof SetEntityDataPacket;
2744
+ 40: typeof SetActorMotionPacket;
2745
+ 44: typeof AnimatePacket;
2746
+ 45: typeof RespawnPacket;
2747
+ 46: typeof ContainerOpenPacket;
2748
+ 47: typeof ContainerClosePacket;
2749
+ 48: typeof PlayerHotbarPacket;
2750
+ 49: typeof InventoryContentPacket;
2751
+ 50: typeof InventorySlotPacket;
2752
+ 58: typeof LevelChunkPacket;
2753
+ 59: typeof SetCommandsEnabledPacket;
2754
+ 61: typeof ChangeDimensionPacket;
2755
+ 62: typeof SetPlayerGameTypePacket;
2756
+ 63: typeof PlayerListPacket;
2757
+ 69: typeof RequestChunkRadiusPacket;
2758
+ 70: typeof ChunkRadiusUpdatePacket;
2759
+ 76: typeof AvailableCommandsPacket;
2760
+ 77: typeof CommandRequestPacket;
2761
+ 79: typeof CommandOutputPacket;
2762
+ 88: typeof SetTitlePacket;
2763
+ 100: typeof ModalFormRequestPacket;
2764
+ 101: typeof ModalFormResponsePacket;
2765
+ 113: typeof SetLocalPlayerAsInitializedPacket;
2766
+ 121: typeof NetworkChunkPublisherUpdatePacket;
2767
+ 122: typeof BiomeDefinitionListPacket;
2768
+ 123: typeof LevelSoundEventPacket;
2769
+ 143: typeof NetworkSettingsPacket;
2770
+ 144: typeof PlayerAuthInputPacket;
2771
+ 145: typeof CreativeContentPacket;
2772
+ 147: typeof ItemStackRequestPacket;
2773
+ 148: typeof ItemStackResponsePacket;
2774
+ 156: typeof PacketViolationWarningPacket;
2775
+ 162: typeof ItemComponentPacket;
2776
+ 177: typeof ScriptMessagePacket;
2777
+ 186: typeof ToastRequestPacket;
2778
+ 187: typeof UpdateAbilitiesPacket;
2779
+ 188: typeof UpdateAdventureSettingsPacket;
2780
+ 193: typeof RequestNetworkSettingsPacket;
2781
+ };
2782
+
2783
+ declare function VarintArray<T extends typeof DataType>(type: T): T;
2784
+
2785
+ declare class Framer {
2786
+ static unframe(buffer: Buffer): Array<Buffer>;
2787
+ static frame(...buffers: Array<Buffer>): Buffer;
2788
+ }
2789
+
2790
+ /**
2791
+ * Get the packet ID from a buffer. ( VarInt )
2792
+ *
2793
+ * @param buffer
2794
+ * @returns {number}
2795
+ */
2796
+ declare function getPacketId(buffer: Buffer): Packet;
2797
+
2798
+ declare const PROTOCOL_VERSION = 662;
2799
+ declare const MINECRAFT_VERSION = "1.20.71";
2800
+ declare const MINECRAFT_TICK_SPEED = 50;
2801
+
2802
+ export { AbilityLayerFlag, AbilityLayerType, AbilityLayers, AbilitySet, ActionIds, AddEntityPacket, AddItemActorPacket, AddPlayerPacket, AnimateAction, AnimateId, AnimatePacket, Attribute, AvailableCommandsPacket, BehaviorPackInfo, BiomeDefinitionListPacket, BlockCoordinates, BlockPickRequestPacket, BlockProperties, ChangeDimensionPacket, ChunkCoords, ChunkRadiusUpdatePacket, CommandOriginData, CommandOutputData, CommandOutputMessage, CommandOutputPacket, CommandParameterType, CommandPermissionLevel, CommandRequestPacket, Commands, ComponentItem, CompressionMethod, ContainerClosePacket, ContainerId, ContainerName, ContainerOpenPacket, ContainerType, CreativeContentPacket, CreativeItems, DataPacket, DeviceOS, Difficulty, DimensionType, DisconnectPacket, DisconnectReason, DynamicEnums, EntityAttributes, EntityProperties, EnumConstraints, Enums, Experiments, FormType, Framer, GameRuleType, GameRules, Gamemode, InteractActions, InteractPacket, InteractPosition, InventoryContentPacket, InventorySlotPacket, InventoryTransactionPacket, ItemComponentPacket, ItemData, ItemInstanceUserData, ItemReleaseAction, type ItemStackAction, ItemStackActionType, type ItemStackContainer, ItemStackRequestPacket, ItemStackRequests, ItemStackResponsePacket, ItemStackResponses, ItemStackStatus, ItemStacks, LevelChunkPacket, LevelEvent, LevelEventPacket, LevelSoundEvent, LevelSoundEventPacket, Links, LoginPacket, LoginTokens, MINECRAFT_TICK_SPEED, MINECRAFT_VERSION, MetadataDictionary, MetadataFlags, MetadataKey, MetadataType, MobEquipmentPacket, ModalFormCanceled, ModalFormCanceledReason, ModalFormData, ModalFormRequestPacket, ModalFormResponsePacket, MoveActorAbsolutePacket, MoveMode, MovePlayerPacket, NetworkChunkPublisherUpdatePacket, NetworkItemInstanceDescriptor, NetworkItemStackDescriptor, NetworkSettingsPacket, PROTOCOL_VERSION, PackLinks, Packet, PacketViolationWarningPacket, Packets, PermissionLevel, PlayStatus, PlayStatusPacket, PlayerActionPacket, PlayerAttributes, PlayerAuthInputPacket, PlayerHotbarPacket, PlayerListPacket, RecordAction, Records, RemoveEntityPacket, RequestChunkRadiusPacket, RequestNetworkSettingsPacket, ResourceIdVersions, ResourcePackClientResponsePacket, ResourcePackIds, ResourcePackResponse, ResourcePackStackPacket, ResourcePacksInfoPacket, RespawnPacket, RespawnState, Rotation, ScriptMessagePacket, SetActorMotionPacket, SetCommandsEnabledPacket, SetEntityDataPacket, SetLocalPlayerAsInitializedPacket, SetPlayerGameTypePacket, SetTitlePacket, StackRequestSlotInfo, StartGamePacket, Subcommands, TeleportCause, TextPacket, TextPacketType, TextParameters, TextSource, TexturePackInfo, TitleTypes, ToastRequestPacket, TransactionActions, TransactionData, TransactionItemRelease, TransactionLegacy, TransactionSourceType, TransactionType, TransactionUseItem, TransactionUseItemOnEntity, UpdateAbilitiesPacket, UpdateAdventureSettingsPacket, UpdateAttributesPacket, UpdateBlockFlagsType, UpdateBlockLayerType, UpdateBlockPacket, UseItemAction, UseItemOnEntityAction, VariableStringArray as VarStringArray, VarintArray, Vector2f, Vector3f, ViolationSeverity, ViolationType, getPacketId };