Forge Blockstates
Now that we’ve got our copper ore block, let’s add a simple blockstate to give it a texture. This will go in a file at src/main/resources/assets/tutorial/blockstates/ore_copper.json.
{
	"forge_marker": 1,
	"defaults": {
		"textures": {
			"all": "tutorial:blocks/ore_copper"
		}
	},
	"variants": {
		"normal": {
			"model": "cube_all"
		},
		"inventory": {
			"model": "cube_all"
		}
	}
}
- forge_marker(L2): This tells Forge to use its custom blockstate parser instead of Minecraft’s which isn’t as good. (See here for more info about Forge’s blockstate format)
- defaults(L3-L7): Defaults are things to apply for all variants, a feature added by Forge’s blockstate format.
- textures(L4-L6): This specifies which textures to use for the- cube_allmodel. This uses the same texture format as explained in the JSON Item Models tutorial.
- variants(L8-L15): Inside of this block are where all of our individual variants go. Because we don’t have any custom block properties, we have the- normalvariant which is the normal, in-world variant. The- inventoryvariant is used when rendering our item in inventory and in the player’s hand.
- "model": "cube_all"(L10 & L13): This uses the- cube_allmodel for both variants. This is a simple model included in Minecraft which uses the same- #alltexture for every side of the block. We can’t include this in the- defaultsblock because Forge expects there to be at least one thing in each variant block.
Now, we just need to download the copper ore texture to src/main/resources/assets/tutorial/textures/blocks/ore_copper.png and we’re all set!
