-
Bug
-
Resolution: Duplicate
-
None
-
1.20.5
-
None
-
Unconfirmed
-
(Unassigned)
If the `set_components` function is used to set the `entity_data` component of a spawn egg or similar in a loot table or item modifier, and any of HandDropChances, ArmorDropChances, aor body_drop_chance is specified, those tags will be invalid, and will not be applied to the resulting entity.
This appears to happen because `set_components` sets those components in the item as byte values instead of the required float values.
For example, the following loot table:
generates a spawn egg with the following data:
{components: {"minecraft:entity_data": {ArmorDropChances: [B; -10B, -10B, -10B, -10B], body_armor_drop_chance: -1b, ArmorItems: [\{count: 1b, id: "minecraft:diamond_boots"}, \{count: 1b, id: "minecraft:diamond_leggings"}, \{count: 1b, id: "minecraft:diamond_chestplate"}, \{count: 1b, id: "minecraft:diamond_helmet"}], HandDropChances: [B; 1B, 1B], id: "minecraft:zombie_villager", HandItems: [\{count: 1b, id: "minecraft:diamond_sword"}, {}]}}, count: 2, id: "minecraft:zombie_villager_spawn_egg"}
Using said spawn egg generates a zombie villager with default values for its ArmorDropChances and HandDropChances tags.
- duplicates
-
MC-270965 The data type of the "minecraft:custom_data" component of the recipe result will be forcibly modified
- Resolved