Data Pack Generators and Tools for Minecraft 1.15, 1.16, 1.17, 1.18, 1.19, 1.20, 1.21
545
stars
71
forks
source link
Unable to specify certain parts of components, including removing properly formatted components #522
Closed
Endernice61 closed 4 months ago
The following works fine in game:
{ "pools": [ { "rolls": 1, "entries": [ { "type": "minecraft:item", "name": "minecraft:wheat_seeds", "functions": [ { "function": "minecraft:apply_bonus", "enchantment": "minecraft:fortune", "formula": "minecraft:uniform_bonus_count", "parameters": { "bonusMultiplier": 2 } }, { "function": "minecraft:explosion_decay" } ], "conditions": [ { "condition": "minecraft:random_chance", "chance": 0.125 } ] } ] }, { "rolls": 1, "entries": [ { "type": "minecraft:item", "weight": 4, "name": "minecraft:cave_spider_spawn_egg" }, { "type": "minecraft:item", "weight": 1, "name": "minecraft:silverfish_spawn_egg", "functions": [ { "function": "minecraft:set_components", "components": { "entity_data": { "id": "silverfish", "PersistenceRequired":1, "CustomName":"{\"text\":\"\"}" } } }, { "function": "minecraft:set_name", "name": { "text": "Bug Eggs", "italic": false } } ] } ], "conditions": [ { "condition": "minecraft:random_chance", "chance": 0.125 } ] } ] }
But when put into the loot table generator it gets turned into:{ "pools": [ { "rolls": 1, "entries": [ { "type": "minecraft:item", "name": "minecraft:wheat_seeds", "functions": [ { "function": "minecraft:apply_bonus", "enchantment": "minecraft:fortune", "formula": "minecraft:uniform_bonus_count", "parameters": { "bonusMultiplier": 2 } }, { "function": "minecraft:explosion_decay" } ], "conditions": [ { "condition": "minecraft:random_chance", "chance": 0.125 } ] } ] }, { "rolls": 1, "entries": [ { "type": "minecraft:item", "name": "minecraft:cave_spider_spawn_egg", "weight": 4 }, { "type": "minecraft:item", "name": "minecraft:silverfish_spawn_egg", "weight": 1, "functions": [ { "function": "minecraft:set_components", "components": { "entity_data": { "id": "minecraft:silverfish" } } }, { "function": "minecraft:set_name", "name": { "text": "Bug Eggs", "italic": false } } ] } ], "conditions": [ { "condition": "minecraft:random_chance", "chance": 0.125 } ] } ] }