11<#function mappedBlockToBlockStateProvider mappedBlock >
22 <#if mappedBlock?starts_with("/*@BlockStateProvider*/") >
33 <#return mappedBlock?replace("/*@BlockStateProvider*/", "") >
4- <#elseif featureType == "configured_feature_reference" >
5- <#return '{"feature": ' + featureConfig + ', "placement": [' + placement?remove_ending(",") + ' ]}'>
64 <#else >
75 <#return '{"type": "minecraft:simple_state_provider", "state": ' + mappedBlock + '}' >
86 </#if >
1311 <#return (extension?has_content)?then("_" + extension, "") >
1412</#function >
1513
16- <#function mappedMCItemToItemObjectJSON mappedBlock >
14+ <#function mappedMCItemToItemObjectJSON mappedBlock itemKey="item" >
1715 <#if mappedBlock.getUnmappedValue().startsWith("CUSTOM:") >
1816 <#assign customelement = generator.getRegistryNameFromFullName(mappedBlock.getUnmappedValue())!""/ >
1917 <#if customelement?has_content >
20- <#return "\"item \": \"" + "${modid} :" + customelement
18+ <#return "\"" + itemKey + " \": \"" + "${modid} :" + customelement
2119 + transformExtension(mappedBlock)
2220 + "\"">
2321 <#else >
24- <#return "\"item \": \"minecraft:air\"" >
22+ <#return "\"" + itemKey + " \": \"minecraft:air\"" >
2523 </#if >
2624 <#elseif mappedBlock.getUnmappedValue().startsWith("TAG:") >
2725 <#return "\"tag\": \"" + mappedBlock.getUnmappedValue().replace("TAG:", "").replace("mod:", modid + ":")?lower_case + "\"" >
3028 <#if mapped.startsWith("#") >
3129 <#return "\"tag\": \"" + mapped.replace("#", "") + "\"" >
3230 <#elseif mapped.contains(":") >
33- <#return "\"item \": \"" + mapped + "\"" >
31+ <#return "\"" + itemKey + " \": \"" + mapped + "\"" >
3432 <#else >
35- <#return "\"item \": \"minecraft:" + mapped + "\"" >
33+ <#return "\"" + itemKey + " \": \"minecraft:" + mapped + "\"" >
3634 </#if >
3735 </#if >
3836</#function >
9088 </#if >
9189 </#if >
9290 <#return '{ "Name": "minecraft:air" }' >
93- </#function >
91+ </#function >
0 commit comments