Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[1.12.2] Blockstate json with multiple states


Tieso2001
 Share

Recommended Posts

I am making a corn plant/crop that is two blocks high. I want the plant to use different textures depending on if it the the lower or upper half of the plant and depending on the age that half is. That is why I have made two different type of states: "age" & "half. "age" can be a value from 0-7 and "half" can be "upper" or "lower". The problem is that I can't get my blockstate file to work. Can someone explain me how I should do this, because the forge documentation only explains how to select a model with one state/variable. Here are some of the things I've tried.

 

{
  "forge_marker": 1,
  "variants": {
    "age=0, half=lower": { "model" : "boneappletea:corn_lower_stage0" },
    "age=1, half=lower": { "model" : "boneappletea:corn_lower_stage0" },
    "age=2, half=lower": { "model" : "boneappletea:corn_lower_stage1" },
    "age=3, half=lower": { "model" : "boneappletea:corn_lower_stage1" },
    "age=4, half=lower": { "model" : "boneappletea:corn_lower_stage2" },
    "age=5, half=lower": { "model" : "boneappletea:corn_lower_stage2" },
    "age=6, half=lower": { "model" : "boneappletea:corn_lower_stage3" },
    "age=7, half=lower": { "model" : "boneappletea:corn_lower_stage3" },
    "age=0, half=upper": { "model" : "boneappletea:corn_upper_stage0" },
    "age=1, half=upper": { "model" : "boneappletea:corn_upper_stage0" },
    "age=2, half=upper": { "model" : "boneappletea:corn_upper_stage1" },
    "age=3, half=upper": { "model" : "boneappletea:corn_upper_stage1" },
    "age=4, half=upper": { "model" : "boneappletea:corn_upper_stage2" },
    "age=5, half=upper": { "model" : "boneappletea:corn_upper_stage2" },
    "age=6, half=upper": { "model" : "boneappletea:corn_upper_stage3" },
    "age=7, half=upper": { "model" : "boneappletea:corn_upper_stage3" }
  }
}
{
  "forge_marker": 1,
  "variants": {
    "half=lower": {
        "age=0": { "model" : "boneappletea:corn_lower_stage0" },
        "age=1": { "model" : "boneappletea:corn_lower_stage0" },
        "age=2": { "model" : "boneappletea:corn_lower_stage1" },
        "age=3": { "model" : "boneappletea:corn_lower_stage1" },
        "age=4": { "model" : "boneappletea:corn_lower_stage2" },
        "age=5": { "model" : "boneappletea:corn_lower_stage2" },
        "age=6": { "model" : "boneappletea:corn_lower_stage3" },
        "age=7": { "model" : "boneappletea:corn_lower_stage3" }
    },
    "half=upper": {
      "age=0": { "model" : "boneappletea:corn_upper_stage0" },
      "age=1": { "model" : "boneappletea:corn_upper_stage0" },
      "age=2": { "model" : "boneappletea:corn_upper_stage1" },
      "age=3": { "model" : "boneappletea:corn_upper_stage1" },
      "age=4": { "model" : "boneappletea:corn_upper_stage2" },
      "age=5": { "model" : "boneappletea:corn_upper_stage2" },
      "age=6": { "model" : "boneappletea:corn_upper_stage3" },
      "age=7": { "model" : "boneappletea:corn_upper_stage3" }
    },
    "age=0": {
      "half=lower": { "model" : "boneappletea:corn_lower_stage0" },
      "half=upper": { "model" : "boneappletea:corn_upper_stage0" }
    },
    "age=1": {
      "half=lower": { "model" : "boneappletea:corn_lower_stage0" },
      "half=upper": { "model" : "boneappletea:corn_upper_stage0" }
    },
    "age=2": {
      "half=lower": { "model" : "boneappletea:corn_lower_stage1" },
      "half=upper": { "model" : "boneappletea:corn_upper_stage1" }
    },
    "age=3": {
      "half=lower": { "model" : "boneappletea:corn_lower_stage1" },
      "half=upper": { "model" : "boneappletea:corn_upper_stage1" }
    },
    "age=4": {
      "half=lower": { "model" : "boneappletea:corn_lower_stage2" },
      "half=upper": { "model" : "boneappletea:corn_upper_stage2" }
    },
    "age=5": {
      "half=lower": { "model" : "boneappletea:corn_lower_stage2" },
      "half=upper": { "model" : "boneappletea:corn_upper_stage2" }
    },
    "age=6": {
      "half=lower": { "model" : "boneappletea:corn_lower_stage3" },
      "half=upper": { "model" : "boneappletea:corn_upper_stage3" }
    },
    "age=7": {
      "half=lower": { "model" : "boneappletea:corn_lower_stage3" },
      "half=upper": { "model" : "boneappletea:corn_upper_stage3" }
    }
  }
}

 

Link to comment
Share on other sites

Regarding your first file:

Variants are just strings, they must match exactly. No analyzing is done on them. Minecraft expects them to be comma separated (not comma+space separated) and the property-keys to be ordered alphabetically.

 

Your second file is not a valid blockstate file.

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.

Guest
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.

 Share



×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.