Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

See this page for an explanation of sub-models in Forge's blockstates format.

 

I also have an example of the format here. This is a BuildCraft-style pipe composed of two individual models: the centre cube and the side attachment. The cube is used as a base model and the side attachment is added as a sub-model rotated as necessary.

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.

  • Author

Isn't that exactly what is described in the Sub-Models section of the blockstate documentation?

See this page for an explanation of sub-models in Forge's blockstates format.

 

I also have an example of the format here. This is a BuildCraft-style pipe composed of two individual models: the centre cube and the side attachment. The cube is used as a base model and the side attachment is added as a sub-model rotated as necessary.

 

I followed that but my model does not display correctly.

 

Forge Blockstate:

{
  "forge_marker": 1,
  "defaults": {
    "transform": "forge:default-block"
  },
  "variants": {
    "normal": [
      {
        "model": "nex:fingers_plant"
      }
    ],
    "north": {
      "true": {
        "model": "nex:fingers_plant_side"
      },
      "false": {
        "submodel": {
            "noside0": { "model": "nex:fingers_plant_noside", "weight": 6 },
            "noside1": { "model": "nex:fingers_plant_noside1" },
            "noside2": { "model": "nex:fingers_plant_noside2" },
            "noside3": { "model": "nex:fingers_plant_noside3" }
        }
      }
    },
    "east": {
      "true": {
        "model": "nex:fingers_plant_side", "y": 90, "uvlock": true
      },
      "false": {
        "submodel": {
          "noside4": { "model": "nex:fingers_plant_noside1", "y": 90, "uvlock": true },
          "noside5": { "model": "nex:fingers_plant_noside2", "y": 90, "uvlock": true },
          "noside6": { "model": "nex:fingers_plant_noside3", "y": 90, "uvlock": false },
          "nosid7": { "model": "nex:fingers_plant_noside", "weight": 6, "y": 90, "uvlock": true }
        }
      }
    },
    "south": {
      "true": {
        "model": "nex:fingers_plant_side", "y": 180, "uvlock": true
      },
      "false": {
        "submodel": {
          "noside8": { "model": "nex:fingers_plant_noside2", "y": 180, "uvlock": true },
          "noside9": { "model": "nex:fingers_plant_noside3", "y": 180, "uvlock": false },
          "noside10": { "model": "nex:fingers_plant_noside", "weight": 6, "y": 180, "uvlock": true },
          "noside11": { "model": "nex:fingers_plant_noside1", "y": 180, "uvlock": true }
        }
      }
    },
    "west": {
      "true": {
        "model": "nex:fingers_plant_side", "y": 270, "uvlock": true
      },
      "false": {
        "submodel": {
          "noside12":{ "model": "nex:fingers_plant_noside3", "y": 270, "uvlock": false },
          "noside13":{ "model": "nex:fingers_plant_noside", "weight": 6, "y": 270, "uvlock": true },
          "noside14":{ "model": "nex:fingers_plant_noside1", "y": 270, "uvlock": true },
          "noside15":{ "model": "nex:fingers_plant_noside2", "y": 270, "uvlock": true }
        }
      }
    },
    "up": {
      "true": {
        "model": "nex:fingers_plant_side", "x": 270, "uvlock": true
      },
      "false": {
        "submodel": {
          "nosidev0": { "model": "nex:fingers_plant_noside_v1", "x": 270, "uvlock": false },
          "nosidev1": { "model": "nex:fingers_plant_noside_v1", "x": 270, "y": 90, "uvlock": false },
          "nosidev2": { "model": "nex:fingers_plant_noside_v1", "x": 270, "y": 180, "uvlock": false },
          "nosidev3": { "model": "nex:fingers_plant_noside_v2", "x": 270, "uvlock": false }
        }
      }
    },
    "down": {
      "true": {
        "model": "nex:fingers_plant_side", "x": 90, "uvlock": true
      },
      "false": {
        "submodel": {
          "nosidev4": { "model": "nex:fingers_plant_noside_v1", "x": 90, "uvlock": false },
          "nosidev5": { "model": "nex:fingers_plant_noside_v1", "x": 90, "y": 180, "uvlock": false },
          "nosidev6": { "model": "nex:fingers_plant_noside_v2", "x": 90, "uvlock": false },
          "nosidev7": { "model": "nex:fingers_plant_noside_v2", "x": 90, "y": 90,  "uvlock": false }
        }
      }
    }
  }
}

 

Vanilla Blockstate:

{
  "multipart": [
    {"when": { "north": true },
      "apply": { "model": "nex:fingers_plant_side" }
    },
    {   "when": { "east": true },
      "apply": { "model": "nex:fingers_plant_side", "y": 90, "uvlock": true }
    },
    {   "when": { "south": true },
      "apply": { "model": "nex:fingers_plant_side", "y": 180, "uvlock": true }
    },
    {   "when": { "west": true },
      "apply": { "model": "nex:fingers_plant_side", "y": 270, "uvlock": true }
    },
    {   "when": { "up": true },
      "apply": { "model": "nex:fingers_plant_side", "x": 270, "uvlock": true }
    },
    {   "when": { "down": true },
      "apply": { "model": "nex:fingers_plant_side", "x": 90, "uvlock": true }
    },
    {   "when": { "north": false },
      "apply": [
        { "model": "nex:fingers_plant_noside", "weight": 6 },
        { "model": "nex:fingers_plant_noside1" },
        { "model": "nex:fingers_plant_noside2" },
        { "model": "nex:fingers_plant_noside3" }
      ]
    },
    {   "when": { "east": false },
      "apply": [
        { "model": "nex:fingers_plant_noside1", "y": 90, "uvlock": true },
        { "model": "nex:fingers_plant_noside2", "y": 90, "uvlock": true },
        { "model": "nex:fingers_plant_noside3", "y": 90, "uvlock": false },
        { "model": "nex:fingers_plant_noside", "weight": 6, "y": 90, "uvlock": true }
      ]
    },
    {   "when": { "south": false },
      "apply": [
        { "model": "nex:fingers_plant_noside2", "y": 180, "uvlock": true },
        { "model": "nex:fingers_plant_noside3", "y": 180, "uvlock": false },
        { "model": "nex:fingers_plant_noside", "weight": 6, "y": 180, "uvlock": true },
        { "model": "nex:fingers_plant_noside1", "y": 180, "uvlock": true }
      ]
    },
    {   "when": { "west": false },
      "apply": [
        { "model": "nex:fingers_plant_noside3", "y": 270, "uvlock": false },
        { "model": "nex:fingers_plant_noside", "weight": 6, "y": 270, "uvlock": true },
        { "model": "nex:fingers_plant_noside1", "y": 270, "uvlock": true },
        { "model": "nex:fingers_plant_noside2", "y": 270, "uvlock": true }
      ]
    },
    {   "when": { "up": false },
      "apply": [
        { "model": "nex:fingers_plant_noside_v1", "x": 270, "uvlock": false },
        { "model": "nex:fingers_plant_noside_v1", "x": 270, "y": 90, "uvlock": false },
        { "model": "nex:fingers_plant_noside_v1", "x": 270, "y": 180, "uvlock": false },
        { "model": "nex:fingers_plant_noside_v2", "x": 270, "uvlock": false },
        { "model": "nex:fingers_plant_noside_v2", "x": 270, "y": 180, "uvlock": false }
      ]
    },
    {   "when": { "down": false },
      "apply": [
        { "model": "nex:fingers_plant_noside_v1", "x": 90, "uvlock": false },
        { "model": "nex:fingers_plant_noside_v1", "x": 90, "y": 180, "uvlock": false },
        { "model": "nex:fingers_plant_noside_v2", "x": 90, "uvlock": false },
        { "model": "nex:fingers_plant_noside_v2", "x": 90, "y": 90,  "uvlock": false },
        { "model": "nex:fingers_plant_noside_v2", "x": 90, "y": 180, "uvlock": false },
        { "model": "nex:fingers_plant_noside_v2", "x": 90, "y": 270, "uvlock": false }
      ]
    }]
}

I don't see any obvious errors.

 

Post your models and describe (possibly with screenshots) how it's not displaying correctly.

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.

Vanilla's JSON format has improved in 1.9. Just go with it unless you have some awesome variant to add to what you've already shown.

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.

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

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.