Skip to content

Commit 5f165fb

Browse files
committed
Fix
1 parent 129cd67 commit 5f165fb

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/main/resources/neoforge-1.20.4/utils/mcitems.ftl

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -169,15 +169,15 @@
169169
<#return (extension?has_content)?then("_" + extension, "")>
170170
</#function>
171171

172-
<#function mappedMCItemToItemObjectJSON mappedBlock>
172+
<#function mappedMCItemToItemObjectJSON mappedBlock itemKey="item">
173173
<#if mappedBlock.getUnmappedValue().startsWith("CUSTOM:")>
174174
<#assign customelement = generator.getRegistryNameFromFullName(mappedBlock.getUnmappedValue())!""/>
175175
<#if customelement?has_content>
176-
<#return "\"item\": \"" + "${modid}:" + customelement
176+
<#return "\"" + itemKey + "\": \"" + "${modid}:" + customelement
177177
+ transformExtension(mappedBlock)
178178
+ "\"">
179179
<#else>
180-
<#return "\"item\": \"minecraft:air\"">
180+
<#return "\"" + itemKey + "\": \"minecraft:air\"">
181181
</#if>
182182
<#elseif mappedBlock.getUnmappedValue().startsWith("TAG:")>
183183
<#return "\"tag\": \"" + mappedBlock.getUnmappedValue().replace("TAG:", "").replace("mod:", modid + ":")?lower_case + "\"">
@@ -186,9 +186,9 @@
186186
<#if mapped.startsWith("#")>
187187
<#return "\"tag\": \"" + mapped.replace("#", "") + "\"">
188188
<#elseif mapped.contains(":")>
189-
<#return "\"item\": \"" + mapped + "\"">
189+
<#return "\"" + itemKey + "\": \"" + mapped + "\"">
190190
<#else>
191-
<#return "\"item\": \"minecraft:" + mapped + "\"">
191+
<#return "\"" + itemKey + "\": \"minecraft:" + mapped + "\"">
192192
</#if>
193193
</#if>
194194
</#function>
@@ -318,6 +318,9 @@
318318
<#assign properties += [{"name": "axis", "value": "y"}] />
319319
</#if>
320320
</#if>
321+
<#list ge.customProperties as prop>
322+
<#assign properties += [{"name": prop.property().getName().replace("CUSTOM:", ""), "value": prop.value()}] />
323+
</#list>
321324
</#if>
322325
</#if>
323326

0 commit comments

Comments
 (0)