Skip to content

Instantly share code, notes, and snippets.

@Lemonszz
Last active July 15, 2019 02:24
Show Gist options
  • Save Lemonszz/b48bd724480416c1498053d904b753f0 to your computer and use it in GitHub Desktop.
Save Lemonszz/b48bd724480416c1498053d904b753f0 to your computer and use it in GitHub Desktop.
How to overlay your ore texture for resource pack compatibility
{
"parent": "your_cool_modid:block/cube_overlayed",
"textures": {
"particle": "#all",
"down": "#all",
"up": "#all",
"north": "#all",
"east": "#all",
"south": "#all",
"west": "#all",
"down_overlay": "#overlay",
"up_overlay": "#overlay",
"north_overlay": "#overlay",
"east_overlay": "#overlay",
"south_overlay": "#overlay",
"west_overlay": "#overlay"
}
}
{
"parent": "block/block",
"elements": [
{
"from": [ 0, 0, 0 ],
"to": [ 16, 16, 16 ],
"faces": {
"down": { "uv": [ 0, 0, 16, 16 ], "texture": "#down", "cullface": "down" },
"up": { "uv": [ 0, 0, 16, 16 ], "texture": "#up", "cullface": "up" },
"north":{ "uv": [ 0, 0, 16, 16 ], "texture": "#north", "cullface": "north" },
"south":{ "uv": [ 0, 0, 16, 16 ], "texture": "#south", "cullface": "south" },
"west": { "uv": [ 0, 0, 16, 16 ], "texture": "#west", "cullface": "west" },
"east": { "uv": [ 0, 0, 16, 16 ], "texture": "#east", "cullface": "east" }
}
},
{
"from": [ 0, 0, 0 ],
"to": [ 16, 16, 16 ],
"faces": {
"down": { "uv": [ 0, 0, 16, 16 ], "texture": "#down_overlay", "cullface": "down" },
"up": { "uv": [ 0, 0, 16, 16 ], "texture": "#up_overlay", "cullface": "up" },
"north":{ "uv": [ 0, 0, 16, 16 ], "texture": "#north_overlay", "cullface": "north" },
"south":{ "uv": [ 0, 0, 16, 16 ], "texture": "#south_overlay", "cullface": "south" },
"west": { "uv": [ 0, 0, 16, 16 ], "texture": "#west_overlay", "cullface": "west" },
"east": { "uv": [ 0, 0, 16, 16 ], "texture": "#east_overlay", "cullface": "east" }
}
}
]
}
How to use:
cube_all_overlayed.json
cube_overlayed.json
ore.json
are all block model files yhat should go in /assets/MODID/models/block/
tin_ore.json
is an example blockstate that should go in /assets/MODID/blockstates/
Your texture should be your ore texture without any stone background, just the ore part
Repalace all instances of "your_cool_modid" with your mod id
{
"parent": "your_cool_modid:block/cube_all_overlayed",
"textures": {
"all": "blocks/stone",
"overlay": "#ore"
}
}
{
"forge_marker": 1,
"defaults": {
"textures": {
"ore": "your_cool_modid:blocks/tin_ore",
"all": "blocks/stone"
},
"model": "your_cool_modid:ore",
"uvlock": true
},
"variants": {
"normal": [{}],
"inventory":
{
"transform": "forge:default-block"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment