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

Posted

When i try to start minecraft it keeps telling me that a model is missing for facing variants but the variants have an existing model.

This is the error in the log:

log.thumb.png.669b086f53d56235b0c77dd0b6ff1c6e.png

 

"cable" BlockState JSON:

{
  "forge_marker": 1,
  "defaults": {
    "textures": {
      "all": "engineerstech:blocks/cable_low_end"
    },
    "model": "engineerstech:block/cable",
    "uvlock": true
  },
  "variants": {
    "": [{
    	"textures": {
      		"all": "engineerstech:blocks/cable_low_end"
    	},
    	"model": "engineerstech:block/cable",
    	"uvlock": true
    }],
    "facing": {
    	"north": {
    		"model": "engineerstech:block/cable_extend"
    	},
    	"east": {
    		"model": "engineerstech:block/cable_extend",
    		"y": 90
    	},
    	"south": {
    		"model": "engineerstech:block/cable_extend",
    		"y": 180
    	},
    	"west": {
    		"model": "engineerstech:block/cable_extend",
    		"y": 270
    	},
    	"up": {
    		"model": "engineerstech:block/cable_extend",
    		"x": 90
    	},
    	"down": {
    		"model": "engineerstech:block/cable_extend",
    		"x": 270
    	}
    }
  }
}

 

"cable_extend" model JSON:

{
    "textures": {
    	"particle": "engineerstech:blocks/cable_low_end",
        "end": "engineerstech:blocks/cable_low_end",
        "side": "engineerstech:blocks/cable_low_side"
    },
    "elements": [
    	{
    		"from": [6,6,16],
    		"to": [10,10,10],
    		"faces": {
                "down":  { "uv": [6,6, 16,16], "texture": "#side" },
                "up":    { "uv": [6,6, 16,16], "texture": "#side" },
                "north": { "uv": [6,6, 10,10], "texture": "#end" },
                "south": { "uv": [6,6, 10,10], "texture": "#end" },
                "west":  { "uv": [6,6, 16,16], "texture": "#side" },
                "east":  { "uv": [6,6, 16,16], "texture": "#side" }
            }
    	}
    ]
}

 

my project repository: https://github.com/FuturisticLux/engineerstech

Edited by FuturisticLux

Hi

I think your blockstates json isn't right.

Look at mbe03 example in this example project

https://github.com/TheGreyGhost/MinecraftByExample

eg

{
    "variants": {
           "facing=north": { "model": "minecraftbyexample:block/mbe03_block_variants_model_blue"},
            "facing=east": { "model": "minecraftbyexample:block/mbe03_block_variants_model_blue", "y": 90 },
           "facing=south": { "model": "minecraftbyexample:block/mbe03_block_variants_model_blue", "y": 180 },
            "facing=west": { "model": "minecraftbyexample:block/mbe03_block_variants_model_blue", "y": 270 }
    }
}
  • Author

The exception keeps hapenning.

 

And I don't understand when you must use forge blocksates instead of vanilla minecraft blocksates.

Hi

What version of Forge are you using?  Even vanilla blockstates look like this now

 

{
    "variants": {
        "axis=y":  { "model": "block/acacia_log" },
        "axis=z":   { "model": "block/acacia_log", "x": 90 },
        "axis=x":   { "model": "block/acacia_log", "x": 90, "y": 90 }
    }
}

 

Your error log clearly shows that it is unable to parse your blockstates properly.  It doesn't find any of the "facing" variants and it thinks that your "north" value for facing is a boolean property.

 

-TGG

  • Author

Ok, facing wasn't the property i needed to use, I now use each direction as a boolean property.

 

new cable blockstate JSON:

{
  "forge_marker": 1,
  "defaults": {
    "textures": {
      "all": "engineerstech:blocks/cable_low_end"
    },
    "model": "engineerstech:block/cable",
    "uvlock": true
  },
  "variants": {
   	"": [{
    	"textures": {
      		"all": "engineerstech:blocks/cable_low_end"
    	},
    	"model": "engineerstech:block/cable",
    	"uvlock": true
    }],
    "north": {
    	"true": {
    		"model": "engineerstech:block/cable_extend"
    	}
    },
    "east": {
    	"true": {
    		"model": "engineerstech:block/cable_extend",
    		"y": 90
    	}
    },
    "south": {
    	"true": {
    		"model": "engineerstech:block/cable_extend",
    		"y": 180
    	}
    },
    "west": {
    	"true": {
    		"model": "engineerstech:block/cable_extend",
    		"y": 270
    	}
    },
    "up": {
    	"true": {
    		"model": "engineerstech:block/cable_extend",
    		"x": 90
    	}
    },
    "down": {
    	"true": {
    		"model": "engineerstech:block/cable_extend",
    		"x": 270
    	}
    }
  }
}

 

It indicates that the blockstate should provide a model for each combination of booleans.

 

What I understand from the documentation the use of forge states should automate the combinations, example: if both up and down are true then both should be aplied.

Hi

 

I think I read somewhere that Forge states have been removed, your documentation may be out of date (that happens a lot)

Ah yeah here's the link

https://gist.github.com/williewillus/30d7e3f775fe93c503bddf054ef3f93e

 

Quote

New Forge model loader

  • Forge Blockstate jsons are now removed as having model logic being was always a massive hack
  • Instead, the vanilla model json format has been expanded. You can now specify a "loader" field in the json and register a custom loader to process the model in code.

 

-TGG

 

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.