|
169 | 169 | <#return (extension?has_content)?then("_" + extension, "")> |
170 | 170 | </#function> |
171 | 171 |
|
172 | | -<#function mappedMCItemToItemObjectJSON mappedBlock> |
| 172 | +<#function mappedMCItemToItemObjectJSON mappedBlock itemKey="item"> |
173 | 173 | <#if mappedBlock.getUnmappedValue().startsWith("CUSTOM:")> |
174 | 174 | <#assign customelement = generator.getRegistryNameFromFullName(mappedBlock.getUnmappedValue())!""/> |
175 | 175 | <#if customelement?has_content> |
176 | | - <#return "\"item\": \"" + "${modid}:" + customelement |
| 176 | + <#return "\"" + itemKey + "\": \"" + "${modid}:" + customelement |
177 | 177 | + transformExtension(mappedBlock) |
178 | 178 | + "\""> |
179 | 179 | <#else> |
180 | | - <#return "\"item\": \"minecraft:air\""> |
| 180 | + <#return "\"" + itemKey + "\": \"minecraft:air\""> |
181 | 181 | </#if> |
182 | 182 | <#elseif mappedBlock.getUnmappedValue().startsWith("TAG:")> |
183 | 183 | <#return "\"tag\": \"" + mappedBlock.getUnmappedValue().replace("TAG:", "").replace("mod:", modid + ":")?lower_case + "\""> |
|
186 | 186 | <#if mapped.startsWith("#")> |
187 | 187 | <#return "\"tag\": \"" + mapped.replace("#", "") + "\""> |
188 | 188 | <#elseif mapped.contains(":")> |
189 | | - <#return "\"item\": \"" + mapped + "\""> |
| 189 | + <#return "\"" + itemKey + "\": \"" + mapped + "\""> |
190 | 190 | <#else> |
191 | | - <#return "\"item\": \"minecraft:" + mapped + "\""> |
| 191 | + <#return "\"" + itemKey + "\": \"minecraft:" + mapped + "\""> |
192 | 192 | </#if> |
193 | 193 | </#if> |
194 | 194 | </#function> |
|
318 | 318 | <#assign properties += [{"name": "axis", "value": "y"}] /> |
319 | 319 | </#if> |
320 | 320 | </#if> |
| 321 | + <#list ge.customProperties as prop> |
| 322 | + <#assign properties += [{"name": prop.property().getName().replace("CUSTOM:", ""), "value": prop.value()}] /> |
| 323 | + </#list> |
321 | 324 | </#if> |
322 | 325 | </#if> |
323 | 326 |
|
|
0 commit comments