Jump to content

Recommended Posts

Posted (edited)

I'm currently trying to use a Forge Blockstate to try and make a sort of energy pipe which will connect to any energy holder, the block state code works as the get actual state updates my PropertyBools correctly. I don't see where I am going wrong at all and I presume it is something small. My block has two tiers, basic and advanced and each side has its own respective PropertyBool

Block state - energy_cell.json:

{
	"forge_marker": 1,
	"variants": {
		"type": {
			"basic": {
				"model": "boe:energy_cell_centre_basic",
				"north": {
					"true": {
						"submodel": {"north": { "model": "boe:energy_cell_connection_basic" }}
					},
					"false": {}
				},
				"east": {
					"true": {
						"submodel": {"east": { "model": "boe:energy_cell_connection_basic", "y": 90 }}
					},
					"false": {}
				},
				"south": {
					"true": {
						"submodel": {"south": { "model": "boe:energy_cell_connection_basic", "y": 180 }}
					},
					"false": {}
				},
				"west": {
					"true": {
						"submodel": {"west": { "model": "boe:energy_cell_connection_basic", "y": 270 }}
					},
					"false": {}
				},
				"up": {
					"true": {
						"submodel": {"up": { "model": "boe:energy_cell_connection_basic", "x": 270 }}
					},
					"false": {}
				},
				"down": {
					"true": {
						"submodel": {"down": { "model": "boe:energy_cell_connection_basic", "x": 90 }}
					},
					"false": {}
				}
			},
			"advanced": {
				"model": "boe:energy_cell_centre_advanced",
				"north": {
					"true": {
						"submodel": {"north": { "model": "boe:energy_cell_connection_advanced" }}
					},
					"false": {}
				},
				"east": {
					"true": {
						"submodel": {"east": { "model": "boe:energy_cell_connection_advanced", "y": 90 }}
					},
					"false": {}
				},
				"south": {
					"true": {
						"submodel": {"south": { "model": "boe:energy_cell_connection_advanced", "y": 180 }}
					},
					"false": {}
				},
				"west": {
					"true": {
						"submodel": {"west": { "model": "boe:energy_cell_connection_advanced", "y": 270 }}
					},
					"false": {}
				},
				"up": {
					"true": {
						"submodel": {"up": { "model": "boe:energy_cell_connection_advanced", "x": 270 }}
					},
					"false": {}
				},
				"down": {
					"true": {
						"submodel": {"down": { "model": "boe:energy_cell_connection_advanced", "x": 90 }}
					},
					"false": {}
				}
			}
		}
	}
}

Block Models:

energy_cell_connection_basic.json:

{
    "textures": {
		"particle": "boe:blocks/machine_basic",
        "0": "boe:blocks/energy_cell_centre_basic",
        "3": "boe:blocks/machine_basic"
    },
    "elements": [
        {
            "name": "Connection Base",
            "from": [ 7.0, 7.0, 1.0 ],
            "to": [ 9.0, 9.0, 4.0 ],
            "faces": {
                "north": { "texture": "#0", "uv": [ 0.0, 6.0, 4.0, 10.0 ] },
                "east": { "texture": "#0", "uv": [ 0.0, 6.0, 4.0, 10.0 ] },
                "south": { "texture": "#0", "uv": [ 0.0, 6.0, 4.0, 10.0 ] },
                "west": { "texture": "#0", "uv": [ 0.0, 6.0, 4.0, 10.0 ] },
                "up": { "texture": "#0", "uv": [ 0.0, 6.0, 4.0, 10.0 ] },
                "down": { "texture": "#0", "uv": [ 0.0, 6.0, 4.0, 10.0 ] }
            }
        },
        {
            "name": "Connection",
            "from": [ 6.0, 6.0, 0.0 ],
            "to": [ 10.0, 10.0, 1.0 ],
            "faces": {
                "north": { "texture": "#3", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "east": { "texture": "#3", "uv": [ 0.0, 0.0, 1.0, 4.0 ] },
                "south": { "texture": "#3", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "west": { "texture": "#3", "uv": [ 0.0, 0.0, 1.0, 4.0 ] },
                "up": { "texture": "#3", "uv": [ 0.0, 0.0, 4.0, 1.0 ] },
                "down": { "texture": "#3", "uv": [ 0.0, 0.0, 4.0, 1.0 ] }
            }
        }
    ]
}

energy_cell_connection_advanced.json:

{
    "textures": {
		"particle": "boe:blocks/machine_advanced",
        "0": "boe:blocks/energy_cell_centre_advanced",
        "3": "boe:blocks/machine_advanced"
    },
    "elements": [
        {
            "name": "Connection Base",
            "from": [ 7.0, 7.0, 1.0 ], 
            "to": [ 9.0, 9.0, 4.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 0.0, 6.0, 4.0, 10.0 ] },
                "east": { "texture": "#0", "uv": [ 0.0, 6.0, 4.0, 10.0 ] },
                "south": { "texture": "#0", "uv": [ 0.0, 6.0, 4.0, 10.0 ] },
                "west": { "texture": "#0", "uv": [ 0.0, 6.0, 4.0, 10.0 ] },
                "up": { "texture": "#0", "uv": [ 0.0, 6.0, 4.0, 10.0 ] },
                "down": { "texture": "#0", "uv": [ 0.0, 6.0, 4.0, 10.0 ] }
            }
        },
        {
            "name": "Connection",
            "from": [ 6.0, 6.0, 0.0 ], 
            "to": [ 10.0, 10.0, 1.0 ], 
            "faces": {
                "north": { "texture": "#3", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "east": { "texture": "#3", "uv": [ 0.0, 0.0, 1.0, 4.0 ] },
                "south": { "texture": "#3", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "west": { "texture": "#3", "uv": [ 0.0, 0.0, 1.0, 4.0 ] },
                "up": { "texture": "#3", "uv": [ 0.0, 0.0, 4.0, 1.0 ] },
                "down": { "texture": "#3", "uv": [ 0.0, 0.0, 4.0, 1.0 ] }
            }
        }
    ]
}

energy_cell_centre_basic.json:

{
    "textures": {
		"particle": "boe:blocks/machine_basic",
        "0": "boe:blocks/energy_cell_centre_basic",
        "1": "boe:blocks/ctm/machine_basic",
        "2": "boe:blocks/energy_cell"
    },
    "elements": [
        {
            "name": "Centre",
            "from": [ 4.0, 4.0, 4.0 ], 
            "to": [ 12.0, 12.0, 12.0 ], 
            "rotation": { "origin": [ 8.0, 8.0, 8.0 ], "axis": "y", "angle": -45.0 },
            "faces": {
                "north": { "texture": "#0", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "east": { "texture": "#0", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "south": { "texture": "#0", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "west": { "texture": "#0", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "up": { "texture": "#1", "uv": [ 8.0, 8.0, 16.0, 16.0 ] },
                "down": { "texture": "#1", "uv": [ 8.0, 8.0, 16.0, 16.0 ] }
            }
        },
        {
            "name": "Energy Cell 1",
            "from": [ 5.7, 6.0, 2.7 ], 
            "to": [ 6.7, 10.0, 3.7 ], 
            "faces": {
                "north": { "texture": "#2", "uv": [ 0.0, 0.0, 2.0, 8.0 ] },
                "east": { "texture": "#2", "uv": [ 2.0, 0.0, 4.0, 8.0 ] },
                "south": { "texture": "#2", "uv": [ 4.0, 0.0, 6.0, 8.0 ] },
                "west": { "texture": "#2", "uv": [ 6.0, 0.0, 8.0, 8.0 ] },
                "up": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] },
                "down": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }
            }
        },
        {
            "name": "Energy Cell 2",
            "from": [ 9.3, 6.0, 2.7 ], 
            "to": [ 10.3, 10.0, 3.7 ], 
            "faces": {
                "north": { "texture": "#2", "uv": [ 0.0, 0.0, 2.0, 8.0 ] },
                "east": { "texture": "#2", "uv": [ 2.0, 0.0, 4.0, 8.0 ] },
                "south": { "texture": "#2", "uv": [ 4.0, 0.0, 6.0, 8.0 ] },
                "west": { "texture": "#2", "uv": [ 6.0, 0.0, 8.0, 8.0 ] },
                "up": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] },
                "down": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }
            }
        },
        {
            "name": "Energy Cell 3",
            "from": [ 12.3, 6.0, 5.7 ], 
            "to": [ 13.3, 10.0, 6.7 ], 
            "faces": {
                "north": { "texture": "#2", "uv": [ 0.0, 0.0, 2.0, 8.0 ] },
                "east": { "texture": "#2", "uv": [ 2.0, 0.0, 4.0, 8.0 ] },
                "south": { "texture": "#2", "uv": [ 4.0, 0.0, 6.0, 8.0 ] },
                "west": { "texture": "#2", "uv": [ 6.0, 0.0, 8.0, 8.0 ] },
                "up": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] },
                "down": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }
            }
        },
        {
            "name": "Energy Cell 4",
            "from": [ 12.3, 6.0, 9.3 ], 
            "to": [ 13.3, 10.0, 10.3 ], 
            "faces": {
                "north": { "texture": "#2", "uv": [ 0.0, 0.0, 2.0, 8.0 ] },
                "east": { "texture": "#2", "uv": [ 2.0, 0.0, 4.0, 8.0 ] },
                "south": { "texture": "#2", "uv": [ 4.0, 0.0, 6.0, 8.0 ] },
                "west": { "texture": "#2", "uv": [ 6.0, 0.0, 8.0, 8.0 ] },
                "up": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] },
                "down": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }
            }
        },
        {
            "name": "Energy Cell 5",
            "from": [ 9.3, 6.0, 12.3 ], 
            "to": [ 10.3, 10.0, 13.3 ], 
            "faces": {
                "north": { "texture": "#2", "uv": [ 0.0, 0.0, 2.0, 8.0 ] },
                "east": { "texture": "#2", "uv": [ 2.0, 0.0, 4.0, 8.0 ] },
                "south": { "texture": "#2", "uv": [ 4.0, 0.0, 6.0, 8.0 ] },
                "west": { "texture": "#2", "uv": [ 6.0, 0.0, 8.0, 8.0 ] },
                "up": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] },
                "down": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }
            }
        },
        {
            "name": "Energy Cell 6",
            "from": [ 5.699999999999999, 6.0, 12.3 ], 
            "to": [ 6.699999999999999, 10.0, 13.3 ], 
            "faces": {
                "north": { "texture": "#2", "uv": [ 0.0, 0.0, 2.0, 8.0 ] },
                "east": { "texture": "#2", "uv": [ 2.0, 0.0, 4.0, 8.0 ] },
                "south": { "texture": "#2", "uv": [ 4.0, 0.0, 6.0, 8.0 ] },
                "west": { "texture": "#2", "uv": [ 6.0, 0.0, 8.0, 8.0 ] },
                "up": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] },
                "down": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }
            }
        },
        {
            "name": "Energy Cell 7",
            "from": [ 2.6999999999999993, 6.0, 9.3 ], 
            "to": [ 3.6999999999999993, 10.0, 10.3 ], 
            "faces": {
                "north": { "texture": "#2", "uv": [ 0.0, 0.0, 2.0, 8.0 ] },
                "east": { "texture": "#2", "uv": [ 2.0, 0.0, 4.0, 8.0 ] },
                "south": { "texture": "#2", "uv": [ 4.0, 0.0, 6.0, 8.0 ] },
                "west": { "texture": "#2", "uv": [ 6.0, 0.0, 8.0, 8.0 ] },
                "up": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] },
                "down": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }
            }
        },
        {
            "name": "Energy Cell 8",
            "from": [ 2.7, 6.0, 5.7 ], 
            "to": [ 3.7, 10.0, 6.7 ], 
            "faces": {
                "north": { "texture": "#2", "uv": [ 0.0, 0.0, 2.0, 8.0 ] },
                "east": { "texture": "#2", "uv": [ 2.0, 0.0, 4.0, 8.0 ] },
                "south": { "texture": "#2", "uv": [ 4.0, 0.0, 6.0, 8.0 ] },
                "west": { "texture": "#2", "uv": [ 6.0, 0.0, 8.0, 8.0 ] },
                "up": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] },
                "down": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }
            }
        }
    ]
}

energy_cell_centre_advanced.json:

{
    "textures": {
		"particle": "boe:blocks/machine_advanced",
        "0": "boe:blocks/energy_cell_centre_advanced",
        "1": "boe:blocks/ctm/machine_advanced",
        "2": "boe:blocks/energy_cell"
    },
    "elements": [
        {
            "name": "Centre",
            "from": [ 4.0, 4.0, 4.0 ], 
            "to": [ 12.0, 12.0, 12.0 ], 
            "rotation": { "origin": [ 8.0, 8.0, 8.0 ], "axis": "y", "angle": -45.0 },
            "faces": {
                "north": { "texture": "#0", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "east": { "texture": "#0", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "south": { "texture": "#0", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "west": { "texture": "#0", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "up": { "texture": "#1", "uv": [ 8.0, 8.0, 16.0, 16.0 ] },
                "down": { "texture": "#1", "uv": [ 8.0, 8.0, 16.0, 16.0 ] }
            }
        },
        {
            "name": "Energy Cell 1",
            "from": [ 5.7, 6.0, 2.7 ], 
            "to": [ 6.7, 10.0, 3.7 ], 
            "faces": {
                "north": { "texture": "#2", "uv": [ 0.0, 0.0, 2.0, 8.0 ] },
                "east": { "texture": "#2", "uv": [ 2.0, 0.0, 4.0, 8.0 ] },
                "south": { "texture": "#2", "uv": [ 4.0, 0.0, 6.0, 8.0 ] },
                "west": { "texture": "#2", "uv": [ 6.0, 0.0, 8.0, 8.0 ] },
                "up": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] },
                "down": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }
            }
        },
        {
            "name": "Energy Cell 2",
            "from": [ 9.3, 6.0, 2.7 ], 
            "to": [ 10.3, 10.0, 3.7 ], 
            "faces": {
                "north": { "texture": "#2", "uv": [ 0.0, 0.0, 2.0, 8.0 ] },
                "east": { "texture": "#2", "uv": [ 2.0, 0.0, 4.0, 8.0 ] },
                "south": { "texture": "#2", "uv": [ 4.0, 0.0, 6.0, 8.0 ] },
                "west": { "texture": "#2", "uv": [ 6.0, 0.0, 8.0, 8.0 ] },
                "up": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] },
                "down": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }
            }
        },
        {
            "name": "Energy Cell 3",
            "from": [ 12.3, 6.0, 5.7 ], 
            "to": [ 13.3, 10.0, 6.7 ], 
            "faces": {
                "north": { "texture": "#2", "uv": [ 0.0, 0.0, 2.0, 8.0 ] },
                "east": { "texture": "#2", "uv": [ 2.0, 0.0, 4.0, 8.0 ] },
                "south": { "texture": "#2", "uv": [ 4.0, 0.0, 6.0, 8.0 ] },
                "west": { "texture": "#2", "uv": [ 6.0, 0.0, 8.0, 8.0 ] },
                "up": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] },
                "down": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }
            }
        },
        {
            "name": "Energy Cell 4",
            "from": [ 12.3, 6.0, 9.3 ], 
            "to": [ 13.3, 10.0, 10.3 ], 
            "faces": {
                "north": { "texture": "#2", "uv": [ 0.0, 0.0, 2.0, 8.0 ] },
                "east": { "texture": "#2", "uv": [ 2.0, 0.0, 4.0, 8.0 ] },
                "south": { "texture": "#2", "uv": [ 4.0, 0.0, 6.0, 8.0 ] },
                "west": { "texture": "#2", "uv": [ 6.0, 0.0, 8.0, 8.0 ] },
                "up": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] },
                "down": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }
            }
        },
        {
            "name": "Energy Cell 5",
            "from": [ 9.3, 6.0, 12.3 ], 
            "to": [ 10.3, 10.0, 13.3 ], 
            "faces": {
                "north": { "texture": "#2", "uv": [ 0.0, 0.0, 2.0, 8.0 ] },
                "east": { "texture": "#2", "uv": [ 2.0, 0.0, 4.0, 8.0 ] },
                "south": { "texture": "#2", "uv": [ 4.0, 0.0, 6.0, 8.0 ] },
                "west": { "texture": "#2", "uv": [ 6.0, 0.0, 8.0, 8.0 ] },
                "up": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] },
                "down": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }
            }
        },
        {
            "name": "Energy Cell 6",
            "from": [ 5.699999999999999, 6.0, 12.3 ], 
            "to": [ 6.699999999999999, 10.0, 13.3 ], 
            "faces": {
                "north": { "texture": "#2", "uv": [ 0.0, 0.0, 2.0, 8.0 ] },
                "east": { "texture": "#2", "uv": [ 2.0, 0.0, 4.0, 8.0 ] },
                "south": { "texture": "#2", "uv": [ 4.0, 0.0, 6.0, 8.0 ] },
                "west": { "texture": "#2", "uv": [ 6.0, 0.0, 8.0, 8.0 ] },
                "up": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] },
                "down": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }
            }
        },
        {
            "name": "Energy Cell 7",
            "from": [ 2.6999999999999993, 6.0, 9.3 ], 
            "to": [ 3.6999999999999993, 10.0, 10.3 ], 
            "faces": {
                "north": { "texture": "#2", "uv": [ 0.0, 0.0, 2.0, 8.0 ] },
                "east": { "texture": "#2", "uv": [ 2.0, 0.0, 4.0, 8.0 ] },
                "south": { "texture": "#2", "uv": [ 4.0, 0.0, 6.0, 8.0 ] },
                "west": { "texture": "#2", "uv": [ 6.0, 0.0, 8.0, 8.0 ] },
                "up": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] },
                "down": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }
            }
        },
        {
            "name": "Energy Cell 8",
            "from": [ 2.7, 6.0, 5.7 ], 
            "to": [ 3.7, 10.0, 6.7 ], 
            "faces": {
                "north": { "texture": "#2", "uv": [ 0.0, 0.0, 2.0, 8.0 ] },
                "east": { "texture": "#2", "uv": [ 2.0, 0.0, 4.0, 8.0 ] },
                "south": { "texture": "#2", "uv": [ 4.0, 0.0, 6.0, 8.0 ] },
                "west": { "texture": "#2", "uv": [ 6.0, 0.0, 8.0, 8.0 ] },
                "up": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] },
                "down": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }
            }
        }
    ]
}

Error message:

[20:34:28] [Client thread/ERROR] [FML]: Exception loading model for variant boe:energy_cell#down=false,east=false,north=true,south=true,type=basic,up=false,west=true for blockstate "boe:energy_cell[down=false,east=false,north=true,south=true,type=basic,up=false,west=true]"
net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model boe:energy_cell#down=false,east=false,north=true,south=true,type=basic,up=false,west=true with loader VariantLoader.INSTANCE, skipping
	at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:153) ~[ModelLoaderRegistry.class:?]
	at net.minecraftforge.client.model.ModelLoader.registerVariant(ModelLoader.java:264) ~[ModelLoader.class:?]
	at net.minecraft.client.renderer.block.model.ModelBakery.loadBlock(ModelBakery.java:153) ~[ModelBakery.class:?]
	at net.minecraftforge.client.model.ModelLoader.loadBlocks(ModelLoader.java:252) ~[ModelLoader.class:?]
	at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:159) ~[ModelLoader.class:?]
	at net.minecraft.client.renderer.block.model.ModelManager.onResourceManagerReload(ModelManager.java:28) [ModelManager.class:?]
	at net.minecraft.client.resources.SimpleReloadableResourceManager.registerReloadListener(SimpleReloadableResourceManager.java:122) [SimpleReloadableResourceManager.class:?]
	at net.minecraft.client.Minecraft.init(Minecraft.java:541) [Minecraft.class:?]
	at net.minecraft.client.Minecraft.run(Minecraft.java:387) [Minecraft.class:?]
	at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_131]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_131]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_131]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_131]
	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
	at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_131]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_131]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_131]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_131]
	at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
	at GradleStart.main(GradleStart.java:26) [start/:?]
Caused by: net.minecraft.client.renderer.block.model.ModelBlockDefinition$MissingVariantException
	at net.minecraft.client.renderer.block.model.ModelBlockDefinition.getVariant(ModelBlockDefinition.java:78) ~[ModelBlockDefinition.class:?]
	at net.minecraftforge.client.model.ModelLoader$VariantLoader.loadModel(ModelLoader.java:1257) ~[ModelLoader$VariantLoader.class:?]
	at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?]
	... 21 more
[20:34:28] [Client thread/ERROR] [FML]: Exception loading model for variant boe:energy_cell#down=false,east=false,north=false,south=true,type=advanced,up=true,west=true for blockstate "boe:energy_cell[down=false,east=false,north=false,south=true,type=advanced,up=true,west=true]"
net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model boe:energy_cell#down=false,east=false,north=false,south=true,type=advanced,up=true,west=true with loader VariantLoader.INSTANCE, skipping
	at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:153) ~[ModelLoaderRegistry.class:?]
	at net.minecraftforge.client.model.ModelLoader.registerVariant(ModelLoader.java:264) ~[ModelLoader.class:?]
	at net.minecraft.client.renderer.block.model.ModelBakery.loadBlock(ModelBakery.java:153) ~[ModelBakery.class:?]
	at net.minecraftforge.client.model.ModelLoader.loadBlocks(ModelLoader.java:252) ~[ModelLoader.class:?]
	at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:159) ~[ModelLoader.class:?]
	at net.minecraft.client.renderer.block.model.ModelManager.onResourceManagerReload(ModelManager.java:28) [ModelManager.class:?]
	at net.minecraft.client.resources.SimpleReloadableResourceManager.registerReloadListener(SimpleReloadableResourceManager.java:122) [SimpleReloadableResourceManager.class:?]
	at net.minecraft.client.Minecraft.init(Minecraft.java:541) [Minecraft.class:?]
	at net.minecraft.client.Minecraft.run(Minecraft.java:387) [Minecraft.class:?]
	at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_131]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_131]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_131]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_131]
	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
	at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_131]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_131]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_131]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_131]
	at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
	at GradleStart.main(GradleStart.java:26) [start/:?]
Caused by: net.minecraft.client.renderer.block.model.ModelBlockDefinition$MissingVariantException
	at net.minecraft.client.renderer.block.model.ModelBlockDefinition.getVariant(ModelBlockDefinition.java:78) ~[ModelBlockDefinition.class:?]
	at net.minecraftforge.client.model.ModelLoader$VariantLoader.loadModel(ModelLoader.java:1257) ~[ModelLoader$VariantLoader.class:?]
	at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?]
	... 21 more
[20:34:28] [Client thread/ERROR] [FML]: Exception loading model for variant boe:energy_cell#down=false,east=false,north=false,south=true,type=basic,up=false,west=true for blockstate "boe:energy_cell[down=false,east=false,north=false,south=true,type=basic,up=false,west=true]"
net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model boe:energy_cell#down=false,east=false,north=false,south=true,type=basic,up=false,west=true with loader VariantLoader.INSTANCE, skipping
	at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:153) ~[ModelLoaderRegistry.class:?]
	at net.minecraftforge.client.model.ModelLoader.registerVariant(ModelLoader.java:264) ~[ModelLoader.class:?]
	at net.minecraft.client.renderer.block.model.ModelBakery.loadBlock(ModelBakery.java:153) ~[ModelBakery.class:?]
	at net.minecraftforge.client.model.ModelLoader.loadBlocks(ModelLoader.java:252) ~[ModelLoader.class:?]
	at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:159) ~[ModelLoader.class:?]
	at net.minecraft.client.renderer.block.model.ModelManager.onResourceManagerReload(ModelManager.java:28) [ModelManager.class:?]
	at net.minecraft.client.resources.SimpleReloadableResourceManager.registerReloadListener(SimpleReloadableResourceManager.java:122) [SimpleReloadableResourceManager.class:?]
	at net.minecraft.client.Minecraft.init(Minecraft.java:541) [Minecraft.class:?]
	at net.minecraft.client.Minecraft.run(Minecraft.java:387) [Minecraft.class:?]
	at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_131]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_131]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_131]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_131]
	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
	at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_131]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_131]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_131]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_131]
	at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
	at GradleStart.main(GradleStart.java:26) [start/:?]
Caused by: net.minecraft.client.renderer.block.model.ModelBlockDefinition$MissingVariantException
	at net.minecraft.client.renderer.block.model.ModelBlockDefinition.getVariant(ModelBlockDefinition.java:78) ~[ModelBlockDefinition.class:?]
	at net.minecraftforge.client.model.ModelLoader$VariantLoader.loadModel(ModelLoader.java:1257) ~[ModelLoader$VariantLoader.class:?]
	at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?]
	... 21 more
[20:34:28] [Client thread/ERROR] [FML]: Exception loading model for variant boe:energy_cell#down=false,east=false,north=false,south=false,type=basic,up=false,west=true for blockstate "boe:energy_cell[down=false,east=false,north=false,south=false,type=basic,up=false,west=true]"
net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model boe:energy_cell#down=false,east=false,north=false,south=false,type=basic,up=false,west=true with loader VariantLoader.INSTANCE, skipping
	at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:153) ~[ModelLoaderRegistry.class:?]
	at net.minecraftforge.client.model.ModelLoader.registerVariant(ModelLoader.java:264) ~[ModelLoader.class:?]
	at net.minecraft.client.renderer.block.model.ModelBakery.loadBlock(ModelBakery.java:153) ~[ModelBakery.class:?]
	at net.minecraftforge.client.model.ModelLoader.loadBlocks(ModelLoader.java:252) ~[ModelLoader.class:?]
	at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:159) ~[ModelLoader.class:?]
	at net.minecraft.client.renderer.block.model.ModelManager.onResourceManagerReload(ModelManager.java:28) [ModelManager.class:?]
	at net.minecraft.client.resources.SimpleReloadableResourceManager.registerReloadListener(SimpleReloadableResourceManager.java:122) [SimpleReloadableResourceManager.class:?]
	at net.minecraft.client.Minecraft.init(Minecraft.java:541) [Minecraft.class:?]
	at net.minecraft.client.Minecraft.run(Minecraft.java:387) [Minecraft.class:?]
	at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_131]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_131]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_131]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_131]
	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
	at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_131]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_131]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_131]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_131]
	at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
	at GradleStart.main(GradleStart.java:26) [start/:?]
Caused by: net.minecraft.client.renderer.block.model.ModelBlockDefinition$MissingVariantException
	at net.minecraft.client.renderer.block.model.ModelBlockDefinition.getVariant(ModelBlockDefinition.java:78) ~[ModelBlockDefinition.class:?]
	at net.minecraftforge.client.model.ModelLoader$VariantLoader.loadModel(ModelLoader.java:1257) ~[ModelLoader$VariantLoader.class:?]
	at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?]
	... 21 more

Please help!

Edited by CJMinecraft
Posted
3 minutes ago, CJMinecraft said:

{
	"forge_marker": 1,
	"variants": {
		"type": {
			"basic": {
				"model": "boe:energy_cell_centre_basic",
				"north": {
					"true": {
						"submodel": {"north": { "model": "boe:energy_cell_connection_basic" }}
					},
					"false": {}
				},
				"east": {
					"true": {
						"submodel": {"east": { "model": "boe:energy_cell_connection_basic", "y": 90 }}
					},
					"false": {}
				},
				"south": {
					"true": {
						"submodel": {"south": { "model": "boe:energy_cell_connection_basic", "y": 180 }}
					},
					"false": {}
				},
				"west": {
					"true": {
						"submodel": {"west": { "model": "boe:energy_cell_connection_basic", "y": 270 }}
					},
					"false": {}
				},
				"up": {
					"true": {
						"submodel": {"up": { "model": "boe:energy_cell_connection_basic", "x": 270 }}
					},
					"false": {}
				},
				"down": {
					"true": {
						"submodel": {"down": { "model": "boe:energy_cell_connection_basic", "x": 90 }}
					},
					"false": {}
				}
			},
			"advanced": {
				"model": "boe:energy_cell_centre_advanced",
				"north": {
					"true": {
						"submodel": {"north": { "model": "boe:energy_cell_connection_advanced" }}
					},
					"false": {}
				},
				"east": {
					"true": {
						"submodel": {"east": { "model": "boe:energy_cell_connection_advanced", "y": 90 }}
					},
					"false": {}
				},
				"south": {
					"true": {
						"submodel": {"south": { "model": "boe:energy_cell_connection_advanced", "y": 180 }}
					},
					"false": {}
				},
				"west": {
					"true": {
						"submodel": {"west": { "model": "boe:energy_cell_connection_advanced", "y": 270 }}
					},
					"false": {}
				},
				"up": {
					"true": {
						"submodel": {"up": { "model": "boe:energy_cell_connection_advanced", "x": 270 }}
					},
					"false": {}
				},
				"down": {
					"true": {
						"submodel": {"down": { "model": "boe:energy_cell_connection_advanced", "x": 90 }}
					},
					"false": {}
				}
			}
		}
	}
}

 

This is not a valid blockstates file. It looks like you're trying to nest properties inside one another, but that's not possible with the forge format. You need to list the effects of each property separately (as the forge format specifies), or use fully-defined variants (vanilla style).

Posted

Have you read the forge format documentation?

  • Inside your "variants" tag, you need one tag for each property in your block. By the looks of it, you have two properties, "type" and some unnamed facing property.
  • Inside each property tag, you need one tag for every possible value that property can hold. So "type" needs to contain one "basic" and one "advanced", and the facing tag needs to contain one for each direction.
  • Inside those, you specify the effects this individual property should have on the block - adding a submodel, altering the rotation, etc.

When the bock is modelled, the effects of each property are all combined to produce the final result.

Posted

The properties I am using are a property bool for each face and a property enum for the type. How do you add the model as I'm used to using the multipart model from vanilla but after looking into it, it doesn't allow you to have a when statement inside of a when statement. Thanks for help as well. How would I go about fixing this? The error says I'm missing a variant and I presume it is the property bools.

Posted

If you want to make your properties different based on other properties, the only solution will be to define every combination of variants separately. In the vanilla multipart format, you can define a list of conditions to be true for a certain part (e.g. "when": { "type": "advanced", "north": true }), so you can combine variants in that way.

Posted

You might try making two block instances (basic, advanced) from one block class, registering each under a slightly different name. Then the basic/advanced value can be an instance field rather than a property, and then I think you could create a separate blockstates file for each registered name.

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

Posted
1 minute ago, jeffryfisher said:

You might try making two block instances (basic, advanced) from one block class, registering each under a slightly different name. Then the basic/advanced value can be an instance field rather than a property, and then I think you could create a separate blockstates file for each registered name.

 

If the goal is to have a separate blockstates file for each value of a property, you can do that by creating an IStateMapper using StateMap.Builder and registering it with ModelLoader.setCustomStateMapper.

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.

Posted

For example I have this IStateMapper:

https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/flowers/states/StateMapperFlowers.java#L23

Which handles the "upper/lower" halves of my two-tall flower block (not all variants have a valid tall state).

I register it through my EasyRegistry class (which is the proxy/client proxy of a library mod)

https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/flowers/OreFlowersBase.java#L93

https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/hardlib/client/ClientEasyRegistry.java#L57

 

Note that IStateMapper is client side only so I had to finagle things to work properly. I am not sure how I would do this using the Registry events.

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.

Posted

Thanks for all the help, I've managed to resolve this by changing the blockstate to the following (the error was because I put "true" not true):

{
	"multipart": [
		{	"when": { "type": "basic" },
			"apply": { "model": "boe:energy_cell_centre_basic" }
		},
		{	"when": { "type": "basic", "north": true },
			"apply": { "model": "boe:energy_cell_connection_basic" }
		},
		{	"when": { "type": "basic", "east": true },
			"apply": { "model": "boe:energy_cell_connection_basic", "y": 90 }
		},
		{	"when": { "type": "basic", "south": true },
			"apply": { "model": "boe:energy_cell_connection_basic", "y": 180 }
		},
		{	"when": { "type": "basic", "west": true },
			"apply": { "model": "boe:energy_cell_connection_basic", "y": 270 }
		},
		{	"when": { "type": "basic", "up": true },
			"apply": { "model": "boe:energy_cell_connection_basic", "x": 270 }
		},
		{	"when": { "type": "basic", "down": true },
			"apply": { "model": "boe:energy_cell_connection_basic", "x": 90 }
		},
		{	"when": { "type": "advanced" },
			"apply": { "model": "boe:energy_cell_centre_advanced" }
		},
		{	"when": { "type": "advanced", "north": true },
			"apply": { "model": "boe:energy_cell_connection_advanced" }
		},
		{	"when": { "type": "advanced", "east": true },
			"apply": { "model": "boe:energy_cell_connection_advanced", "y": 90 }
		},
		{	"when": { "type": "advanced", "south": true },
			"apply": { "model": "boe:energy_cell_connection_advanced", "y": 180 }
		},
		{	"when": { "type": "advanced", "west": true },
			"apply": { "model": "boe:energy_cell_connection_advanced", "y": 270 }
		},
		{	"when": { "type": "advanced", "up": true },
			"apply": { "model": "boe:energy_cell_connection_advanced", "x": 270 }
		},
		{	"when": { "type": "advanced", "down": true },
			"apply": { "model": "boe:energy_cell_connection_advanced", "x": 90 }
		}
	]
}

 

  • Like 1

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.