Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Commit

Permalink
Merge pull request #6 from NOYBss/2020.4
Browse files Browse the repository at this point in the history
Custom Block Item Support
  • Loading branch information
KlemenDEV authored Jul 29, 2020
2 parents 291d737 + b00387c commit fa8e382
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
13 changes: 12 additions & 1 deletion forge-1.12.2/templates/json/block_item.json.ftl
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
<#-- @formatter:off -->
<#if data.itemTexture?has_content>
{
"parent": "item/generated",
"textures": {
"layer0": "${modid}:items/${data.itemTexture}"
}
}
<#else>
{
"parent": "${modid}:block/${registryname}",
"display": {
Expand All @@ -19,4 +28,6 @@
]
}
}
}
}
</#if>
<#-- @formatter:on -->
10 changes: 8 additions & 2 deletions forge-1.12.2/templates/json/block_item_cmodel.json.ftl
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
<#-- @formatter:off -->
{
"parent": "item/handheld",
"textures": {
"layer0": "${modid}:blocks/${data.texture}"
<#if data.itemTexture?has_content>
"layer0": "${modid}:items/${data.itemTexture}"
<#else>
"layer0": "${modid}:blocks/${data.texture}"
</#if>
}
}
}
<#-- @formatter:on -->

0 comments on commit fa8e382

Please sign in to comment.