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

Commit

Permalink
Custom Block Item Support
Browse files Browse the repository at this point in the history
  • Loading branch information
NOYB authored Jul 28, 2020
1 parent 291d737 commit b00387c
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 b00387c

Please sign in to comment.