Jump to content

Recommended Posts

Posted (edited)

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
Posted

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 }
    }
}
Posted

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

Posted

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.

Posted

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

 

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