Skip to content

Commit 5a6b030

Browse files
committed
Fix
1 parent e50c281 commit 5a6b030

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/main/resources/forge-1.15.2/utils/mcitems.ftl

Lines changed: 6 additions & 6 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>
@@ -376,4 +376,4 @@
376376

377377
<#function toStatetoFeatureState block>
378378
<#return toFeatureState(mappedBlockToBlockStateCode(block))>
379-
</#function>
379+
</#function>

0 commit comments

Comments
 (0)