Skip to main content

steel_registry/data_components/
vanilla_components.rs

1//! Vanilla data component definitions and registration.
2//!
3//! This module defines all vanilla Minecraft data components and provides
4//! the registration function to add them to the registry.
5use steel_utils::Identifier;
6use text_components::TextComponent;
7
8use super::component_data::ComponentData;
9use super::registry::DataComponentRegistry;
10pub use super::registry::DataComponentType;
11
12// Re-export component types for convenience
13pub use super::components::{Equippable, EquippableSlot, ItemEnchantments, Tool, ToolRule};
14
15pub const MAX_STACK_SIZE: DataComponentType<i32> =
16    DataComponentType::new(Identifier::vanilla_static("max_stack_size"));
17
18pub const MAX_DAMAGE: DataComponentType<i32> =
19    DataComponentType::new(Identifier::vanilla_static("max_damage"));
20
21pub const CUSTOM_NAME: DataComponentType<TextComponent> =
22    DataComponentType::new(Identifier::vanilla_static("custom_name"));
23
24pub const ITEM_NAME: DataComponentType<TextComponent> =
25    DataComponentType::new(Identifier::vanilla_static("item_name"));
26
27pub const DAMAGE: DataComponentType<i32> =
28    DataComponentType::new(Identifier::vanilla_static("damage"));
29
30pub const REPAIR_COST: DataComponentType<i32> =
31    DataComponentType::new(Identifier::vanilla_static("repair_cost"));
32
33pub const UNBREAKABLE: DataComponentType<()> =
34    DataComponentType::new(Identifier::vanilla_static("unbreakable"));
35
36pub const TOOL: DataComponentType<Tool> =
37    DataComponentType::new(Identifier::vanilla_static("tool"));
38
39pub const EQUIPPABLE: DataComponentType<Equippable> =
40    DataComponentType::new(Identifier::vanilla_static("equippable"));
41
42pub const GLIDER: DataComponentType<()> =
43    DataComponentType::new(Identifier::vanilla_static("glider"));
44
45pub const CREATIVE_SLOT_LOCK: DataComponentType<()> =
46    DataComponentType::new(Identifier::vanilla_static("creative_slot_lock"));
47
48pub const INTANGIBLE_PROJECTILE: DataComponentType<()> =
49    DataComponentType::new(Identifier::vanilla_static("intangible_projectile"));
50
51pub const ENCHANTMENT_GLINT_OVERRIDE: DataComponentType<bool> =
52    DataComponentType::new(Identifier::vanilla_static("enchantment_glint_override"));
53
54pub const POTION_DURATION_SCALE: DataComponentType<f32> =
55    DataComponentType::new(Identifier::vanilla_static("potion_duration_scale"));
56
57// These components are registered but use placeholder serialization.
58// They use the Todo ComponentData variant.
59
60pub const CUSTOM_DATA: DataComponentType<()> =
61    DataComponentType::new(Identifier::vanilla_static("custom_data"));
62
63pub const USE_EFFECTS: DataComponentType<()> =
64    DataComponentType::new(Identifier::vanilla_static("use_effects"));
65
66pub const MINIMUM_ATTACK_CHARGE: DataComponentType<()> =
67    DataComponentType::new(Identifier::vanilla_static("minimum_attack_charge"));
68
69pub const DAMAGE_TYPE: DataComponentType<()> =
70    DataComponentType::new(Identifier::vanilla_static("damage_type"));
71
72pub const ITEM_MODEL: DataComponentType<()> =
73    DataComponentType::new(Identifier::vanilla_static("item_model"));
74
75pub const LORE: DataComponentType<()> = DataComponentType::new(Identifier::vanilla_static("lore"));
76
77pub const RARITY: DataComponentType<()> =
78    DataComponentType::new(Identifier::vanilla_static("rarity"));
79
80pub const ENCHANTMENTS: DataComponentType<ItemEnchantments> =
81    DataComponentType::new(Identifier::vanilla_static("enchantments"));
82
83pub const CAN_PLACE_ON: DataComponentType<()> =
84    DataComponentType::new(Identifier::vanilla_static("can_place_on"));
85
86pub const CAN_BREAK: DataComponentType<()> =
87    DataComponentType::new(Identifier::vanilla_static("can_break"));
88
89pub const ATTRIBUTE_MODIFIERS: DataComponentType<()> =
90    DataComponentType::new(Identifier::vanilla_static("attribute_modifiers"));
91
92pub const CUSTOM_MODEL_DATA: DataComponentType<()> =
93    DataComponentType::new(Identifier::vanilla_static("custom_model_data"));
94
95pub const TOOLTIP_DISPLAY: DataComponentType<()> =
96    DataComponentType::new(Identifier::vanilla_static("tooltip_display"));
97
98pub const TOOLTIP_STYLE: DataComponentType<()> =
99    DataComponentType::new(Identifier::vanilla_static("tooltip_style"));
100
101pub const NOTE_BLOCK_SOUND: DataComponentType<()> =
102    DataComponentType::new(Identifier::vanilla_static("note_block_sound"));
103
104pub const FOOD: DataComponentType<()> = DataComponentType::new(Identifier::vanilla_static("food"));
105
106pub const CONSUMABLE: DataComponentType<()> =
107    DataComponentType::new(Identifier::vanilla_static("consumable"));
108
109pub const USE_REMAINDER: DataComponentType<()> =
110    DataComponentType::new(Identifier::vanilla_static("use_remainder"));
111
112pub const USE_COOLDOWN: DataComponentType<()> =
113    DataComponentType::new(Identifier::vanilla_static("use_cooldown"));
114
115pub const DAMAGE_RESISTANT: DataComponentType<()> =
116    DataComponentType::new(Identifier::vanilla_static("damage_resistant"));
117
118pub const WEAPON: DataComponentType<()> =
119    DataComponentType::new(Identifier::vanilla_static("weapon"));
120
121pub const ATTACK_RANGE: DataComponentType<()> =
122    DataComponentType::new(Identifier::vanilla_static("attack_range"));
123
124pub const ENCHANTABLE: DataComponentType<()> =
125    DataComponentType::new(Identifier::vanilla_static("enchantable"));
126
127pub const REPAIRABLE: DataComponentType<()> =
128    DataComponentType::new(Identifier::vanilla_static("repairable"));
129
130pub const DEATH_PROTECTION: DataComponentType<()> =
131    DataComponentType::new(Identifier::vanilla_static("death_protection"));
132
133pub const BLOCKS_ATTACKS: DataComponentType<()> =
134    DataComponentType::new(Identifier::vanilla_static("blocks_attacks"));
135
136pub const PIERCING_WEAPON: DataComponentType<()> =
137    DataComponentType::new(Identifier::vanilla_static("piercing_weapon"));
138
139pub const KINETIC_WEAPON: DataComponentType<()> =
140    DataComponentType::new(Identifier::vanilla_static("kinetic_weapon"));
141
142pub const SWING_ANIMATION: DataComponentType<()> =
143    DataComponentType::new(Identifier::vanilla_static("swing_animation"));
144
145pub const ADDITIONAL_TRADE_COST: DataComponentType<()> =
146    DataComponentType::new(Identifier::vanilla_static("additional_trade_cost"));
147
148pub const STORED_ENCHANTMENTS: DataComponentType<ItemEnchantments> =
149    DataComponentType::new(Identifier::vanilla_static("stored_enchantments"));
150
151pub const DYE: DataComponentType<()> = DataComponentType::new(Identifier::vanilla_static("dye"));
152
153pub const DYED_COLOR: DataComponentType<()> =
154    DataComponentType::new(Identifier::vanilla_static("dyed_color"));
155
156pub const MAP_COLOR: DataComponentType<()> =
157    DataComponentType::new(Identifier::vanilla_static("map_color"));
158
159pub const MAP_ID: DataComponentType<()> =
160    DataComponentType::new(Identifier::vanilla_static("map_id"));
161
162pub const MAP_DECORATIONS: DataComponentType<()> =
163    DataComponentType::new(Identifier::vanilla_static("map_decorations"));
164
165pub const MAP_POST_PROCESSING: DataComponentType<()> =
166    DataComponentType::new(Identifier::vanilla_static("map_post_processing"));
167
168pub const CHARGED_PROJECTILES: DataComponentType<()> =
169    DataComponentType::new(Identifier::vanilla_static("charged_projectiles"));
170
171pub const BUNDLE_CONTENTS: DataComponentType<()> =
172    DataComponentType::new(Identifier::vanilla_static("bundle_contents"));
173
174pub const POTION_CONTENTS: DataComponentType<()> =
175    DataComponentType::new(Identifier::vanilla_static("potion_contents"));
176
177pub const SUSPICIOUS_STEW_EFFECTS: DataComponentType<()> =
178    DataComponentType::new(Identifier::vanilla_static("suspicious_stew_effects"));
179
180pub const WRITABLE_BOOK_CONTENT: DataComponentType<()> =
181    DataComponentType::new(Identifier::vanilla_static("writable_book_content"));
182
183pub const WRITTEN_BOOK_CONTENT: DataComponentType<()> =
184    DataComponentType::new(Identifier::vanilla_static("written_book_content"));
185
186pub const TRIM: DataComponentType<()> = DataComponentType::new(Identifier::vanilla_static("trim"));
187
188pub const DEBUG_STICK_STATE: DataComponentType<()> =
189    DataComponentType::new(Identifier::vanilla_static("debug_stick_state"));
190
191pub const ENTITY_DATA: DataComponentType<()> =
192    DataComponentType::new(Identifier::vanilla_static("entity_data"));
193
194pub const BUCKET_ENTITY_DATA: DataComponentType<()> =
195    DataComponentType::new(Identifier::vanilla_static("bucket_entity_data"));
196
197pub const BLOCK_ENTITY_DATA: DataComponentType<()> =
198    DataComponentType::new(Identifier::vanilla_static("block_entity_data"));
199
200pub const INSTRUMENT: DataComponentType<()> =
201    DataComponentType::new(Identifier::vanilla_static("instrument"));
202
203pub const PROVIDES_TRIM_MATERIAL: DataComponentType<()> =
204    DataComponentType::new(Identifier::vanilla_static("provides_trim_material"));
205
206pub const OMINOUS_BOTTLE_AMPLIFIER: DataComponentType<()> =
207    DataComponentType::new(Identifier::vanilla_static("ominous_bottle_amplifier"));
208
209pub const JUKEBOX_PLAYABLE: DataComponentType<()> =
210    DataComponentType::new(Identifier::vanilla_static("jukebox_playable"));
211
212pub const PROVIDES_BANNER_PATTERNS: DataComponentType<()> =
213    DataComponentType::new(Identifier::vanilla_static("provides_banner_patterns"));
214
215pub const RECIPES: DataComponentType<()> =
216    DataComponentType::new(Identifier::vanilla_static("recipes"));
217
218pub const LODESTONE_TRACKER: DataComponentType<()> =
219    DataComponentType::new(Identifier::vanilla_static("lodestone_tracker"));
220
221pub const FIREWORK_EXPLOSION: DataComponentType<()> =
222    DataComponentType::new(Identifier::vanilla_static("firework_explosion"));
223
224pub const FIREWORKS: DataComponentType<()> =
225    DataComponentType::new(Identifier::vanilla_static("fireworks"));
226
227pub const PROFILE: DataComponentType<()> =
228    DataComponentType::new(Identifier::vanilla_static("profile"));
229
230pub const BANNER_PATTERNS: DataComponentType<()> =
231    DataComponentType::new(Identifier::vanilla_static("banner_patterns"));
232
233pub const BASE_COLOR: DataComponentType<()> =
234    DataComponentType::new(Identifier::vanilla_static("base_color"));
235
236pub const POT_DECORATIONS: DataComponentType<()> =
237    DataComponentType::new(Identifier::vanilla_static("pot_decorations"));
238
239pub const CONTAINER: DataComponentType<()> =
240    DataComponentType::new(Identifier::vanilla_static("container"));
241
242pub const BLOCK_STATE: DataComponentType<()> =
243    DataComponentType::new(Identifier::vanilla_static("block_state"));
244
245pub const BEES: DataComponentType<()> = DataComponentType::new(Identifier::vanilla_static("bees"));
246
247pub const LOCK: DataComponentType<()> = DataComponentType::new(Identifier::vanilla_static("lock"));
248
249pub const CONTAINER_LOOT: DataComponentType<()> =
250    DataComponentType::new(Identifier::vanilla_static("container_loot"));
251
252pub const BREAK_SOUND: DataComponentType<()> =
253    DataComponentType::new(Identifier::vanilla_static("break_sound"));
254
255// Entity variant components
256pub const VILLAGER_VARIANT: DataComponentType<()> =
257    DataComponentType::new(Identifier::vanilla_static("villager/variant"));
258
259pub const WOLF_VARIANT: DataComponentType<()> =
260    DataComponentType::new(Identifier::vanilla_static("wolf/variant"));
261
262pub const WOLF_SOUND_VARIANT: DataComponentType<()> =
263    DataComponentType::new(Identifier::vanilla_static("wolf/sound_variant"));
264
265pub const WOLF_COLLAR: DataComponentType<()> =
266    DataComponentType::new(Identifier::vanilla_static("wolf/collar"));
267
268pub const FOX_VARIANT: DataComponentType<()> =
269    DataComponentType::new(Identifier::vanilla_static("fox/variant"));
270
271pub const SALMON_SIZE: DataComponentType<()> =
272    DataComponentType::new(Identifier::vanilla_static("salmon/size"));
273
274pub const PARROT_VARIANT: DataComponentType<()> =
275    DataComponentType::new(Identifier::vanilla_static("parrot/variant"));
276
277pub const TROPICAL_FISH_PATTERN: DataComponentType<()> =
278    DataComponentType::new(Identifier::vanilla_static("tropical_fish/pattern"));
279
280pub const TROPICAL_FISH_BASE_COLOR: DataComponentType<()> =
281    DataComponentType::new(Identifier::vanilla_static("tropical_fish/base_color"));
282
283pub const TROPICAL_FISH_PATTERN_COLOR: DataComponentType<()> =
284    DataComponentType::new(Identifier::vanilla_static("tropical_fish/pattern_color"));
285
286pub const MOOSHROOM_VARIANT: DataComponentType<()> =
287    DataComponentType::new(Identifier::vanilla_static("mooshroom/variant"));
288
289pub const RABBIT_VARIANT: DataComponentType<()> =
290    DataComponentType::new(Identifier::vanilla_static("rabbit/variant"));
291
292pub const PIG_VARIANT: DataComponentType<()> =
293    DataComponentType::new(Identifier::vanilla_static("pig/variant"));
294
295pub const PIG_SOUND_VARIANT: DataComponentType<()> =
296    DataComponentType::new(Identifier::vanilla_static("pig/sound_variant"));
297
298pub const COW_VARIANT: DataComponentType<()> =
299    DataComponentType::new(Identifier::vanilla_static("cow/variant"));
300
301pub const COW_SOUND_VARIANT: DataComponentType<()> =
302    DataComponentType::new(Identifier::vanilla_static("cow/sound_variant"));
303
304pub const CHICKEN_VARIANT: DataComponentType<()> =
305    DataComponentType::new(Identifier::vanilla_static("chicken/variant"));
306
307pub const CHICKEN_SOUND_VARIANT: DataComponentType<()> =
308    DataComponentType::new(Identifier::vanilla_static("chicken/sound_variant"));
309
310pub const ZOMBIE_NAUTILUS_VARIANT: DataComponentType<()> =
311    DataComponentType::new(Identifier::vanilla_static("zombie_nautilus/variant"));
312
313pub const FROG_VARIANT: DataComponentType<()> =
314    DataComponentType::new(Identifier::vanilla_static("frog/variant"));
315
316pub const HORSE_VARIANT: DataComponentType<()> =
317    DataComponentType::new(Identifier::vanilla_static("horse/variant"));
318
319pub const PAINTING_VARIANT: DataComponentType<()> =
320    DataComponentType::new(Identifier::vanilla_static("painting/variant"));
321
322pub const LLAMA_VARIANT: DataComponentType<()> =
323    DataComponentType::new(Identifier::vanilla_static("llama/variant"));
324
325pub const AXOLOTL_VARIANT: DataComponentType<()> =
326    DataComponentType::new(Identifier::vanilla_static("axolotl/variant"));
327
328pub const CAT_VARIANT: DataComponentType<()> =
329    DataComponentType::new(Identifier::vanilla_static("cat/variant"));
330
331pub const CAT_SOUND_VARIANT: DataComponentType<()> =
332    DataComponentType::new(Identifier::vanilla_static("cat/sound_variant"));
333
334pub const CAT_COLLAR: DataComponentType<()> =
335    DataComponentType::new(Identifier::vanilla_static("cat/collar"));
336
337pub const SHEEP_COLOR: DataComponentType<()> =
338    DataComponentType::new(Identifier::vanilla_static("sheep/color"));
339
340pub const SHULKER_COLOR: DataComponentType<()> =
341    DataComponentType::new(Identifier::vanilla_static("shulker/color"));
342
343/// Helper to create stub reader/writer functions for unimplemented components.
344/// These components use the Todo variant as a placeholder.
345macro_rules! register_stub {
346    ($registry:expr, $key:expr) => {{
347        fn network_reader(cursor: &mut std::io::Cursor<&[u8]>) -> std::io::Result<ComponentData> {
348            // Stub: read nothing, return Todo
349            let _ = cursor;
350            Ok(ComponentData::Todo)
351        }
352
353        fn network_writer(data: &ComponentData, _writer: &mut Vec<u8>) -> std::io::Result<()> {
354            // Stub: write nothing
355            let _ = data;
356            Ok(())
357        }
358
359        fn nbt_reader(_tag: simdnbt::borrow::NbtTag) -> Option<ComponentData> {
360            Some(ComponentData::Todo)
361        }
362
363        fn nbt_writer(_data: &ComponentData) -> simdnbt::owned::NbtTag {
364            simdnbt::owned::NbtTag::Compound(simdnbt::owned::NbtCompound::new())
365        }
366
367        $registry.register_dynamic(
368            $key,
369            crate::data_components::ComponentDataDiscriminant::Todo,
370            network_reader,
371            network_writer,
372            nbt_reader,
373            nbt_writer,
374        );
375    }};
376}
377
378/// Network reader for VarInt-encoded i32 components.
379fn varint_reader(cursor: &mut std::io::Cursor<&[u8]>) -> std::io::Result<ComponentData> {
380    use steel_utils::{codec::VarInt, serial::ReadFrom};
381    let value = VarInt::read(cursor)?;
382    Ok(ComponentData::I32(value.0))
383}
384
385/// Network writer for VarInt-encoded i32 components.
386fn varint_writer(data: &ComponentData, writer: &mut Vec<u8>) -> std::io::Result<()> {
387    use steel_utils::{codec::VarInt, serial::WriteTo};
388    if let ComponentData::I32(v) = data {
389        VarInt(*v).write(writer)
390    } else {
391        Err(std::io::Error::other("Component type mismatch"))
392    }
393}
394
395/// Registers all vanilla data components.
396///
397/// IMPORTANT: The registration order MUST match vanilla's DataComponents.java exactly,
398/// as the component's network ID is determined by its registration order.
399pub fn register_vanilla_data_components(registry: &mut DataComponentRegistry) {
400    use crate::data_components::ComponentDataDiscriminant;
401
402    // Order must match vanilla's DataComponents.java exactly!
403    // 0: custom_data
404    register_stub!(registry, CUSTOM_DATA.key.clone());
405    // 1: max_stack_size
406    registry.register_custom_network(
407        MAX_STACK_SIZE,
408        ComponentDataDiscriminant::I32,
409        varint_reader,
410        varint_writer,
411    );
412    // 2: max_damage
413    registry.register_custom_network(
414        MAX_DAMAGE,
415        ComponentDataDiscriminant::I32,
416        varint_reader,
417        varint_writer,
418    );
419    // 3: damage
420    registry.register_custom_network(
421        DAMAGE,
422        ComponentDataDiscriminant::I32,
423        varint_reader,
424        varint_writer,
425    );
426    // 4: unbreakable
427    registry.register(UNBREAKABLE, ComponentDataDiscriminant::Empty);
428    // 5: use_effects
429    register_stub!(registry, USE_EFFECTS.key.clone());
430    // 6: custom_name
431    registry.register(CUSTOM_NAME, ComponentDataDiscriminant::TextComponent);
432    // 7: minimum_attack_charge
433    register_stub!(registry, MINIMUM_ATTACK_CHARGE.key.clone());
434    // 8: damage_type
435    register_stub!(registry, DAMAGE_TYPE.key.clone());
436    // 9: item_name
437    registry.register(ITEM_NAME, ComponentDataDiscriminant::TextComponent);
438    // 10: item_model
439    register_stub!(registry, ITEM_MODEL.key.clone());
440    // 11: lore
441    register_stub!(registry, LORE.key.clone());
442    // 12: rarity
443    register_stub!(registry, RARITY.key.clone());
444    // 13: enchantments
445    registry.register(ENCHANTMENTS, ComponentDataDiscriminant::Enchantments);
446    // 14: can_place_on
447    register_stub!(registry, CAN_PLACE_ON.key.clone());
448    // 15: can_break
449    register_stub!(registry, CAN_BREAK.key.clone());
450    // 16: attribute_modifiers
451    register_stub!(registry, ATTRIBUTE_MODIFIERS.key.clone());
452    // 17: custom_model_data
453    register_stub!(registry, CUSTOM_MODEL_DATA.key.clone());
454    // 18: tooltip_display
455    register_stub!(registry, TOOLTIP_DISPLAY.key.clone());
456    // 19: repair_cost
457    registry.register_custom_network(
458        REPAIR_COST,
459        ComponentDataDiscriminant::I32,
460        varint_reader,
461        varint_writer,
462    );
463    // 20: creative_slot_lock
464    registry.register(CREATIVE_SLOT_LOCK, ComponentDataDiscriminant::Empty);
465    // 21: enchantment_glint_override
466    registry.register(ENCHANTMENT_GLINT_OVERRIDE, ComponentDataDiscriminant::Bool);
467    // 22: intangible_projectile
468    registry.register(INTANGIBLE_PROJECTILE, ComponentDataDiscriminant::Empty);
469    // 23: food
470    register_stub!(registry, FOOD.key.clone());
471    // 24: consumable
472    register_stub!(registry, CONSUMABLE.key.clone());
473    // 25: use_remainder
474    register_stub!(registry, USE_REMAINDER.key.clone());
475    // 26: use_cooldown
476    register_stub!(registry, USE_COOLDOWN.key.clone());
477    // 27: damage_resistant
478    register_stub!(registry, DAMAGE_RESISTANT.key.clone());
479    // 28: tool
480    registry.register(TOOL, ComponentDataDiscriminant::Tool);
481    // 29: weapon
482    register_stub!(registry, WEAPON.key.clone());
483    // 30: attack_range
484    register_stub!(registry, ATTACK_RANGE.key.clone());
485    // 31: enchantable
486    register_stub!(registry, ENCHANTABLE.key.clone());
487    // 32: equippable
488    registry.register(EQUIPPABLE, ComponentDataDiscriminant::Equippable);
489    // 33: repairable
490    register_stub!(registry, REPAIRABLE.key.clone());
491    // 34: glider
492    registry.register(GLIDER, ComponentDataDiscriminant::Empty);
493    // 35: tooltip_style
494    register_stub!(registry, TOOLTIP_STYLE.key.clone());
495    // 36: death_protection
496    register_stub!(registry, DEATH_PROTECTION.key.clone());
497    // 37: blocks_attacks
498    register_stub!(registry, BLOCKS_ATTACKS.key.clone());
499    // 38: piercing_weapon
500    register_stub!(registry, PIERCING_WEAPON.key.clone());
501    // 39: kinetic_weapon
502    register_stub!(registry, KINETIC_WEAPON.key.clone());
503    // 40: swing_animation
504    register_stub!(registry, SWING_ANIMATION.key.clone());
505    // 41: additional_trade_cost
506    register_stub!(registry, ADDITIONAL_TRADE_COST.key.clone());
507    // 42: stored_enchantments
508    registry.register(STORED_ENCHANTMENTS, ComponentDataDiscriminant::Enchantments);
509    // 43: dye
510    register_stub!(registry, DYE.key.clone());
511    // 44: dyed_color
512    register_stub!(registry, DYED_COLOR.key.clone());
513    // 45: map_color
514    register_stub!(registry, MAP_COLOR.key.clone());
515    // 46: map_id
516    register_stub!(registry, MAP_ID.key.clone());
517    // 47: map_decorations
518    register_stub!(registry, MAP_DECORATIONS.key.clone());
519    // 48: map_post_processing
520    register_stub!(registry, MAP_POST_PROCESSING.key.clone());
521    // 49: charged_projectiles
522    register_stub!(registry, CHARGED_PROJECTILES.key.clone());
523    // 50: bundle_contents
524    register_stub!(registry, BUNDLE_CONTENTS.key.clone());
525    // 51: potion_contents
526    register_stub!(registry, POTION_CONTENTS.key.clone());
527    // 52: potion_duration_scale
528    registry.register(POTION_DURATION_SCALE, ComponentDataDiscriminant::Float);
529    // 53: suspicious_stew_effects
530    register_stub!(registry, SUSPICIOUS_STEW_EFFECTS.key.clone());
531    // 54: writable_book_content
532    register_stub!(registry, WRITABLE_BOOK_CONTENT.key.clone());
533    // 55: written_book_content
534    register_stub!(registry, WRITTEN_BOOK_CONTENT.key.clone());
535    // 56: trim
536    register_stub!(registry, TRIM.key.clone());
537    // 57: debug_stick_state
538    register_stub!(registry, DEBUG_STICK_STATE.key.clone());
539    // 58: entity_data
540    register_stub!(registry, ENTITY_DATA.key.clone());
541    // 59: bucket_entity_data
542    register_stub!(registry, BUCKET_ENTITY_DATA.key.clone());
543    // 60: block_entity_data
544    register_stub!(registry, BLOCK_ENTITY_DATA.key.clone());
545    // 61: instrument
546    register_stub!(registry, INSTRUMENT.key.clone());
547    // 62: provides_trim_material
548    register_stub!(registry, PROVIDES_TRIM_MATERIAL.key.clone());
549    // 63: ominous_bottle_amplifier
550    register_stub!(registry, OMINOUS_BOTTLE_AMPLIFIER.key.clone());
551    // 64: jukebox_playable
552    register_stub!(registry, JUKEBOX_PLAYABLE.key.clone());
553    // 65: provides_banner_patterns
554    register_stub!(registry, PROVIDES_BANNER_PATTERNS.key.clone());
555    // 66: recipes
556    register_stub!(registry, RECIPES.key.clone());
557    // 67: lodestone_tracker
558    register_stub!(registry, LODESTONE_TRACKER.key.clone());
559    // 68: firework_explosion
560    register_stub!(registry, FIREWORK_EXPLOSION.key.clone());
561    // 69: fireworks
562    register_stub!(registry, FIREWORKS.key.clone());
563    // 70: profile
564    register_stub!(registry, PROFILE.key.clone());
565    // 71: note_block_sound
566    register_stub!(registry, NOTE_BLOCK_SOUND.key.clone());
567    // 72: banner_patterns
568    register_stub!(registry, BANNER_PATTERNS.key.clone());
569    // 73: base_color
570    register_stub!(registry, BASE_COLOR.key.clone());
571    // 74: pot_decorations
572    register_stub!(registry, POT_DECORATIONS.key.clone());
573    // 75: container
574    register_stub!(registry, CONTAINER.key.clone());
575    // 76: block_state
576    register_stub!(registry, BLOCK_STATE.key.clone());
577    // 77: bees
578    register_stub!(registry, BEES.key.clone());
579    // 78: lock
580    register_stub!(registry, LOCK.key.clone());
581    // 79: container_loot
582    register_stub!(registry, CONTAINER_LOOT.key.clone());
583    // 80: break_sound
584    register_stub!(registry, BREAK_SOUND.key.clone());
585    // 81: villager/variant
586    register_stub!(registry, VILLAGER_VARIANT.key.clone());
587    // 82: wolf/variant
588    register_stub!(registry, WOLF_VARIANT.key.clone());
589    // 83: wolf/sound_variant
590    register_stub!(registry, WOLF_SOUND_VARIANT.key.clone());
591    // 84: wolf/collar
592    register_stub!(registry, WOLF_COLLAR.key.clone());
593    // 85: fox/variant
594    register_stub!(registry, FOX_VARIANT.key.clone());
595    // 86: salmon/size
596    register_stub!(registry, SALMON_SIZE.key.clone());
597    // 87: parrot/variant
598    register_stub!(registry, PARROT_VARIANT.key.clone());
599    // 88: tropical_fish/pattern
600    register_stub!(registry, TROPICAL_FISH_PATTERN.key.clone());
601    // 89: tropical_fish/base_color
602    register_stub!(registry, TROPICAL_FISH_BASE_COLOR.key.clone());
603    // 90: tropical_fish/pattern_color
604    register_stub!(registry, TROPICAL_FISH_PATTERN_COLOR.key.clone());
605    // 91: mooshroom/variant
606    register_stub!(registry, MOOSHROOM_VARIANT.key.clone());
607    // 92: rabbit/variant
608    register_stub!(registry, RABBIT_VARIANT.key.clone());
609    // 93: pig/variant
610    register_stub!(registry, PIG_VARIANT.key.clone());
611    // 94: pig/sound_variant
612    register_stub!(registry, PIG_SOUND_VARIANT.key.clone());
613    // 95: cow/variant
614    register_stub!(registry, COW_VARIANT.key.clone());
615    // 96: cow/sound_variant
616    register_stub!(registry, COW_SOUND_VARIANT.key.clone());
617    // 97: chicken/variant
618    register_stub!(registry, CHICKEN_VARIANT.key.clone());
619    // 98: chicken/sound_variant
620    register_stub!(registry, CHICKEN_SOUND_VARIANT.key.clone());
621    // 99: zombie_nautilus/variant
622    register_stub!(registry, ZOMBIE_NAUTILUS_VARIANT.key.clone());
623    // 100: frog/variant
624    register_stub!(registry, FROG_VARIANT.key.clone());
625    // 101: horse/variant
626    register_stub!(registry, HORSE_VARIANT.key.clone());
627    // 102: painting/variant
628    register_stub!(registry, PAINTING_VARIANT.key.clone());
629    // 103: llama/variant
630    register_stub!(registry, LLAMA_VARIANT.key.clone());
631    // 104: axolotl/variant
632    register_stub!(registry, AXOLOTL_VARIANT.key.clone());
633    // 105: cat/variant
634    register_stub!(registry, CAT_VARIANT.key.clone());
635    // 106: cat/sound_variant
636    register_stub!(registry, CAT_SOUND_VARIANT.key.clone());
637    // 107: cat/collar
638    register_stub!(registry, CAT_COLLAR.key.clone());
639    // 108: sheep/color
640    register_stub!(registry, SHEEP_COLOR.key.clone());
641    // 109: shulker/color
642    register_stub!(registry, SHULKER_COLOR.key.clone());
643}