11<#include "mcitems.ftl" >
22<#function hasToolContext >
3- <#return data.type == "Block" || data.type == "Fishing" || data.type == "Generic" >
3+ <#return data.type == "Block" || data.type == "Fishing" || data.type == "Generic" >
44</#function >
55{
66 "type": "minecraft:${data.type?lower_case?replace(" ", "_") } ",
1717 </#if >
1818 <#if pool.hasbonusrolls >
1919 <#if pool.minbonusrolls == pool.maxbonusrolls >
20- "bonus_rolls": ${pool.minbonusrolls} ,
20+ "bonus_rolls": ${pool.minbonusrolls} ,
2121 <#else >
22- "bonus_rolls": {
23- "min": ${pool.minbonusrolls} ,
24- "max": ${pool.maxbonusrolls}
25- },
22+ "bonus_rolls": {
23+ "min": ${pool.minbonusrolls} ,
24+ "max": ${pool.maxbonusrolls}
25+ },
2626 </#if >
2727 </#if >
2828 "entries": [
2929 <#list pool.entries as entry >
3030 {
31+ <#assign item = mappedMCItemToRegistryName(entry.item) >
32+ <#if entry.item.isAir() || item == "minecraft:air" >
33+ "type": "minecraft:empty",
34+ <#else >
3135 "type": "minecraft:${entry.type} ",
32- "name": "${mappedMCItemToRegistryName(entry.item)} ",
36+ "name": "${item} ",
37+ </#if >
3338 "weight": ${entry.weight} ,
3439 <#if entry.silkTouchMode == 1 && hasToolContext() >
3540 "conditions": [
6873 ],
6974 </#if >
7075 "functions": [
71- {
72- "function": "set_count",
73- "count": {
74- "min": ${entry.minCount} ,
75- "max": ${entry.maxCount}
76- }
77- }
78- <#if entry.minEnchantmentLevel != 0 || entry.maxEnchantmentLevel != 0 >
79- ,{
80- "function": "enchant_with_levels",
81- "treasure": true,
82- "levels": {
83- "min": ${entry.minEnchantmentLevel} ,
84- "max": ${entry.maxEnchantmentLevel}
85- }
86- }
87- </#if >
88- <#if entry.explosionDecay >
89- ,{
90- "function": "minecraft:explosion_decay"
76+ {
77+ "function": "minecraft:set_count",
78+ "count": {
79+ "min": ${entry.minCount} ,
80+ "max": ${entry.maxCount}
9181 }
92- </#if >
93- <#if entry.affectedByFortune && hasToolContext() >
94- ,{
95- "function": "minecraft:apply_bonus",
96- "enchantment": "minecraft:fortune",
97- "formula": "minecraft:ore_drops"
82+ }
83+ <#if entry.minEnchantmentLevel != 0 || entry.maxEnchantmentLevel != 0 >
84+ ,{
85+ "function": "minecraft:enchant_with_levels",
86+ "treasure": true,
87+ "levels": {
88+ "min": ${entry.minEnchantmentLevel} ,
89+ "max": ${entry.maxEnchantmentLevel}
9890 }
99- </#if >
91+ }
92+ </#if >
93+ <#if entry.explosionDecay >
94+ ,{
95+ "function": "minecraft:explosion_decay"
96+ }
97+ </#if >
98+ <#if entry.affectedByFortune && hasToolContext() >
99+ ,{
100+ "function": "minecraft:apply_bonus",
101+ "enchantment": "minecraft:fortune",
102+ "formula": "minecraft:ore_drops"
103+ }
104+ </#if >
100105 ]
101106 }
102107 <#if entry?has_next >,</#if >
103108 </#list >
104109 ]
105- }
106- <#if pool?has_next >,</#if >
110+ }<#if pool?has_next >,</#if >
107111 </#list >
108112 ]
109113}
0 commit comments