Jump to content

[1.10.2][Textures][SOLVED]I have a block with 7 states, how do I render it?


Starless

Recommended Posts

I have a block with 7 possible states. 6 of those states correspond to the value of each EnumFacing (0 = down, 1 = up, and so on). The other state is for when the block is not connected to any direction. I have the model for the block, I'm not sure it's correct. I want to be able to rotate the block according to each of these states, and to be able to change the model for the "no connection" state.

 

Here's the model (inside assets.mymod.models.block):

 

{
    "textures": {
        "0": "minecraft:blocks/obsidian",
        "1": "mymod:blocks/block.extractor_core_sides",
        "2": "mymod:blocks/block.extractor_core_bottom",
        "3": "mymod:blocks/block.extractor_core_top"
    },
    "elements": [
        {
            "name": "NorthWest",
            "from": [ 4.0, 2.0, 4.0 ], 
            "to": [ 5.0, 10.0, 5.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] },
                "east": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] },
                "south": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] },
                "west": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] },
                "up": { "texture": "#0", "uv": [ 3.0, 2.0, 4.0, 3.0 ] },
                "down": { "texture": "#0", "uv": [ 3.0, 2.0, 4.0, 3.0 ] }
            }
        },
        {
            "name": "SouthWest",
            "from": [ 4.0, 2.0, 11.0 ], 
            "to": [ 5.0, 10.0, 12.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] },
                "east": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] },
                "south": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] },
                "west": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] },
                "up": { "texture": "#0", "uv": [ 3.0, 2.0, 4.0, 3.0 ] },
                "down": { "texture": "#0", "uv": [ 3.0, 2.0, 4.0, 3.0 ] }
            }
        },
        {
            "name": "NorthEast",
            "from": [ 11.0, 2.0, 4.0 ], 
            "to": [ 12.0, 10.0, 5.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] },
                "east": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] },
                "south": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] },
                "west": { "texture": "#0", "uv": [ 2.0, 2.0, 6.0, 16.0 ] },
                "up": { "texture": "#0", "uv": [ 3.0, 2.0, 4.0, 3.0 ] },
                "down": { "texture": "#0", "uv": [ 3.0, 2.0, 4.0, 3.0 ] }
            }
        },
        {
            "name": "SouthEast",
            "from": [ 11.0, 2.0, 11.0 ], 
            "to": [ 12.0, 10.0, 12.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] },
                "east": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] },
                "south": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] },
                "west": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] },
                "up": { "texture": "#0", "uv": [ 3.0, 2.0, 4.0, 3.0 ] },
                "down": { "texture": "#0", "uv": [ 3.0, 2.0, 4.0, 3.0 ] }
            }
        },
        {
            "name": "BottomNorth",
            "from": [ 5.0, 2.0, 4.0 ], 
            "to": [ 11.0, 3.0, 5.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] },
                "south": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] },
                "up": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] },
                "down": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 10.0 ] }
            }
        },
        {
            "name": "BottomSouth",
            "from": [ 5.0, 2.0, 11.0 ], 
            "to": [ 11.0, 3.0, 12.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] },
                "south": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] },
                "up": { "texture": "#0", "uv": [ 2.0, 3.0, 13.0, 9.0 ] },
                "down": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] }
            }
        },
        {
            "name": "BottomWest",
            "from": [ 4.0, 2.0, 5.0 ], 
            "to": [ 5.0, 3.0, 11.0 ], 
            "faces": {
                "east": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] },
                "west": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] },
                "up": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] },
                "down": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] }
            }
        },
        {
            "name": "BottomEast",
            "from": [ 11.0, 2.0, 5.0 ], 
            "to": [ 12.0, 3.0, 11.0 ], 
            "faces": {
                "east": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] },
                "west": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] },
                "up": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 6.0 ] },
                "down": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 6.0 ] }
            }
        },
        {
            "name": "TopNorth",
            "from": [ 5.0, 9.0, 4.0 ], 
            "to": [ 11.0, 10.0, 5.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] },
                "south": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] },
                "up": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] },
                "down": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] }
            }
        },
        {
            "name": "TopSouth",
            "from": [ 5.0, 9.0, 11.0 ], 
            "to": [ 11.0, 10.0, 12.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] },
                "south": { "texture": "#0", "uv": [ 2.0, 4.0, 12.0, 9.0 ] },
                "up": { "texture": "#0", "uv": [ 2.0, 3.0, 13.0, 9.0 ] },
                "down": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] }
            }
        },
        {
            "name": "TopWest",
            "from": [ 4.0, 9.0, 5.0 ], 
            "to": [ 5.0, 10.0, 11.0 ], 
            "faces": {
                "east": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] },
                "west": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] },
                "up": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] },
                "down": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 6.0 ] }
            }
        },
        {
            "name": "TopEast",
            "from": [ 11.0, 9.0, 5.0 ], 
            "to": [ 12.0, 10.0, 11.0 ], 
            "faces": {
                "east": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] },
                "west": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] },
                "up": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] },
                "down": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] }
            }
        },
        {
            "name": "Core",
            "from": [ 6.0, 1.0, 6.0 ], 
            "to": [ 10.0, 10.0, 10.0 ], 
            "faces": {
                "north": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 17.0 ] },
                "east": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "south": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "west": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "down": { "texture": "#2", "uv": [ 0.0, 0.0, 16.0, 15.0 ] }
            }
        },
        {
            "name": "Top1",
            "from": [ 5.0, 10.0, 5.0 ], 
            "to": [ 11.0, 11.0, 11.0 ], 
            "faces": {
                "north": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "east": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "south": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "west": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "up": { "texture": "#3", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "down": { "texture": "#3", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }
            }
        },
        {
            "name": "Top2",
            "from": [ 6.0, 11.0, 6.0 ], 
            "to": [ 10.0, 12.0, 10.0 ], 
            "faces": {
                "north": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "east": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "south": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "west": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "up": { "texture": "#3", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }
            }
        },
        {
            "name": "Top3",
            "from": [ 7.0, 12.0, 7.0 ], 
            "to": [ 9.0, 13.0, 9.0 ], 
            "faces": {
                "north": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "east": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "south": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "west": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "up": { "texture": "#3", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }
            }
        }
    ]
}

 

How do I register this model? And how do I implement the rotations? And is the way I define the textures in the begining of the file correct? How do I register the block to appear on GUIs? Do I need to register the textures separately?

Link to comment
Share on other sites

The blockstates file determines which model is used for each state of a block. Forge has an introduction to blockstates files here. Forge's format is documented here, the vanilla format is documented here.

 

Assuming you're using Forge's blockstates format:

  • Set the model to the connected model in the
    defaults

    section

  • For each value of the facing property except "no connection", set the rotation of the model around the x and y axes (in increments of 90 degrees) using the
    x

    and

    y

    properties

  • For the "no connection" value, set the model to the "no connection" model.

 

Item

models (including

ItemBlock

s) are set with

ModelLoader.setCustomModelResourceLocation

/

setCustomMeshDefinition

. The

ModelResourceLocation

s specified here can either point to item models or blockstates variants.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Link to comment
Share on other sites

Thank you so much!

 

It's still not working, though.

 

I have these files now:

 

this is assets\mymod\blockstates\block_extractor.json (not sure if I have to declare textures here and in the model files too)

{
    "forge_marker": 1,
    "defaults": {
        "textures": {
            "0": "blocks/obsidian",
            "1": "mymod:blocks/block_extractor-core-sides",
            "2": "mymod:blocks/block_extractor-core-bottom",
            "3": "mymod:blocks/block_extractor-core-top"
        },
        "model": "mymod:block_extractor",
        "uvlock": false
    },
    "variants": {
        "facing": {
            "down": {
            },
            "up": {
                "x": 180 
            },
            "north": {
                "x": 270
            },
            "south": {
                "x": 90
            },
            "west": {
                "x": 90,
                "y": 90
            },
            "east": {
                "x": 270,
                "y": 90
            },
            "none": {
                "textures": {
                    "0": "blocks/obsidian",
                    "1": "mymod:blocks/block_extractor-core-no-connection"
                 },
                 "model": "mymod:block_extractor-no-connection",
                 "uvlock": false
            }
        }
    }
}

 

this is assets\mymod\models\block\block_extractor-no-connection.json

{
    "textures": {
        "0": "blocks/obsidian",
        "1": "mymod:blocks/block_extractor-core-no-connection"
    },
    "elements": [
        {
            "name": "NorthWest",
            "from": [ 4.0, 4.0, 4.0 ], 
            "to": [ 5.0, 12.0, 5.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 2.0, 0.0, 8.0, 16.0 ] },
                "east": { "texture": "#0", "uv": [ 2.0, 0.0, 8.0, 16.0 ] },
                "south": { "texture": "#0", "uv": [ 2.0, 0.0, 8.0, 16.0 ] },
                "west": { "texture": "#0", "uv": [ 2.0, 0.0, 8.0, 16.0 ] },
                "up": { "texture": "#0", "uv": [ 2.0, 2.0, 3.0, 3.0 ] },
                "down": { "texture": "#0", "uv": [ 2.0, 2.0, 3.0, 3.0 ] }
            }
        },
        {
            "name": "NorthEast",
            "from": [ 11.0, 4.0, 4.0 ], 
            "to": [ 12.0, 12.0, 5.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 2.0, 0.0, 8.0, 16.0 ] },
                "east": { "texture": "#0", "uv": [ 2.0, 0.0, 8.0, 16.0 ] },
                "south": { "texture": "#0", "uv": [ 2.0, 0.0, 8.0, 16.0 ] },
                "west": { "texture": "#0", "uv": [ 2.0, 0.0, 8.0, 16.0 ] },
                "up": { "texture": "#0", "uv": [ 2.0, 2.0, 3.0, 3.0 ] },
                "down": { "texture": "#0", "uv": [ 2.0, 2.0, 3.0, 3.0 ] }
            }
        },
        {
            "name": "SouthWest",
            "from": [ 4.0, 4.0, 11.0 ], 
            "to": [ 5.0, 12.0, 12.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 2.0, 0.0, 8.0, 16.0 ] },
                "east": { "texture": "#0", "uv": [ 2.0, 0.0, 8.0, 16.0 ] },
                "south": { "texture": "#0", "uv": [ 2.0, 0.0, 8.0, 16.0 ] },
                "west": { "texture": "#0", "uv": [ 2.0, 0.0, 8.0, 16.0 ] },
                "up": { "texture": "#0", "uv": [ 2.0, 2.0, 3.0, 3.0 ] },
                "down": { "texture": "#0", "uv": [ 2.0, 2.0, 3.0, 3.0 ] }
            }
        },
        {
            "name": "SouthEast",
            "from": [ 11.0, 4.0, 11.0 ], 
            "to": [ 12.0, 12.0, 12.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 2.0, 0.0, 8.0, 16.0 ] },
                "east": { "texture": "#0", "uv": [ 2.0, 0.0, 8.0, 16.0 ] },
                "south": { "texture": "#0", "uv": [ 2.0, 0.0, 8.0, 16.0 ] },
                "west": { "texture": "#0", "uv": [ 2.0, 0.0, 8.0, 16.0 ] },
                "up": { "texture": "#0", "uv": [ 2.0, 2.0, 3.0, 3.0 ] },
                "down": { "texture": "#0", "uv": [ 2.0, 2.0, 3.0, 3.0 ] }
            }
        },
        {
            "name": "BottomNorth",
            "from": [ 5.0, 4.0, 4.0 ], 
            "to": [ 11.0, 5.0, 5.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 0.0, 2.0, 16.0, 8.0 ] },
                "south": { "texture": "#0", "uv": [ 2.0, 0.0, 16.0, 8.0 ] },
                "up": { "texture": "#0", "uv": [ 2.0, 0.0, 16.0, 8.0 ] },
                "down": { "texture": "#0", "uv": [ 2.0, 0.0, 16.0, 8.0 ] }
            }
        },
        {
            "name": "BottomSouth",
            "from": [ 5.0, 4.0, 11.0 ], 
            "to": [ 11.0, 5.0, 12.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 2.0, 0.0, 16.0, 8.0 ] },
                "south": { "texture": "#0", "uv": [ 2.0, 0.0, 16.0, 8.0 ] },
                "up": { "texture": "#0", "uv": [ 2.0, 0.0, 16.0, 8.0 ] },
                "down": { "texture": "#0", "uv": [ 2.0, 0.0, 16.0, 8.0 ] }
            }
        },
        {
            "name": "BottomWest",
            "from": [ 4.0, 4.0, 5.0 ], 
            "to": [ 5.0, 5.0, 11.0 ], 
            "faces": {
                "east": { "texture": "#0", "uv": [ 2.0, 0.0, 16.0, 8.0 ] },
                "west": { "texture": "#0", "uv": [ 2.0, 0.0, 16.0, 8.0 ] },
                "up": { "texture": "#0", "uv": [ 2.0, 0.0, 16.0, 8.0 ] },
                "down": { "texture": "#0", "uv": [ 2.0, 0.0, 16.0, 8.0 ] }
            }
        },
        {
            "name": "BottomEast",
            "from": [ 11.0, 4.0, 5.0 ], 
            "to": [ 12.0, 5.0, 11.0 ], 
            "faces": {
                "east": { "texture": "#0", "uv": [ 2.0, 0.0, 16.0, 8.0 ] },
                "west": { "texture": "#0", "uv": [ 2.0, 0.0, 16.0, 8.0 ] },
                "up": { "texture": "#0", "uv": [ 2.0, 0.0, 16.0, 8.0 ] },
                "down": { "texture": "#0", "uv": [ 2.0, 0.0, 16.0, 8.0 ] }
            }
        },
        {
            "name": "TopNorth",
            "from": [ 5.0, 11.0, 4.0 ], 
            "to": [ 11.0, 12.0, 5.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 2.0, 0.0, 16.0, 8.0 ] },
                "south": { "texture": "#0", "uv": [ 2.0, 0.0, 16.0, 8.0 ] },
                "up": { "texture": "#0", "uv": [ 0.0, 0.0, 6.0, 1.0 ] },
                "down": { "texture": "#0", "uv": [ 0.0, 0.0, 6.0, 1.0 ] }
            }
        },
        {
            "name": "TopSouth",
            "from": [ 5.0, 11.0, 11.0 ], 
            "to": [ 11.0, 12.0, 12.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 2.0, 0.0, 16.0, 8.0 ] },
                "south": { "texture": "#0", "uv": [ 2.0, 0.0, 16.0, 8.0 ] },
                "up": { "texture": "#0", "uv": [ 2.0, 0.0, 16.0, 8.0 ] },
                "down": { "texture": "#0", "uv": [ 2.0, 0.0, 16.0, 8.0 ] }
            }
        },
        {
            "name": "TopWest",
            "from": [ 4.0, 11.0, 5.0 ], 
            "to": [ 5.0, 12.0, 11.0 ], 
            "faces": {
                "east": { "texture": "#0", "uv": [ 2.0, 0.0, 16.0, 8.0 ] },
                "west": { "texture": "#0", "uv": [ 2.0, 0.0, 16.0, 8.0 ] },
                "up": { "texture": "#0", "uv": [ 2.0, 0.0, 16.0, 8.0 ] },
                "down": { "texture": "#0", "uv": [ 2.0, 0.0, 16.0, 8.0 ] }
            }
        },
        {
            "name": "TopEast",
            "from": [ 11.0, 11.0, 5.0 ], 
            "to": [ 12.0, 12.0, 11.0 ], 
            "faces": {
                "east": { "texture": "#0", "uv": [ 2.0, 0.0, 16.0, 8.0 ] },
                "west": { "texture": "#0", "uv": [ 2.0, 0.0, 15.0, 8.0 ] },
                "up": { "texture": "#0", "uv": [ 2.0, 0.0, 16.0, 8.0 ] },
                "down": { "texture": "#0", "uv": [ 2.0, 0.0, 16.0, 8.0 ] }
            }
        },
        {
            "name": "Core",
            "from": [ 6.0, 6.0, 6.0 ], 
            "to": [ 10.0, 10.0, 10.0 ], 
            "faces": {
                "north": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "east": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "south": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "west": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "up": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "down": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }
            }
        }
    ]
}

 

and finally, the one I already posted above: assets\mymod\models\block\block_extractor.json

{
    "textures": {
        "0": "blocks/obsidian",
        "1": "mymod:blocks/block_extractor-core-sides",
        "2": "mymod:blocks/block_extractor-core-bottom",
        "3": "mymod:blocks/block_extractor-core-top"
    },
    "elements": [
        {
            "name": "NorthWest",
            "from": [ 4.0, 2.0, 4.0 ], 
            "to": [ 5.0, 10.0, 5.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] },
                "east": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] },
                "south": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] },
                "west": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] },
                "up": { "texture": "#0", "uv": [ 3.0, 2.0, 4.0, 3.0 ] },
                "down": { "texture": "#0", "uv": [ 3.0, 2.0, 4.0, 3.0 ] }
            }
        },
        {
            "name": "SouthWest",
            "from": [ 4.0, 2.0, 11.0 ], 
            "to": [ 5.0, 10.0, 12.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] },
                "east": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] },
                "south": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] },
                "west": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] },
                "up": { "texture": "#0", "uv": [ 3.0, 2.0, 4.0, 3.0 ] },
                "down": { "texture": "#0", "uv": [ 3.0, 2.0, 4.0, 3.0 ] }
            }
        },
        {
            "name": "NorthEast",
            "from": [ 11.0, 2.0, 4.0 ], 
            "to": [ 12.0, 10.0, 5.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] },
                "east": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] },
                "south": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] },
                "west": { "texture": "#0", "uv": [ 2.0, 2.0, 6.0, 16.0 ] },
                "up": { "texture": "#0", "uv": [ 3.0, 2.0, 4.0, 3.0 ] },
                "down": { "texture": "#0", "uv": [ 3.0, 2.0, 4.0, 3.0 ] }
            }
        },
        {
            "name": "SouthEast",
            "from": [ 11.0, 2.0, 11.0 ], 
            "to": [ 12.0, 10.0, 12.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] },
                "east": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] },
                "south": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] },
                "west": { "texture": "#0", "uv": [ 2.0, 4.0, 6.0, 16.0 ] },
                "up": { "texture": "#0", "uv": [ 3.0, 2.0, 4.0, 3.0 ] },
                "down": { "texture": "#0", "uv": [ 3.0, 2.0, 4.0, 3.0 ] }
            }
        },
        {
            "name": "BottomNorth",
            "from": [ 5.0, 2.0, 4.0 ], 
            "to": [ 11.0, 3.0, 5.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] },
                "south": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] },
                "up": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] },
                "down": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 10.0 ] }
            }
        },
        {
            "name": "BottomSouth",
            "from": [ 5.0, 2.0, 11.0 ], 
            "to": [ 11.0, 3.0, 12.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] },
                "south": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] },
                "up": { "texture": "#0", "uv": [ 2.0, 3.0, 13.0, 9.0 ] },
                "down": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] }
            }
        },
        {
            "name": "BottomWest",
            "from": [ 4.0, 2.0, 5.0 ], 
            "to": [ 5.0, 3.0, 11.0 ], 
            "faces": {
                "east": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] },
                "west": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] },
                "up": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] },
                "down": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] }
            }
        },
        {
            "name": "BottomEast",
            "from": [ 11.0, 2.0, 5.0 ], 
            "to": [ 12.0, 3.0, 11.0 ], 
            "faces": {
                "east": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] },
                "west": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] },
                "up": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 6.0 ] },
                "down": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 6.0 ] }
            }
        },
        {
            "name": "TopNorth",
            "from": [ 5.0, 9.0, 4.0 ], 
            "to": [ 11.0, 10.0, 5.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] },
                "south": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] },
                "up": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] },
                "down": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] }
            }
        },
        {
            "name": "TopSouth",
            "from": [ 5.0, 9.0, 11.0 ], 
            "to": [ 11.0, 10.0, 12.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] },
                "south": { "texture": "#0", "uv": [ 2.0, 4.0, 12.0, 9.0 ] },
                "up": { "texture": "#0", "uv": [ 2.0, 3.0, 13.0, 9.0 ] },
                "down": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] }
            }
        },
        {
            "name": "TopWest",
            "from": [ 4.0, 9.0, 5.0 ], 
            "to": [ 5.0, 10.0, 11.0 ], 
            "faces": {
                "east": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] },
                "west": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] },
                "up": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] },
                "down": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 6.0 ] }
            }
        },
        {
            "name": "TopEast",
            "from": [ 11.0, 9.0, 5.0 ], 
            "to": [ 12.0, 10.0, 11.0 ], 
            "faces": {
                "east": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] },
                "west": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] },
                "up": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] },
                "down": { "texture": "#0", "uv": [ 2.0, 4.0, 13.0, 9.0 ] }
            }
        },
        {
            "name": "Core",
            "from": [ 6.0, 1.0, 6.0 ], 
            "to": [ 10.0, 10.0, 10.0 ], 
            "faces": {
                "north": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 17.0 ] },
                "east": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "south": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "west": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "down": { "texture": "#2", "uv": [ 0.0, 0.0, 16.0, 15.0 ] }
            }
        },
        {
            "name": "Top1",
            "from": [ 5.0, 10.0, 5.0 ], 
            "to": [ 11.0, 11.0, 11.0 ], 
            "faces": {
                "north": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "east": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "south": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "west": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "up": { "texture": "#3", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "down": { "texture": "#3", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }
            }
        },
        {
            "name": "Top2",
            "from": [ 6.0, 11.0, 6.0 ], 
            "to": [ 10.0, 12.0, 10.0 ], 
            "faces": {
                "north": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "east": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "south": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "west": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "up": { "texture": "#3", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }
            }
        },
        {
            "name": "Top3",
            "from": [ 7.0, 12.0, 7.0 ], 
            "to": [ 9.0, 13.0, 9.0 ], 
            "faces": {
                "north": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "east": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "south": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "west": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "up": { "texture": "#3", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }
            }
        }
    ]
}

 

All my textures are in assets\mymod\textures\blocks\, except for obsidian, which is minecraft's obsidian.png

 

I think I might be missing an array marker somewhere (square brackets) just don't know where. maybe variants is supposed to be an array?

Link to comment
Share on other sites

Get the Eclipse JSON Editor plugin, or the same thing for IDEA or InteliJ depending on what you're using.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Get the Eclipse JSON Editor plugin, or the same thing for IDEA or InteliJ depending on what you're using.

 

I have that. strangely, it is not highlighting my blockstates\block.extractor.json (it's valid though, I checked it with http://jsonlint.com/)

 

But I just thought of something. I probably have to register blockstates\block.extractor.json to my block. How do I do that?

 

EDIT: I figured it out. It turned out I was confused about the relative path of stuff, and also I didn't realize I couldn't rotate things around the z axis. I'm editing out the wrong jsons above and posting the correct versions of the files for documentation purposes.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.