minecraft random rotate texture code example

Example: minecraft randomly rotate textures

// this is in "bockstates/prismarine_rough.json" and
// note: there sometimes has to be a model file (shown under)
{
    "variants": {
        "": [
            { "model": "prismarine_rough" },
            { "model": "prismarine_rough", "x": 90 },
            { "model": "prismarine_rough", "x": 180 },
            { "model": "prismarine_rough", "x": 270 },
            { "model": "prismarine_rough", "y": 90 },
            { "model": "prismarine_rough", "y": 90, "x": 90 },
            { "model": "prismarine_rough", "y": 90, "x": 180 },
            { "model": "prismarine_rough", "y": 90, "x": 270 },
            { "model": "prismarine_rough", "y": 180 },
            { "model": "prismarine_rough", "y": 180, "x": 90 },
            { "model": "prismarine_rough", "y": 180, "x": 180 },
            { "model": "prismarine_rough", "y": 180, "x": 270 },
            { "model": "prismarine_rough", "y": 270 },
            { "model": "prismarine_rough", "y": 270, "x": 90 },
            { "model": "prismarine_rough", "y": 270, "x": 180 },
            { "model": "prismarine_rough", "y": 270, "x": 270 }
        ]
    }
}


// model file in "models/block/prismarine_rough.json"
// for vanilla textures you would not need to add this, though
// it may be a good idea to include it just to be safe.
{
    "parent": "block/cube_all",
    "textures": {
        "all": "block/prismarine_rough"
    }
}
//then the actual texture goes in "textures/block/prismarine_rough.png"

Tags:

Java Example