-
-
Notifications
You must be signed in to change notification settings - Fork 223
/
Copy pathtypes.yml
2477 lines (2394 loc) · 74.8 KB
/
types.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
!StartDocs: Types
TexturePackInfos: []li16
uuid: uuid
version: string
size: lu64
content_key: string
sub_pack_name: string
content_identity: string
has_scripts: bool
addon_pack: bool
rtx_enabled: bool
# cdn_url is a URL that the client can use to download the pack instead of the server sending it in
# chunks, which it will continue to do if this field is left empty.
cdn_url: string
ResourcePackIdVersions: []varint
# The ID of the resource pack.
uuid: string
# The version of the resource pack.
version: string
# The subpack name of the resource pack.
name: string
ResourcePackIds: string[]li16
Experiment:
name: string
enabled: bool
Experiments: Experiment[]li32
GameMode: zigzag32 =>
0: survival
1: creative
2: adventure
3: survival_spectator
4: creative_spectator
5: fallback
6: spectator
GameRule:
name: string
editable: bool
type: varint =>
1: bool
2: int
3: float
value: type?
if bool: bool
if int: zigzag32
if float: lf32
GameRules: GameRule[]varint
# CacheBlob represents a blob as used in the client side blob cache protocol. It holds a hash of its data and
# the full data of it.
Blob:
# Hash is the hash of the blob. The hash is computed using xxHash, and must be deterministic for the same
# chunk data.
hash: lu64
# Payload is the data of the blob. When sent, the client will associate the Hash of the blob with the
# Payload in it.
payload: ByteArray
BlockProperties: []varint
name: string
state: nbt
Itemstates: []varint
name: string
runtime_id: li16
component_based: bool
# Version is the version of the item entry which is used by the client to determine how to handle the
# item entry. It is one of the constants above.
version: zigzag32 =>
- legacy
- data_driven
- none
# Components on the item
nbt: nbt
ItemExtraDataWithBlockingTick:
has_nbt: lu16 =>
0xffff: 'true'
0x0000: 'false'
nbt: has_nbt ?
if true:
version: u8
nbt: lnbt
default: void
can_place_on: ShortString[]li32
can_destroy: ShortString[]li32
blocking_tick: li64
ItemExtraDataWithoutBlockingTick:
has_nbt: lu16 =>
0xffff: 'true'
0x0000: 'false'
nbt: has_nbt ?
if true:
version: u8
nbt: lnbt
default: void
can_place_on: ShortString[]li32
can_destroy: ShortString[]li32
# Same as below but without a "networkStackID" boolean
ItemLegacy:
network_id: zigzag32
_: network_id?
if 0: void
default:
count: lu16
metadata: varint
block_runtime_id: zigzag32
extra: network_id ?
# The Shield Item ID is sent in the StartGame packet. It is usually 355 in vanilla.
if /ShieldItemID: '["encapsulated", { "lengthType": "varint", "type": "ItemExtraDataWithBlockingTick" }]'
default: '["encapsulated", { "lengthType": "varint", "type": "ItemExtraDataWithoutBlockingTick" }]'
# An "ItemStack" here represents an Item instance. You can think about it like a pointer
# to an item class. The data for the class gets updated with the data in the `item` field
# As of 1.16.220, now functionally the same as `Item` just without an extra boolean when
# server auth inventories is disabled.
Item:
network_id: zigzag32
_: network_id?
if 0: void
default:
count: lu16
metadata: varint
# When server authoritative inventory is enabled, all allocated items have a unique ID used to identify
# a specifc item instance.
has_stack_id: u8
# StackNetworkID is the network ID of this item *instance*. If the stack is empty, 0 is always written for this
# field. If not, the field should be set to 1 if the server authoritative inventories are disabled in the
# StartGame packet, or to a unique stack ID if it is enabled.
stack_id: has_stack_id ?
if 0: void
default: zigzag32
block_runtime_id: zigzag32
extra: network_id ?
# The Shield Item ID is sent in the StartGame packet. It is usually 355 in vanilla.
## Really bad compiler hack to allow us to use a global variable
if /ShieldItemID: '["encapsulated", { "lengthType": "varint", "type": "ItemExtraDataWithBlockingTick" }]'
default: '["encapsulated", { "lengthType": "varint", "type": "ItemExtraDataWithoutBlockingTick" }]'
vec3i:
x: zigzag32
y: zigzag32
z: zigzag32
vec3li:
x: li32
y: li32
z: li32
vec3u:
x: varint
y: varint
z: varint
vec3f:
x: lf32
y: lf32
z: lf32
vec2f:
x: lf32
z: lf32
Vec3fopts:
x?: lf32
y?: lf32
z?: lf32
Vec2fopts:
x?: lf32
y?: lf32
MetadataDictionary: []varint
# https://github.com/pmmp/PocketMine-MP/blob/stable/src/pocketmine/entity/Entity.php#L101
key: varint =>
0: flags
1: health #int (minecart/boat)
2: variant #int
3: color #byte
4: nametag #string
5: owner_eid #long
6: target_eid #long
7: air #short
8: potion_color #int (ARGB!)
9: potion_ambient #byte
10: jump_duration #long
11: hurt_time #int (minecart/boat)
12: hurt_direction #int (minecart/boat)
13: paddle_time_left #float
14: paddle_time_right #float
15: experience_value #int (xp orb)
16: minecart_display_block #int (id | (data << 16))
17: minecart_display_offset #int
18: minecart_has_display #byte (must be 1 for minecart to show block inside)
19: horse_type
20: creeper_swell
21: creeper_swell_direction
22: charge_amount
23: enderman_held_runtime_id #short
24: entity_age #short
26: player_flags
27: player_index
28: player_bed_position #block coords
29: fireball_power_x #float
30: fireball_power_y
31: fireball_power_z
32: aux_power
33: fish_x
34: fish_z
35: fish_angle
36: potion_aux_value #short
37: lead_holder_eid #long
38: scale
39: interactive_tag #string
40: npc_skin_id #string
41: url_tag #string
42: max_airdata_max_air
43: mark_variant #int
44: container_type #byte
45: container_base_size #int
46: container_extra_slots_per_strength #int
47: block_target
48: wither_invulnerable_ticks #int
49: wither_target_1 #long
50: wither_target_2 #long
51: wither_target_3 #long
52: wither_aerial_attack
53: boundingbox_width
54: boundingbox_height
55: fuse_length
56: rider_seat_position #vector3f
57: rider_rotation_locked #byte
58: rider_max_rotation #float
59: rider_min_rotation #float
60: rider_seat_rotation_offset
61: area_effect_cloud_radius #float
62: area_effect_cloud_waiting #int
63: area_effect_cloud_particle_id #int
64: shulker_peek_id #int
65: shulker_attach_face #byte
66: shulker_attached #short
67: shulker_attach_pos
68: trading_player_eid #long
69: trading_career
70: has_command_block
71: command_block_command #string
72: command_block_last_output #string
73: command_block_track_output #byte
74: controlling_rider_seat_number #byte
75: strength #int
76: max_strength #int
77: evoker_spell_casting_color #int
78: limited_life
79: armor_stand_pose_index # int
80: ender_crystal_time_offset # int
81: always_show_nametag # byte
82: color_2 # byte
83: name_author
84: score_tag #String
85: balloon_attached_entity # long
86: pufferfish_size
87: bubble_time
88: agent
89: sitting_amount
90: sitting_amount_previous
91: eating_counter
92: flags_extended
93: laying_amount
94: laying_amount_previous
95: area_effect_cloud_duration
96: area_effect_cloud_spawn_time
97: area_effect_cloud_change_rate
98: area_effect_cloud_change_on_pickup
99: area_effect_cloud_pickup_count
100: interact_text
101: trade_tier
102: max_trade_tier
103: trade_experience
104: skin_id
105: spawning_frames
106: command_block_tick_delay
107: command_block_execute_on_first_tick
108: ambient_sound_interval
109: ambient_sound_interval_range
110: ambient_sound_event_name
111: fall_damage_multiplier
112: name_raw_text
113: can_ride_target
114: low_tier_cured_discount
115: high_tier_cured_discount
116: nearby_cured_discount
117: nearby_cured_discount_timestamp
118: hitbox
119: is_buoyant
120: freezing_effect_strength
121: buoyancy_data
122: goat_horn_count
123: update_properties
124: movement_sound_distance_offset
125: heartbeat_interval_ticks
126: heartbeat_sound_event
127: player_last_death_position
128: player_last_death_dimension
129: player_has_died
130: collision_box
131: visible_mob_effects # long
132: filtered_name # string
133: bed_enter_position # blockpos
type: varint =>
0: byte
1: short
2: int
3: float
4: string
5: compound
6: vec3i
7: long
8: vec3f
value: key ?
if flags: MetadataFlags1
if flags_extended: MetadataFlags2
default: type ?
if byte: i8
if short: li16
if int: zigzag32
if float: lf32
if string: string
if compound: nbt
if vec3i: vec3i
if long: zigzag64
if vec3f: vec3f
MetadataFlags1: [ "bitflags", {
"type": "zigzag64",
"big": true,
"flags": [
"onfire",
"sneaking",
"riding",
"sprinting",
"action",
"invisible",
"tempted",
"inlove",
"saddled",
"powered",
"ignited",
"baby",
"converting",
"critical",
"can_show_nametag",
"always_show_nametag",
"no_ai",
"silent",
"wallclimbing",
"can_climb",
"swimmer",
"can_fly",
"walker",
"resting",
"sitting",
"angry",
"interested",
"charged",
"tamed",
"orphaned",
"leashed",
"sheared",
"gliding",
"elder",
"moving",
"breathing",
"chested",
"stackable",
"showbase",
"rearing",
"vibrating",
"idling",
"evoker_spell",
"charge_attack",
"wasd_controlled",
"can_power_jump",
"can_dash",
"linger",
"has_collision",
"affected_by_gravity",
"fire_immune",
"dancing",
"enchanted",
"show_trident_rope", # tridents show an animated rope when enchanted with loyalty after they are thrown and return to their owner. to be combined with data_owner_eid
"container_private", #inventory is private, doesn't drop contents when killed if true
"transforming",
"spin_attack",
"swimming",
"bribed", #dolphins have this set when they go to find treasure for the player
"pregnant",
"laying_egg",
"rider_can_pick", #???
"transition_sitting",
"eating",
"laying_down"
]
}]
MetadataFlags2: [ "bitflags", {
"type": "zigzag64",
"big": true,
"flags": [
"sneezing",
"trusting",
"rolling",
"scared",
"in_scaffolding",
"over_scaffolding",
"fall_through_scaffolding",
"blocking", #shield
"transition_blocking",
"blocked_using_shield",
"blocked_using_damaged_shield",
"sleeping",
"wants_to_wake",
"trade_interest",
"door_breaker", #...
"breaking_obstruction",
"door_opener", #...
"illager_captain",
"stunned",
"roaring",
"delayed_attacking",
"avoiding_mobs",
"avoiding_block",
"facing_target_to_range_attack",
"hidden_when_invisible", #??????????????????
"is_in_ui",
"stalking",
"emoting",
"celebrating",
"admiring",
"celebrating_special",
"unknown95", # 95
"ram_attack",
"playing_dead",
"in_ascendable_block",
"over_descendable_block",
"croaking",
"eat_mob",
"jump_goal_jump",
"emerging",
"sniffing",
"digging",
"sonic_boom",
"has_dash_cooldown",
"push_towards_closest_space",
"scenting",
"rising",
"feeling_happy",
"searching",
"crawling",
"timer_flag_1",
"timer_flag_2",
"timer_flag_3",
"body_rotation_blocked",
"render_when_invisible"
]
}]
Link:
ridden_entity_id: zigzag64
rider_entity_id: zigzag64
type: u8
immediate: bool
rider_initiated: bool
# angular velocity of the vehicle that the rider is riding.
angular_velocity: lf32
Links: Link[]varint
EntityAttributes: []varint
name: string
min: lf32
value: lf32
max: lf32
EntityProperties:
ints: []varint
index: varint
value: zigzag32
floats: []varint
index: varint
value: lf32
Rotation:
yaw: byterot
pitch: byterot
head_yaw: byterot
BlockCoordinates: # mojang...
x: zigzag32
y: varint
z: zigzag32
PlayerAttributes: []varint
min: lf32
max: lf32
current: lf32
default_min: lf32
default_max: lf32
default: lf32
name: string
modifiers: []varint
id: string
name: string
amount: lf32
operation: li32
operand: li32
serializable: bool
# UseItemTransactionData represents an inventory transaction data object sent when the client uses an item on
# a block. Also used in PlayerAuthoritativeInput packet
TransactionUseItem:
# ActionType is the type of the UseItem inventory transaction. It is one of the action types found above,
# and specifies the way the player interacted with the block.
action_type: varint =>
# Right click item use on a surface like placing a block
0: click_block
# Start right click and hold style item use or potentially interact with nothing.
# If it is a usable item like food the server is expected to send a SetActorDataPacket with ActorFlags::USINGITEM along with the transaction response.
# While using an item, movement speed is slowed which will be reflected in the move vector in Player Auth Input.
1: click_air
# Block breaking like left click. When using server auth block breaking as specified in StartGamePacket this is never sent.
# Instead, block actions are supplied in Player Auth Input.
2: break_block
# TriggerType is the type of the trigger that caused the inventory transaction. It is one of the trigger
# types found in the constants above. If TriggerType is TriggerTypePlayerInput, the transaction is from
# the initial input of the player. If it is TriggerTypeSimulationTick, the transaction is from a simulation
# tick when the player is holding down the input.
trigger_type: varint =>
- unknown
- player_input
- simulation_tick
# BlockPosition is the position of the block that was interacted with. This is only really a correct
# block position if ActionType is not UseItemActionClickAir.
block_position: BlockCoordinates
# BlockFace is the face of the block that was interacted with. When clicking the block, it is the face
# clicked. When breaking the block, it is the face that was last being hit until the block broke.
face: zigzag32
# HotBarSlot is the hot bar slot that the player was holding while clicking the block. It should be used
# to ensure that the hot bar slot and held item are correctly synchronised with the server.
hotbar_slot: zigzag32
# HeldItem is the item that was held to interact with the block. The server should check if this item
# is actually present in the HotBarSlot.
held_item: Item
# Position is the position of the player at the time of interaction. For clicking a block, this is the
# position at that time, whereas for breaking the block it is the position at the time of breaking.
player_pos: vec3f
# ClickedPosition is the position that was clicked relative to the block's base coordinate. It can be
# used to find out exactly where a player clicked the block.
click_pos: vec3f
# BlockRuntimeID is the runtime ID of the block that was clicked. It may be used by the server to verify
# that the player's world client-side is synchronised with the server's.
block_runtime_id: varint
# ClientPrediction is the client's prediction on the output of the transaction.
client_prediction: varint =>
- failure
- success
# Actions is a list of actions that took place, that form the inventory transaction together. Each of
# these actions hold one slot in which one item was changed to another. In general, the combination of
# all of these actions results in a balanced inventory transaction. This should be checked to ensure that
# no items are cheated into the inventory.
TransactionActions: []varint
source_type: varint =>
0: container
1: global
2: world_interaction
3: creative
100: craft_slot
99999: craft
_: source_type?
if container or craft:
inventory_id: WindowIDVarint
if world_interaction:
flags: varint
if craft or craft_slot:
action: varint
default: void
slot: varint
old_item: Item
new_item: Item
# The Minecraft bedrock inventory system was refactored, but not all inventory actions use the new packet.
# This data structure holds actions that have not been updated to the new system.
TransactionLegacy:
# LegacyRequestID is an ID that is only non-zero at times when sent by the client. The server should
# always send 0 for this. When this field is not 0, the LegacySetItemSlots slice below will have values
# in it.
# LegacyRequestID ties in with the ItemStackResponse packet. If this field is non-0, the server should
# respond with an ItemStackResponse packet. Some inventory actions such as dropping an item out of the
# hotbar are still one using this packet, and the ItemStackResponse packet needs to tie in with it.
legacy_request_id: zigzag32
# `legacy_transactions` are only present if the LegacyRequestID is non-zero. These item slots inform the
# server of the slots that were changed during the inventory transaction, and the server should send
# back an ItemStackResponse packet with these slots present in it. (Or false with no slots, if rejected.)
legacy_transactions: legacy_request_id?
if 0: void
default: []varint
container_id: u8
changed_slots: []varint
slot_id: u8
Transaction:
# Old transaction system data
legacy: TransactionLegacy
# What type of transaction took place
transaction_type: varint =>
# Sent for container UI operations depending on if ItemStackNetManager is enabled
0: normal
# Sent from server to client to reject a transaction
1: inventory_mismatch
# Sent for a player performing right click style item use.
# See the contained ItemUseInventoryTransaction::ActionType for the expected use case.
2: item_use
# Sent for a player right clicking on an entity or attacking them.
# See ItemUseInventoryTransaction::ActionType for which it is.
3: item_use_on_entity
# Sent when releasing right click on a chargeable item like a bow or finishing charging like a crossbow.
# This is different than canceling item use early which would be in Player Auth Input.
# See ItemReleaseInventoryTransaction::ActionType for which it is.
4: item_release
# The list of inventory internal actions in this packet, e.g. inventory GUI actions
actions: TransactionActions
# Extra data if an intenal inventory transaction did not take place, e.g. use of an item
transaction_data: transaction_type?
if normal or inventory_mismatch: void
# UseItemTransactionData represents an inventory transaction data object sent when the client uses an item on
# a block.
if item_use: TransactionUseItem
# UseItemOnEntityTransactionData represents an inventory transaction data object sent when the client uses
# an item on an entity.
if item_use_on_entity:
# TargetEntityRuntimeID is the entity runtime ID of the target that was clicked. It is the runtime ID
# that was assigned to it in the AddEntity packet.
entity_runtime_id: varint64
# ActionType is the type of the UseItemOnEntity inventory transaction. It is one of the action types
# found in the constants above, and specifies the way the player interacted with the entity.
action_type: varint =>
# Right click interact with actor.
0: interact
# Left click style attack of actor or elytra spin attack. Server is expected to deal damage to the entity with visuals.
1: attack
# HotBarSlot is the hot bar slot that the player was holding while clicking the entity. It should be used
# to ensure that the hot bar slot and held item are correctly synchronised with the server.
hotbar_slot: zigzag32
# HeldItem is the item that was held to interact with the entity. The server should check if this item
# is actually present in the HotBarSlot.
held_item: Item
# Position is the position of the player at the time of clicking the entity.
player_pos: vec3f
# ClickedPosition is the position that was clicked relative to the entity's base coordinate. It can be
# used to find out exactly where a player clicked the entity.
click_pos: vec3f
# ReleaseItemTransactionData represents an inventory transaction data object sent when the client releases
# the item it was using, for example when stopping while eating or stopping the charging of a bow.
if item_release:
# ActionType is the type of the ReleaseItem inventory transaction. It is one of the action types found
# in the constants above, and specifies the way the item was released.
# As of 1.13, the ActionType is always 0. This field can be ignored, because releasing food (by consuming
# it) or releasing a bow (to shoot an arrow) is essentially the same.
action_type: varint =>
# Release right click and hold style item use, like firing a bow
0: release
# Finish right click and hold style item use, like charging a crossbow
1: consume
# HotBarSlot is the hot bar slot that the player was holding while releasing the item. It should be used
# to ensure that the hot bar slot and held item are correctly synchronised with the server.
hotbar_slot: zigzag32
# HeldItem is the item that was released. The server should check if this item is actually present in the
# HotBarSlot.
held_item: Item
# HeadPosition is the position of the player's head at the time of releasing the item. This is used
# mainly for purposes such as spawning eating particles at that position.
head_pos: vec3f
ItemStacks: Item[]varint
RecipeIngredient:
type: u8 =>
0: invalid
# DefaultItemDescriptor represents an item descriptor for regular items.
1: int_id_meta
# MoLangItemDescriptor represents an item descriptor for items that use MoLang (e.g. behaviour packs).
2: molang
# ItemTagItemDescriptor represents an item descriptor that uses item tagging. This should be used to reduce duplicative
# entries for items that can be grouped under a single tag.
3: item_tag
# DeferredItemDescriptor represents an item descriptor that uses a namespace and metadata value to identify the item.
# There is no clear benefit of using this item descriptor.
4: string_id_meta
# ComplexAliasItemDescriptor represents an item descriptor that uses a single name to identify the item. There is no
# clear benefit of using this item descriptor and only seem to be used for specific recipes.
5: complex_alias
_: type ?
if int_id_meta:
# NetworkID is the numerical network ID of the item. This is sometimes a positive ID, and sometimes a
# negative ID, depending on what item it concerns.
network_id: li16
metadata: network_id ?
if 0: void
default: li16
if molang:
# Expression represents the MoLang expression used to identify the item/it's associated tag.
expression: string
# Version represents the version of MoLang to use.
version: u8
if item_tag:
# Tag represents the tag that the item is part of.
tag: string
if string_id_meta:
# Name is the name of the item, which is a name like 'minecraft:stick'.
name: string
# MetadataValue is the metadata value of the item. For some items, this is the damage value, whereas for
# other items it is simply an identifier of a variant of the item.
metadata: li16
if complex_alias:
# Name is the name of the item, which is a name like 'minecraft:stick'.
name: string
count: zigzag32
PotionTypeRecipes: []varint
input_item_id: zigzag32
input_item_meta: zigzag32
ingredient_id: zigzag32
ingredient_meta: zigzag32
output_item_id: zigzag32
output_item_meta: zigzag32
PotionContainerChangeRecipes: []varint
input_item_id: zigzag32
ingredient_id: zigzag32
output_item_id: zigzag32
Recipes: []varint
type: zigzag32 =>
0: shapeless #'ENTRY_SHAPELESS',
1: shaped #'ENTRY_SHAPED',
2: furnace # 'ENTRY_FURNACE',
# `furnace_with_metadata` is a recipe specifically used for furnace-type crafting stations. It is equal to
# `furnace`, except it has an input item with a specific metadata value, instead of any metadata value.
3: furnace_with_metadata # 'ENTRY_FURNACE_DATA', // has metadata
4: multi #'ENTRY_MULTI', //TODO
5: shulker_box #'ENTRY_SHULKER_BOX', //TODO
6: shapeless_chemistry #'ENTRY_SHAPELESS_CHEMISTRY', //TODO
7: shaped_chemistry #'ENTRY_SHAPED_CHEMISTRY', //TODO
# SmithingTransformRecipe is a recipe specifically used for smithing tables. It has two input items and adds them
# together, resulting in a new item.
8: smithing_transform
9: smithing_trim
recipe: type?
if shapeless or shulker_box or shapeless_chemistry:
recipe_id: LatinString
input: RecipeIngredient[]varint
output: ItemLegacy[]varint
uuid: uuid
block: string
priority: zigzag32
unlocking_requirement: RecipeUnlockingRequirement
network_id: varint
if shaped or shaped_chemistry:
recipe_id: LatinString
width: zigzag32
height: zigzag32
# 2D input array, size of width*height
input: []$width
_: RecipeIngredient[]$height
output: ItemLegacy[]varint
uuid: uuid
block: string
priority: zigzag32
assume_symmetry: bool
unlocking_requirement: RecipeUnlockingRequirement
network_id: varint
if furnace:
input_id: zigzag32
output: ItemLegacy
block: string
if furnace_with_metadata:
input_id: zigzag32
input_meta: zigzag32
output: ItemLegacy
block: string
if multi:
uuid: uuid
network_id: varint
if smithing_transform:
# RecipeID is a unique ID of the recipe. This ID must be unique amongst all other types of recipes too,
# but its functionality is not exactly known.
recipe_id: LatinString
template: RecipeIngredient
# Base is the item that the Addition is being applied to in the smithing table.
base: RecipeIngredient
# Addition is the item that is being added to the Base item to result in a modified item.
addition: RecipeIngredient
# Result is the resulting item from the two items being added together.
result: ItemLegacy
# Tag is a serialized compound tag in the network little endian format.
tag: string
# RecipeNetworkID is a unique ID used to identify the recipe over network. Each recipe must have a unique
# network ID. Recommended is to just increment a variable for each unique recipe registered.
# This field must never be 0.
network_id: varint
if smithing_trim:
recipe_id: LatinString
template: RecipeIngredient
input: RecipeIngredient
addition: RecipeIngredient
block: string
network_id: varint
RecipeUnlockingRequirement:
context: u8 =>
- none
- always_unlocked
- player_in_water
- player_has_many_items
ingredients: context?
if none: RecipeIngredient[]varint
SkinImage:
width: li32
height: li32
data: ByteArray
Skin:
skin_id: string
play_fab_id: string
skin_resource_pack: string
skin_data: SkinImage
animations: []li32
skin_image: SkinImage
animation_type: li32
animation_frames: lf32
expression_type: lf32
cape_data: SkinImage
geometry_data: string
geometry_data_version: string
animation_data: string
cape_id: string
full_skin_id: string
arm_size: string
skin_color: string
personal_pieces: []li32
piece_id: string
piece_type: string
pack_id: string
is_default_piece: bool
product_id: string
piece_tint_colors: []li32
piece_type: string
colors: string[]li32
premium: bool
persona: bool
# PersonaCapeOnClassicSkin specifies if the skin had a Persona cape (in-game skin creator cape) equipped
# on a classic skin.
cape_on_classic: bool
primary_user: bool
overriding_player_appearance: bool
PlayerRecords:
type: u8 =>
0: add
1: remove
records_count: varint
records: []$records_count
_: type?
if add:
uuid: uuid
entity_unique_id: zigzag64
username: string
xbox_user_id: string
platform_chat_id: string
build_platform: li32
skin_data: Skin
is_teacher: bool
is_host: bool
is_subclient: bool
if remove:
uuid: uuid
verified: type ?
if add: bool[]$records_count
Enchant:
id: u8
level: u8
EnchantOption:
cost: varint
slot_flags: li32
equip_enchants: Enchant[]varint
held_enchants: Enchant[]varint
self_enchants: Enchant[]varint
name: string
option_id: zigzag32
Action: zigzag32 =>
0: start_break
1: abort_break
2: stop_break
3: get_updated_block
4: drop_item
5: start_sleeping
6: stop_sleeping
7: respawn
8: jump
9: start_sprint
10: stop_sprint
11: start_sneak
12: stop_sneak
13: creative_player_destroy_block
# sent when spawning in a different dimension to tell the server we spawned
14: dimension_change_ack
15: start_glide
16: stop_glide
17: build_denied
18: crack_break
19: change_skin
# no longer used
20: set_enchatnment_seed
21: swimming
22: stop_swimming
23: start_spin_attack
24: stop_spin_attack
25: interact_block
26: predict_break
27: continue_break
28: start_item_use_on
29: stop_item_use_on
30: handled_teleport
31: missed_swing
32: start_crawling
33: stop_crawling
34: start_flying
35: stop_flying
36: received_server_data
37: start_using_item
# Source and Destination point to the source slot from which Count of the item stack were taken and the
# destination slot to which this item was moved.
StackRequestSlotInfo:
# ContainerID is the ID of the container that the slot was in.
slot_type: FullContainerName
# Slot is the index of the slot within the container with the ContainerID above.
slot: u8
# StackNetworkID is the unique stack ID that the client assumes to be present in this slot. The server
# must check if these IDs match. If they do not match, servers should reject the stack request that the
# action holding this info was in.
stack_id: zigzag32
# ItemStackRequest is sent by the client to change item stacks in an inventory. It is essentially a
# replacement of the InventoryTransaction packet added in 1.16 for inventory specific actions, such as moving
# items around or crafting. The InventoryTransaction packet is still used for actions such as placing blocks
# and interacting with entities.
ItemStackRequest:
# RequestID is a unique ID for the request. This ID is used by the server to send a response for this
# specific request in the ItemStackResponse packet.
request_id: zigzag32
actions: []varint
type_id: u8 =>
# TakeStackRequestAction is sent by the client to the server to take x amount of items from one slot in a
# container to the cursor.
- take
# PlaceStackRequestAction is sent by the client to the server to place x amount of items from one slot into
# another slot, such as when shift clicking an item in the inventory to move it around or when moving an item
# in the cursor into a slot.
- place
# SwapStackRequestAction is sent by the client to swap the item in its cursor with an item present in another
# container. The two item stacks swap places.
- swap
# DropStackRequestAction is sent by the client when it drops an item out of the inventory when it has its
# inventory opened. This action is not sent when a player drops an item out of the hotbar using the Q button
# (or the equivalent on mobile). The InventoryTransaction packet is still used for that action, regardless of
# whether the item stack network IDs are used or not.
- drop
# DestroyStackRequestAction is sent by the client when it destroys an item in creative mode by moving it
# back into the creative inventory.
- destroy
# ConsumeStackRequestAction is sent by the client when it uses an item to craft another item. The original
# item is 'consumed'.
- consume
# CreateStackRequestAction is sent by the client when an item is created through being used as part of a
# recipe. For example, when milk is used to craft a cake, the buckets are leftover. The buckets are moved to