Posted September 29, 20204 yr Hi there, Is it possible to mix the property definition and variant definition syntax in a Forge Blockstate? For example, I have a block that has three properties: Boolean "outer" Boolean "inner" Integer "state", from 0 to 4 The block model it corresponds to has a base texture, and an overlay texture. The base texture is one of two textures and is chosen by the "inner" property alone The overlay texture, however, can be one of 10 possible options, which is chosen by combining the "outer" and "state" properties As I understand it, Forge Blockstates have two syntax, either by defining each property independent of each other { "forge_marker": 1, "defaults" : { "textures": { "outerTex": "mod:blocks/out_default", "innerTex": "mod:blocks/in_default" }, "model": "mod:blockmodel" }, "variants": { "outer": { "true": {}, "false": {} }, "inner": { "true": { "innerTex": "mod:blocks/in_other" }, "false" : {} } "state": { "0": {}, "1": {}, "2": {}, "3": {}, "4": {} } } } or by defining variants individually { "forge_marker": 1, "defaults" : { "textures": { "outerTex": "mod:blocks/out_default", "innerTex": "mod:blocks/in_default" }, "model": "mod:blockmodel" }, "variants": { "[outer=true, inner=true, state=0]": [{}], "[outer=true, inner=false, state=1]": [{}], //etc etc, not really certain of the syntax for this type of declaration } } Is it possible to combine these somehow to allow me to define "[outer=x, state=y]" variants, and have the "inner" property defined by itself, and let forge combine those in the background?
September 29, 20204 yr This has been removed in 1.15, so the version you are using is not supported. Please update to at least LTS 1.15.2 to receive support.
September 29, 20204 yr Author hmmm, the forge docs for 1.15 mention the Forge Blockstate format in passing, but I now see that link on that page is broken. Let me rephrase the question then, how would I achieve this with the multipart format, or another format? I avoided multipart because it doesn't look like I can set the textures in the blockstate file
September 29, 20204 yr Don't set the textures in the blockstate file. Just use the model itself. If you never used the model system before, you can apply multiple textures to a model, just a single texture per face.
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.