-
-
Notifications
You must be signed in to change notification settings - Fork 222
/
Copy pathproto.yml
3387 lines (3361 loc) · 101 KB
/
proto.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
!version: 1.21.4
!StartDocs: true
^types:
varint: native
varlong: native
optvarint: varint
pstring: native
buffer: native
u8: native
u16: native
u32: native
u64: native
i8: native
i16: native
i32: native
i64: native
bool: native
f32: native
f64: native
UUID: native
option: native
entityMetadataLoop: native
topBitSetTerminatedArray: native
bitfield: native
bitflags: native
container: native
switch: native
void: native
array: native
restBuffer: native
anonymousNbt: native
anonOptionalNbt: native
registryEntryHolder: native
registryEntryHolderSet: native
ByteArray: ["buffer", { "countType": "varint" }]
string: [
"pstring",
{
"countType": "varint"
}
]
vec2f:
x: f32
y: f32
vec3f:
x: f32
y: f32
z: f32
vec4f:
x: f32
y: f32
z: f32
w: f32
vec3f64:
x: f64
y: f64
z: f64
IDSet: ["registryEntryHolderSet", {
"base": { name: "name", type: "string" },
"otherwise": { name: "ids", type: "varint" }
}]
ContainerID: varint
SoundEvent:
soundName: string
fixedRange?: f32
RecipeDisplay:
type: varint =>
- crafting_shapeless
- crafting_shaped
- furnace
- stonecutter
- smithing
data: type ?
if crafting_shapeless:
ingredients: SlotDisplay[]varint
result: SlotDisplay
craftingStation: SlotDisplay
if crafting_shaped:
width: varint
height: varint
ingredients: SlotDisplay[]varint
result: SlotDisplay
craftingStation: SlotDisplay
if furnace:
ingredient: SlotDisplay
fuel: SlotDisplay
result: SlotDisplay
craftingStation: SlotDisplay
duration: varint
experience: f32
if stonecutter:
ingredient: SlotDisplay
result: SlotDisplay
craftingStation: SlotDisplay
if smithing:
template: SlotDisplay
base: SlotDisplay
addition: SlotDisplay
result: SlotDisplay
craftingStation: SlotDisplay
SlotDisplay:
type: varint =>
- empty
- any_fuel
- item
- item_stack
- tag
- smithing_trim
- with_remainder
- composite
data: type ?
if empty or any_fuel: void
if item: varint
if item_stack: Slot
if tag: string
if simthing_trim:
base: SlotDisplay
material: SlotDisplay
pattern: SlotDisplay
if with_remainder:
input: SlotDisplay
remainder: SlotDisplay
if composite: SlotDisplay[]varint
SlotComponentType: varint =>
- custom_data
- max_stack_size
- max_damage
- damage
- unbreakable
- custom_name
- item_name
- item_model
- lore
- rarity
- enchantments
- can_place_on
- can_break
- attribute_modifiers
- custom_model_data
- hide_additional_tooltip
- hide_tooltip
- repair_cost
- creative_slot_lock
- enchantment_glint_override
- intangible_projectile
- food
- consumable
- use_remainder
- use_cooldown
- damage_resistant
- tool
- enchantable
- equippable
- repairable
- glider
- tooltip_style
- death_protection
- stored_enchantments
- dyed_color
- map_color
- map_id
- map_decorations
- map_post_processing
- charged_projectiles
- bundle_contents
- potion_contents
- suspicious_stew_effects
- writable_book_content
- written_book_content
- trim
- debug_stick_state
- entity_data
- bucket_entity_data
- block_entity_data
- instrument
- ominous_bottle_amplifier
- jukebox_playable
- recipes
- lodestone_tracker
- firework_explosion
- fireworks
- profile
- note_block_sound
- banner_patterns
- base_color
- pot_decorations
- container
- block_state
- bees
- lock
- container_loot
SlotComponent:
type: SlotComponentType
## Ref: client/net/minecraft/core/component/DataComponents.java
data: type ?
## TODO: look into how nbt works here
if custom_data: anonymousNbt
if max_stack_size: varint
if max_damage: varint
if damage: varint
if unbreakable: bool
if custom_name: anonymousNbt
if item_name: anonymousNbt
if item_model: string
if lore: anonOptionalNbt[]varint
if rarity: varint =>
- common
- uncommon
- rare
- epic
if enchantments:
enchantments: []varint
id: varint
level: varint
showTooltip: bool
if can_place_on or can_break:
predicates: BlockPredicate[]varint
showTooltip: bool
if attribute_modifiers:
attributes: []varint
typeId: varint
name: string
value: f64
operation: varint =>
- add
- multiply_base
- multiply_total
slot: varint =>
- any
- main_hand
- off_hand
- hand
- feet
- legs
- chest
- head
- armor
- body
showTooltip: bool
if custom_model_data: varint
if hide_additional_tooltip: void
if hide_tooltip: void
if repair_cost: varint
if creative_slot_lock: void
if enchantment_glint_override: bool
if intangible_projectile: void
if food:
nutrition: varint
# How much saturation will be given after consuming the item.
saturationModifier: f32
# Whether the item can always be eaten, even at full hunger.
canAlwaysEat: bool
if consumable:
consume_seconds: f32
animation: varint =>
- none
- eat
- drink
- block
- bow
- spear
- crossbow
- spyglass
- toot_horn
- brush
sound: ["registryEntryHolder", {
"baseName": "soundId",
"otherwise": { name: "data", type: "SoundEvent" }
}]
makes_particles: bool
effects: ConsumeEffect[]varint
if use_remainder: Slot
if use_cooldown:
seconds: f32
cooldownGroup?: string
if damage_resistant: string
if tool:
rules: []varint
blocks: IDSet
# The speed at which the tool breaks this rules' blocks.
speed?: f32
# Whether items should drop only if this is the correct tool.
correctDropForBlocks?: bool
# The mining speed in case none of the previous rule were matched.
defaultMiningSpeed: f32
damagePerBlock: varint
# Enchantment cost up to which the item can be enchanted
if enchantable: varint
if equippable:
slot: varint =>
- main_hand
- off_hand
- feet
- legs
- chest
- head
- body
sound: ["registryEntryHolder", {
"baseName": "soundId",
"otherwise": { name: "data", type: "SoundEvent" }
}]
model?: string
cameraOverlay?: string
allowedEntities?: IDSet
dispensable: bool
swappable: bool
damageable: bool
if repairable:
items: IDSet
if tooltip_style: string
if death_protection:
effects: ConsumeEffect[]varint
if stored_enchantments:
enchantments: []varint
# The ID of the enchantment in the enchantment registry.
id: varint
level: varint
# Whether the list of enchantments should be shown on the item's tooltip.
showInTooltip: bool
if dyed_color:
color: varint
showTooltip: bool
if map_color: varint
if map_id: varint
if map_decorations: anonOptionalNbt
if map_post_processing: varint
if charged_projectiles:
projectiles: Slot[]varint
if bundle_contents:
contents: Slot[]varint
if potion_contents:
# True if this potion has an ID in the potion registry--it has the default effects associated with the potion type.
potionId?: varint
# The RGB components of the color, encoded as an integer.
customColor?: varint
customEffects: PotionEffect[]varint
customName: string
# Name Type Description
# Number Of Effects VarInt Number of elements in the following array.
# Effect Type ID Array VarInt Enum The ID of the effect in the potion effect type registry.
# Duration VarInt The duration of the effect.
if suspicious_stew_effects:
effects: []varint
effect: varint
duration: varint
# Name Type Description
# Number Of Pages VarInt Number of elements in the following array.
# Page Raw Content Array (100) String (1024) The raw text of the page.
# Has Filtered Content Boolean
# Filtered Content Optional String (1024) The content after passing through chat filters. Only present if Has Filtered Content is true.
if writable_book_content:
pages: BookPage[]varint
# Name Type Description
# Raw Title String (32) The raw title of the book.
# Has Filtered Title Boolean
# Filtered Title Optional String (32) The title after going through chat filters. Only present if Has Filtered Title is true.
# Author String
# Generation VarInt
# Number Of Pages VarInt Number of elements in the following array.
# Page Raw Content Array (100) TextComponent (1024) The raw text of the page.
# Has Filtered Content Boolean
# Filtered Content Optional Text Component (1024) The content after passing through chat filters. Only present if Has Filtered Content is true.
# Resolved Boolean Whether entity selectors have already been resolved.
if written_book_content:
rawTitle: string
filteredTitle?: string
author: string
generation: varint
pages: BookPage[]varint
# Whether entity selectors have already been resolved.
resolved: bool
# Name Type Description
# Trim Material Type VarInt Identifier used to determine the data that follows. It can be either:
# 0 - Directly represents a trim material, with the necessary data following.
# Anything else - References a trim material in its registry, by the ID of Trim Material Type - 1.
# Asset Name Optional String See Armor Trim Material Registry. Only present if Trim Material Type is 0.
# Ingredient Optional VarInt See Armor Trim Material Registry. Only present if Trim Material Type is 0.
# Item Model Index Optional Float See Armor Trim Material Registry. Only present if Trim Material Type is 0.
# Number of Overrides Optional VarInt See Armor Trim Material Registry. Only present if Trim Material Type is 0.
# Override Armor Material Type Optional Array VarInt Enum See Armor Trim Material Registry. Only present if Trim Material Type is 0.
# Overriden Asset Name String See Armor Trim Material Registry. Only present if Trim Material Type is 0.
# Description Optional Text Component See Armor Trim Material Registry. Only present if Trim Material Type is 0.
# Trim Pattern Type VarInt Identifier used to determine the data that follows. It can be either:
# 0 - Directly represents a trim pattern, with the necessary data following.
# Anything else - References a trim pattern in its registry, by the ID of Trim Pattern Type - 1.
# Asset Name Optional String See Armor Trim Pattern Registry. Only present if Trim Pattern Type is 0.
# Template Item Optional VarInt See Armor Trim Pattern Registry. Only present if Trim Pattern Type is 0.
# Description Optional Text Component See Armor Trim Pattern Registry. Only present if Trim Pattern Type is 0.
# Decal Optional Boolean See Armor Trim Pattern Registry. Only present if Trim Pattern Type is 0.
# Show In Tooltip Boolean Whether the trim information should be shown on the item's tooltip.
if trim:
# Identifier used to determine the data that follows. It can be either:
# 0 - Directly represents a trim material, with the necessary data following.
# Anything else - References a trim material in its registry, by the ID of Trim Material Type - 1.
materialType: varint
_: materialType ?
if 0:
assetName: string
ingredientId: varint
itemModelIndex: f32
numberOfOverrides: optvarint
override: []varint
armorMaterialType: varint
overridenAssetName: string
description: string
trimPatternType: varint
_: trimPatternType ?
if 0:
assetName: string
templateItem: varint
description: string
decal: bool
showInTooltip: bool
if debug_stick_state: anonymousNbt
if entity_data: anonymousNbt
if bucket_entity_data: anonymousNbt
if block_entity_data: anonymousNbt
# Name Type Description
# Instrument Type VarInt Identifier used to determine the data that follows. It can be either:
# 0 - Directly represents an instrument, with the necessary data following.
# Anything else - References an instrument in its registry, by the ID of Instrument Type - 1.
# Sound Event Optional Sound Event The sound to be played. Only present if Instrument Type is 0.
# Use duration Optional Float The maximum range of the sound. Only present if Instrument Type is 0.
# Range Optional Float The range of the instrument. Only present if Instrument Type is 0.
if instrument:
instrumentType: varint
_: instrumentType ?
if 0:
soundEvent: string
useDuration: f32
range: f32
if ominous_bottle_amplifier: varint
# Name Type Description
# Direct Mode Boolean Whether the jukebox song is specified directly, or just referenced by name.
# Jukebox Song Name Optional Identifier The name of the jukebox song in its respective registry. Only present if Direct Mode is false.
# Jukebox Song Type Optional VarInt Identifier used to determine the data that follows. It can be either:
# 0 - Directly represents a jukebox song, with the necessary data following.
# Anything else - References a jukebox song in its registry, by the ID of Jukebox Song Type - 1.
# Only present if Direct Mode is true.
# Sound Event Optional Sound Event The sound to be played. Only present if Direct Mode is true and Jukebox Song Type is 0.
# Description Optional Text Component The description shown in the item lore. Only present if Direct Mode is true and Jukebox Song Type is 0.
# Duration Optional Float The duration the songs should play for, in seconds. Only present if Direct Mode is true and Jukebox Song Type is 0.
# Output Optional VarInt The output strength given by a comparator. Between 0 and 15. Only present if Direct Mode is true and Jukebox Song Type is 0.
# Show In Tooltip Boolean Whether the song should be shown on the item's tooltip.
if jukebox_playable:
directMode: bool
_: directMode ?
if true:
jukeboxSongName: string
jukeboxSongType: varint
_: jukeboxSongType ?
if 0:
soundEvent:
soundEventType: varint
_: soundEventType ?
if 0:
soundName: string
fixedRange?: f32
description: anonymousNbt
duration: f32
output: varint
if false:
songLocation: string
showInTooltip: bool
if recipes: anonymousNbt
# Name Type Description
# Has Global Position Boolean Whether this lodestone points to a position, otherwise it spins randomly.
# Dimension Identifier The dimension the compass points to. Only present if Has Global Position is true.
# Position Position The position the compass points to. Only present if Has Global Position is true.
# Tracked Boolean Whether the component is removed when the associated lodestone is broken.
if lodestone_tracker:
globalPosition?:
dimension: string
position: position
tracked: bool
# Name Type Description
# Shape VarInt Enum Can be one of the following:
# 0 - Small ball
# 1 - Large ball
# 2 - Star
# 3 - Creeper
# 4 - Burst
# Number Of Colors VarInt The number of elements in the following array.
# Colors Array of Int The RGB components of the color, encoded as an integer.
# Number Of Fade Colors VarInt The number of elements in the following array.
# Fade Colors Array of Int The RGB components of the color, encoded as an integer.
# Has Trail Boolean
# Has Twinkle Boolean
if firework_explosion: FireworkExplosion
if fireworks:
flightDuration: varint
explosions: FireworkExplosion[]varint
# Name Type Description
# Has Name Boolean
# Name Optional String (16) Only present if Has Name is true.
# Has Unique ID Boolean
# Unique ID Optional UUID Only present if Has Unique ID is true.
# Number of Properties VarInt Number of elements in the following array.
# Property Name Array String (64)
# Value String
# Has Signature Boolean
# Signature String (1024) Only present if Has Signature is true.
if profile:
hasName: bool
name: string
hasUniqueId: bool
uniqueId: UUID
properties: []varint
property: string
value: string
hasSignature: bool
signature: string
if note_block_sound: string
# Name Type Description
# Number of Layers VarInt Number of elements in the following array.
# Layer Pattern Type Array VarInt Identifier used to determine the data that follows. It can be either:
# 0 - Directly represents a pattern, with the necessary data following.
# Anything else - References a pattern in its registry, by the ID of Pattern Type - 1.
# Asset ID Optional Identifier Identifier of the asset. Only present if Pattern Type is 0.
# Translation Key Optional String Only present if Pattern Type is 0.
# Color Dye Color See Dye Color.
if banner_patterns:
layers: []varint
patternType: varint
_: patternType ?
if 0:
assetId: string
translationKey: string
color: varint
if base_color: varint
if pot_decorations:
# The ID of the items in the item registry.
decorations: varint[]varint
if container:
contents: Slot[]varint
# Name Type Description
# Number of Properties VarInt Number of elements in the following array.
# Property Name Array String
# Value String
if block_state:
properties: []varint
property: string
value: string
# Name Type Description
# Number of Bees VarInt Number of elements in the following array.
# Bee Entity Data Array NBT
# Ticks In Hive VarInt
# Min Ticks In Hive VarInt
if bees:
bees: []varint
# Custom data for the entity, always a Compound Tag. Same structure as the minecraft:custom_data component.
nbtData: anonymousNbt
ticksInHive: varint
minTicksInHive: varint
if lock: anonymousNbt
if container_loot: anonymousNbt
Slot:
itemCount: varint
_: itemCount ?
if 0: void
default:
itemId: varint
# https://wiki.vg/Slot_Data#Structured_components
addedComponentCount: varint
removedComponentCount: varint
components: SlotComponent[]$addedComponentCount
removeComponents: []$removedComponentCount
type: SlotComponentType
FireworkExplosion:
shape: varint =>
- small_ball
- large_ball
- star
- creeper
- burst
colors: i32[]varint
fadeColors: i32[]varint
hasTrail: bool
hasTwinkle: bool
BookPage:
content: string
filteredContent?: string
EffectDetail:
amplifier: varint
duration: varint
ambient: bool
showParticles: bool
showIcon: bool
hiddenEffect?: EffectDetail
PotionEffect:
id: varint
details: EffectDetail
ConsumeEffect:
type: varint =>
- apply_effects
- remove_effects
- clear_all_effects
- teleport_randomly
- play_sound
_: type ?
if apply_effects:
effects: PotionEffect[]varint
probability: f32
if remove_effects:
effects: IDSet
if clear_all_effects: void
if teleport_randomly:
diameter: f32
if play_sound:
sound: ["registryEntryHolder", {
"baseName": "soundId",
"otherwise": { name: "data", type: "SoundEvent" }
}]
BlockProperty:
# Name of the block state property.
name: string
# Whether this is an exact value match, as opposed to ranged.
isExactMatch: bool
# Value of the block state property. Only present in exact match mode.
exactValue?: string
# Minimum value of the block state property range. Only present in ranged match mode.
minValue?: string
# Maximum value of the block state property range. Only present in ranged match mode.
maxValue?: string
BlockPredicate:
blockSet?: ["registryEntryHolderSet", {
"base": { name: "name", type: "string" },
"otherwise": { name: "blockIds", type: "varint" }
}]
properties?: BlockProperty[]varint
nbt: anonOptionalNbt
Particle:
# See client/net/minecraft/core/particles/ParticleTypes.java
type: varint =>
- angry_villager
- block
- block_marker
- bubble
- cloud
- crit
- damage_indicator
- dragon_breath
- dripping_lava
- falling_lava
- landing_lava
- dripping_water
- falling_water
- dust
- dust_color_transition
- effect
- elder_guardian
- enchanted_hit
- enchant
- end_rod
- entity_effect
- explosion_emitter
- explosion
- gust
- small_gust
- gust_emitter_large
- gust_emitter_small
- sonic_boom
- falling_dust
- firework
- fishing
- flame
- infested
- cherry_leaves
- pale_oak_leaves
- sculk_soul
- sculk_charge
- sculk_charge_pop
- soul_fire_flame
- soul
- flash
- happy_villager
- composter
- heart
- instant_effect
- item
- vibration
- trail
- item_slime
- item_cobweb
- item_snowball
- large_smoke
- lava
- mycelium
- note
- poof
- portal
- rain
- smoke
- white_smoke
- sneeze
- spit
- squid_ink
- sweep_attack
- totem_of_undying
- underwater
- splash
- witch
- bubble_pop
- current_down
- bubble_column_up
- nautilus
- dolphin
- campfire_cosy_smoke
- campfire_signal_smoke
- dripping_honey
- falling_honey
- landing_honey
- falling_nectar
- falling_spore_blossom
- ash
- crimson_spore
- warped_spore
- spore_blossom_air
- dripping_obsidian_tear
- falling_obsidian_tear
- landing_obsidian_tear
- reverse_portal
- white_ash
- small_flame
- snowflake
- dripping_dripstone_lava
- falling_dripstone_lava
- dripping_dripstone_water
- falling_dripstone_water
- glow_squid_ink
- glow
- wax_on
- wax_off
- electric_spark
- scrape
- shriek
- egg_crack
- dust_plume
- trial_spawner_detected_player
- trial_spawner_detected_player_ominous
- vault_connection
- dust_pillar
- ominous_spawning
- raid_omen
- trial_omen
- block_crumble
## ## Tips for reviewing particle data (as of 1.20.5)
## Inside the registry code, each particle can have an associated "options" type and
## each options type can add additional data to be encoded.
## For example, this line
## public static final ParticleType<BlockParticleOption> BLOCK = register("block", false, BlockParticleOption::codec, BlockParticleOption::streamCodec);
## will read the stream codec from BlockParticleOption.java's streamCodec member; then we see
## return ByteBufCodecs.idMapper(Block.BLOCK_STATE_REGISTRY).map(var1 -> new BlockParticleOption(var0, var1), var0x -> var0x.state);
## this encodes with the ByteBufCodecs.idMapper function. Inside this function we find
## public void encode(ByteBuf var1x, T var2) {
## int var3 = var1.applyAsInt(var2);
## VarInt.write(var1x, var3);
## }
## which as we can see writes the varint to the buffer.
## If you want to see all the serializers try regexp searching "StreamCodec.*Particle"
data: type ?
if block or block_marker or falling_dust or dust_pillar or block_crumble: varint
if dust:
red: f32
green: f32
blue: f32
scale: f32
if dust_color_transition:
fromRed: f32
fromGreen: f32
fromBlue: f32
scale: f32
toRed: f32
toGreen: f32
toBlue: f32
if entity_effect: i32
if item: Slot
if sculk_charge: f32
if shriek: varint
if vibration:
position_type: varint =>
- block
- entity
position: position_type ?
if block: position
if entity:
entityId: varint
entity_eye_height: f32
ticks: varint
if trail:
target: vec3f64
color: u8
ingredient: Slot[]varint
position: [
"bitfield",
[
{
"name": "x",
"size": 26,
"signed": true
},
{
"name": "z",
"size": 26,
"signed": true
},
{
"name": "y",
"size": 12,
"signed": true
}
]
]
soundSource: varint =>
0: master
1: music
2: record
3: weather
4: block
5: hostile
6: neutral
7: player
8: ambient
9: voice
packedChunkPos:
z: i32
x: i32
previousMessages: []varint
id: varint
signature: id ?
if 0: [
"buffer",
{
"count": 256
}
]
default: void
entityMetadataEntry:
key: u8
type: varint =>
- byte
- int
- long
- float
- string
- component
- optional_component
- item_stack
- boolean
- rotations
- block_pos
- optional_block_pos
- direction
- optional_uuid
- block_state
- optional_block_state
- compound_tag
- particle
- particles
- villager_data
- optional_unsigned_int
- pose
- cat_variant
- wolf_variant
- frog_variant
- optional_global_pos
- painting_variant
- sniffer_state
- armadillo_state
- vector3
- quaternion
value: type ?
if byte: i8
if int: varint
if long: varlong
if float: f32
if string: string
if component: anonymousNbt
if optional_component: ["option", "anonymousNbt"]
if item_stack: Slot
if boolean: bool
if rotations:
pitch: f32
yaw: f32
roll: f32
if block_pos: position
if optional_block_pos: ["option", "position"]
if direction: varint
if optional_uuid: ["option", "UUID"]
if block_state: varint
if optional_block_state: optvarint
if compound_tag: anonymousNbt
if particle: Particle
if particles: Particle[]varint
if villager_data:
villagerType: varint
villagerProfession: varint
level: varint
if optional_unsigned_int: optvarint
if pose: varint
if cat_variant: varint
if wolf_variant: ["registryEntryHolder", {
"baseName": "variantId",
"otherwise": { name: "variantData", type: "EntityMetadataWolfVariant" }
}]
if frog_variant: varint
if optional_global_pos: ["option", "string"]
if painting_variant: ["registryEntryHolder", {
"baseName": "variantId",
"otherwise": { name: "variantData", type: "EntityMetadataPaintingVariant" }
}]
if sniffer_state: varint
if armadillo_state: varint
if vector3: vec3f
if quaternion: vec4f
EntityMetadataPaintingVariant:
width: i32
height: i32
assetId: string
title?: anonymousNbt
author?: anonymousNbt
EntityMetadataWolfVariant:
wildTexture: string
tameTexture: string
angryTexture: string
biome: IDSet
entityMetadata: ["entityMetadataLoop", { "endVal": 255, "type": "entityMetadataEntry" }]
tags: []varint
tagName: string
entries: varint[]varint
chunkBlockEntity:
_: [
"bitfield",
[
{
"name": "x",
"size": 4,
"signed": false
},
{
"name": "z",
"size": 4,
"signed": false
}
]
]
y: i16
type: varint
nbtData: anonOptionalNbt
chat_session?:
uuid: UUID
publicKey:
expireTime: i64
keyBytes: [
"buffer",
{
"countType": "varint"
}
]
keySignature: [
"buffer",
{
"countType": "varint"
}
]
game_profile:
name: string
properties: []varint
key: string
value: string
signature?: string
command_node:
flags: [
"bitfield",
[
{
"name": "unused",
"size": 3,
"signed": false
},
{
"name": "has_custom_suggestions",
"size": 1,
"signed": false
},
{
"name": "has_redirect_node",
"size": 1,