Tried adding blockstates but i get no texture

Started by v3NTF on

Topic category: Advanced modding

Joined May 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Tried adding blockstates but i get no texture
Thu, 12/26/2019 - 15:12 (edited)

I tried to add block states and everything build just fine with no errors but ingame i get a black and purple texture

This is in my blockstate file for the block im using

{
    "variants": {
        "down=false,east=false,north=false,south=false,up=false,west=false,wiretype=copper_wire": { "model": "better_mc:copper_wire" },
        
        "down=false,east=false,north=true,south=false,up=false,west=false,wiretype=copper_wire": { "model": "better_mc:copper_wire_n", "y": 0 },
        "down=false,east=true,north=false,south=false,up=false,west=false,wiretype=copper_wire": { "model": "better_mc:copper_wire_n", "y": 90 },
        "down=false,east=false,north=false,south=true,up=false,west=false,wiretype=copper_wire": { "model": "better_mc:copper_wire_n", "y": 180 },
        "down=false,east=false,north=false,south=false,up=false,west=true,wiretype=copper_wire": { "model": "better_mc:copper_wire_n", "y": 270 },
        
        "down=true,east=false,north=true,south=false,up=false,west=false,wiretype=copper_wire": { "model": "better_mc:copper_wire_nd", "y": 0 },
        "down=true,east=true,north=false,south=false,up=false,west=false,wiretype=copper_wire": { "model": "better_mc:copper_wire_nd", "y": 90 },
        "down=true,east=false,north=false,south=true,up=false,west=false,wiretype=copper_wire": { "model": "better_mc:copper_wire_nd", "y": 180 },
        "down=true,east=false,north=false,south=false,up=false,west=true,wiretype=copper_wire": { "model": "better_mc:copper_wire_nd", "y": 270 },
        
        "down=false,east=false,north=true,south=false,up=true,west=false,wiretype=copper_wire": { "model": "better_mc:copper_wire_nu", "y": 0 },
        "down=false,east=true,north=false,south=false,up=true,west=false,wiretype=copper_wire": { "model": "better_mc:copper_wire_nu", "y": 90 },
        "down=false,east=false,north=false,south=true,up=true,west=false,wiretype=copper_wire": { "model": "better_mc:copper_wire_nu", "y": 180 },
        "down=false,east=false,north=false,south=false,up=true,west=true,wiretype=copper_wire": { "model": "better_mc:copper_wire_nu", "y": 270 },
        
        "down=true,east=false,north=true,south=false,up=true,west=false,wiretype=copper_wire": { "model": "better_mc:copper_wire_nud", "y": 0 },
        "down=true,east=true,north=false,south=false,up=true,west=false,wiretype=copper_wire": { "model": "better_mc:copper_wire_nud", "y": 90 },
        "down=true,east=false,north=false,south=true,up=true,west=false,wiretype=copper_wire": { "model": "better_mc:copper_wire_nud", "y": 180 },
        "down=true,east=false,north=false,south=false,up=true,west=true,wiretype=copper_wire": { "model": "better_mc:copper_wire_nud", "y": 270 },
        
        "down=false,east=false,north=true,south=true,up=false,west=false,wiretype=copper_wire": { "model": "better_mc:copper_wire_ns", "y": 0 },
        "down=false,east=true,north=false,south=false,up=false,west=true,wiretype=copper_wire": { "model": "better_mc:copper_wire_ns", "y": 90 },
        
        "down=true,east=false,north=true,south=true,up=false,west=false,wiretype=copper_wire": { "model": "better_mc:copper_wire_nsd", "y": 0 },
        "down=true,east=true,north=false,south=false,up=false,west=true,wiretype=copper_wire": { "model": "better_mc:copper_wire_nsd", "y": 90 },
        
        "down=false,east=false,north=true,south=true,up=true,west=false,wiretype=copper_wire": { "model": "better_mc:copper_wire_nsu", "y": 0 },
        "down=false,east=true,north=false,south=false,up=true,west=true,wiretype=copper_wire": { "model": "better_mc:copper_wire_nsu", "y": 90 },
        
        "down=true,east=false,north=true,south=true,up=true,west=false,wiretype=copper_wire": { "model": "better_mc:copper_wire_nsud", "y": 0 },
        "down=true,east=true,north=false,south=false,up=true,west=true,wiretype=copper_wire": { "model": "better_mc:copper_wire_nsud", "y": 90 },
        
        "down=false,east=true,north=true,south=true,up=false,west=false,wiretype=copper_wire": { "model": "better_mc:copper_wire_nes", "y": 0 },
        "down=false,east=true,north=false,south=true,up=false,west=true,wiretype=copper_wire": { "model": "better_mc:copper_wire_nes", "y": 90 },
        "down=false,east=false,north=true,south=true,up=false,west=true,wiretype=copper_wire": { "model": "better_mc:copper_wire_nes", "y": 180 },
        "down=false,east=true,north=true,south=false,up=false,west=true,wiretype=copper_wire": { "model": "better_mc:copper_wire_nes", "y": 270 },
        
        "down=true,east=true,north=true,south=true,up=false,west=false,wiretype=copper_wire": { "model": "better_mc:copper_wire_nesd", "y": 0 },
        "down=true,east=true,north=false,south=true,up=false,west=true,wiretype=copper_wire": { "model": "better_mc:copper_wire_nesd", "y": 90 },
        "down=true,east=false,north=true,south=true,up=false,west=true,wiretype=copper_wire": { "model": "better_mc:copper_wire_nesd", "y": 180 },
        "down=true,east=true,north=true,south=false,up=false,west=true,wiretype=copper_wire": { "model": "better_mc:copper_wire_nesd", "y": 270 },
        
        "down=false,east=true,north=true,south=true,up=true,west=false,wiretype=copper_wire": { "model": "better_mc:copper_wire_nesu", "y": 0 },
        "down=false,east=true,north=false,south=true,up=true,west=true,wiretype=copper_wire": { "model": "better_mc:copper_wire_nesu", "y": 90 },
        "down=false,east=false,north=true,south=true,up=true,west=true,wiretype=copper_wire": { "model": "better_mc:copper_wire_nesu", "y": 180 },
        "down=false,east=true,north=true,south=false,up=true,west=true,wiretype=copper_wire": { "model": "better_mc:copper_wire_nesu", "y": 270 },
        
        "down=true,east=true,north=true,south=true,up=true,west=false,wiretype=copper_wire": { "model": "better_mc:copper_wire_nesud", "y": 0 },
        "down=true,east=true,north=false,south=true,up=true,west=true,wiretype=copper_wire": { "model": "better_mc:copper_wire_nesud", "y": 90 },
        "down=true,east=false,north=true,south=true,up=true,west=true,wiretype=copper_wire": { "model": "better_mc:copper_wire_nesud", "y": 180 },
        "down=true,east=true,north=true,south=false,up=true,west=true,wiretype=copper_wire": { "model": "better_mc:copper_wire_nesud", "y": 270 },
        
        "down=false,east=true,north=true,south=false,up=false,west=false,wiretype=copper_wire": { "model": "better_mc:copper_wire_ne", "y": 0 },
        "down=false,east=true,north=false,south=true,up=false,west=false,wiretype=copper_wire": { "model": "better_mc:copper_wire_ne", "y": 90 },
        "down=false,east=false,north=false,south=true,up=false,west=true,wiretype=copper_wire": { "model": "better_mc:copper_wire_ne", "y": 180 },
        "down=false,east=false,north=true,south=false,up=false,west=true,wiretype=copper_wire": { "model": "better_mc:copper_wire_ne", "y": 270 },
        
        "down=true,east=true,north=true,south=false,up=false,west=false,wiretype=copper_wire": { "model": "better_mc:copper_wire_ned", "y": 0 },
        "down=true,east=true,north=false,south=true,up=false,west=false,wiretype=copper_wire": { "model": "better_mc:copper_wire_ned", "y": 90 },
        "down=true,east=false,north=false,south=true,up=false,west=true,wiretype=copper_wire": { "model": "better_mc:copper_wire_ned", "y": 180 },
        "down=true,east=false,north=true,south=false,up=false,west=true,wiretype=copper_wire": { "model": "better_mc:copper_wire_ned", "y": 270 },
        
        "down=false,east=true,north=true,south=false,up=true,west=false,wiretype=copper_wire": { "model": "better_mc:copper_wire_neu", "y": 0 },
        "down=false,east=true,north=false,south=true,up=true,west=false,wiretype=copper_wire": { "model": "better_mc:copper_wire_neu", "y": 90 },
        "down=false,east=false,north=false,south=true,up=true,west=true,wiretype=copper_wire": { "model": "better_mc:copper_wire_neu", "y": 180 },
        "down=false,east=false,north=true,south=false,up=true,west=true,wiretype=copper_wire": { "model": "better_mc:copper_wire_neu", "y": 270 },
        
        "down=true,east=true,north=true,south=false,up=true,west=false,wiretype=copper_wire": { "model": "better_mc:copper_wire_neud", "y": 0 },
        "down=true,east=true,north=false,south=true,up=true,west=false,wiretype=copper_wire": { "model": "better_mc:copper_wire_neud", "y": 90 },
        "down=true,east=false,north=false,south=true,up=true,west=true,wiretype=copper_wire": { "model": "better_mc:copper_wire_neud", "y": 180 },
        "down=true,east=false,north=true,south=false,up=true,west=true,wiretype=copper_wire": { "model": "better_mc:copper_wire_neud", "y": 270 },
        
        "down=false,east=true,north=true,south=true,up=false,west=true,wiretype=copper_wire": { "model": "better_mc:copper_wire_nesw", "y": 0 },
        
        "down=false,east=false,north=false,south=false,up=true,west=false,wiretype=copper_wire": { "model": "better_mc:copper_wire_u", "y": 0 },
        
        "down=true,east=false,north=false,south=false,up=false,west=false,wiretype=copper_wire": { "model": "better_mc:copper_wire_d", "y": 0 },
        
        "down=true,east=false,north=false,south=false,up=true,west=false,wiretype=copper_wire": { "model": "better_mc:copper_wire_ud", "y": 0 },
        
        "down=false,east=true,north=true,south=true,up=true,west=true,wiretype=copper_wire": { "model": "better_mc:copper_wire_neswu", "y": 0 },
        "down=true,east=true,north=true,south=true,up=false,west=true,wiretype=copper_wire": { "model": "better_mc:copper_wire_neswd", "y": 0 },
        "down=true,east=true,north=true,south=true,up=true,west=true,wiretype=copper_wire": { "model": "better_mc:copper_wire_neswud", "y": 0 },

Edited by v3NTF on Thu, 12/26/2019 - 15:12
Joined May 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Maybe this becuase I only…
Tue, 12/03/2019 - 12:15

Maybe this becuase I only have one block (better_mc:copper_wire) , for these blockstates to work do I have to make a block of every model?

Joined May 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
There were no error logs, i…
Tue, 12/03/2019 - 22:38

There were no error logs, i still get a purple and black texture in the game

 

Joined Nov 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You won't get a…
Wed, 12/04/2019 - 16:13

You won't get a recompilation error, but an error message will still appear in the console when the test client loads the main menu.

Check if you forgot to remove the comma after the last entry and if the brackets are balanced.
You should also remove the "wiretype" state, especially if it's always set to "copper_wire": instead, it would be better to "flatten" possible variants into different blocks, like dyed blocks in 1.14.

Joined May 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I have changed my block…
Wed, 12/04/2019 - 23:12

I have changed my block states to the new 1.14.4 types , in 1.12.2 it was down=true or down=false, now it is facing=down and if it isnt facing down then theres nothing. The updated code. 

 

{
    "variants": {
                 "": {
      "model": "better_mc:block/copper_wire" },
      "facing=north": { "model": "better_mc:copper_wire_n", "y": 0 },
        "facing=east": { "model": "better_mc:copper_wire_n", "y": 90 },
        "facing=south": { "model": "better_mc:copper_wire_n", "y": 180 },
        "facing=west": { "model": "better_mc:copper_wire_n", "y": 270 },
        
        "facing=down,facing=north,": { "model": "better_mc:copper_wire_nd", "y": 0 },
        "facing=down,facing=east,": { "model": "better_mc:copper_wire_nd", "y": 90 },
        "facing=down,facing=south,": { "model": "better_mc:copper_wire_nd", "y": 180 },
        "facing=down,facing=west": { "model": "better_mc:copper_wire_nd", "y": 270 },
        
        "facing=north,facing=up,": { "model": "better_mc:copper_wire_nu", "y": 0 },
        "facing=east,facing=up,": { "model": "better_mc:copper_wire_nu", "y": 90 },
        "facing=south,facing=up,": { "model": "better_mc:copper_wire_nu", "y": 180 },
        "facing=up,facing=west": { "model": "better_mc:copper_wire_nu", "y": 270 },
        
        "facing=down,facing=north,facing=up,": { "model": "better_mc:copper_wire_nud", "y": 0 },
        "facing=down,facing=east,facing=up,": { "model": "better_mc:copper_wire_nud", "y": 90 },
        "facing=down,facing=south,facing=up,": { "model": "better_mc:copper_wire_nud", "y": 180 },
        "facing=down,facing=up,facing=west": { "model": "better_mc:copper_wire_nud", "y": 270 },
        
        "facing=north,facing=south,": { "model": "better_mc:copper_wire_ns", "y": 0 },
        "facing=east,facing=west": { "model": "better_mc:copper_wire_ns", "y": 90 },
        
        "facing=down,facing=north,facing=south,": { "model": "better_mc:copper_wire_nsd", "y": 0 },
        "facing=down,facing=east,facing=west": { "model": "better_mc:copper_wire_nsd", "y": 90 },
        
        "facing=north,facing=south,facing=up,": { "model": "better_mc:copper_wire_nsu", "y": 0 },
        "facing=east,facing=up,facing=west": { "model": "better_mc:copper_wire_nsu", "y": 90 },
        
        "facing=down,facing=north,facing=south,facing=up,": { "model": "better_mc:copper_wire_nsud", "y": 0 },
        "facing=down,facing=east,facing=up,facing=west": { "model": "better_mc:copper_wire_nsud", "y": 90 },
        
        "facing=east,facing=north,facing=south,": { "model": "better_mc:copper_wire_nes", "y": 0 },
        "facing=east,facing=south,facing=west": { "model": "better_mc:copper_wire_nes", "y": 90 },
        "facing=north,facing=south,facing=west": { "model": "better_mc:copper_wire_nes", "y": 180 },
        "facing=east,facing=north,facing=west": { "model": "better_mc:copper_wire_nes", "y": 270 },
        
        "facing=down,facing=east,facing=north,facing=south,": { "model": "better_mc:copper_wire_nesd", "y": 0 },
        "facing=down,facing=east,facing=south,facing=west": { "model": "better_mc:copper_wire_nesd", "y": 90 },
        "facing=down,facing=north,facing=south,facing=west": { "model": "better_mc:copper_wire_nesd", "y": 180 },
        "facing=down,facing=east,facing=north,facing=west": { "model": "better_mc:copper_wire_nesd", "y": 270 },
        
        "facing=east,facing=north,facing=south,facing=up,": { "model": "better_mc:copper_wire_nesu", "y": 0 },
        "facing=east,facing=south,facing=up,facing=west": { "model": "better_mc:copper_wire_nesu", "y": 90 },
        "facing=north,facing=south,facing=up,facing=west": { "model": "better_mc:copper_wire_nesu", "y": 180 },
        "facing=east,facing=north,facing=up,facing=west": { "model": "better_mc:copper_wire_nesu", "y": 270 },
        
        "facing=down,facing=east,facing=north,facing=south,facing=up,": { "model": "better_mc:copper_wire_nesud", "y": 0 },
        "facing=down,facing=east,facing=south,facing=up,facing=west": { "model": "better_mc:copper_wire_nesud", "y": 90 },
        "facing=down,facing=north,facing=south,facing=up,facing=west": { "model": "better_mc:copper_wire_nesud", "y": 180 },
        "facing=down,facing=east,facing=north,facing=up,facing=west": { "model": "better_mc:copper_wire_nesud", "y": 270 },
        
        "facing=east,facing=north,": { "model": "better_mc:copper_wire_ne", "y": 0 },
        "facing=east,facing=south,": { "model": "better_mc:copper_wire_ne", "y": 90 },
        "facing=south,facing=west": { "model": "better_mc:copper_wire_ne", "y": 180 },
        "facing=north,facing=west": { "model": "better_mc:copper_wire_ne", "y": 270 },
        
        "facing=down,facing=east,facing=north,": { "model": "better_mc:copper_wire_ned", "y": 0 },
        "facing=down,facing=east,facing=south,": { "model": "better_mc:copper_wire_ned", "y": 90 },
        "facing=down,facing=south,facing=west": { "model": "better_mc:copper_wire_ned", "y": 180 },
        "facing=down,facing=north,facing=west": { "model": "better_mc:copper_wire_ned", "y": 270 },
        
        "facing=east,facing=north,facing=up,": { "model": "better_mc:copper_wire_neu", "y": 0 },
        "facing=east,facing=south,facing=up,": { "model": "better_mc:copper_wire_neu", "y": 90 },
        "facing=south,facing=up,facing=west": { "model": "better_mc:copper_wire_neu", "y": 180 },
        "facing=north,facing=up,facing=west": { "model": "better_mc:copper_wire_neu", "y": 270 },
        
        "facing=down,facing=east,facing=north,facing=up,": { "model": "better_mc:copper_wire_neud", "y": 0 },
        "facing=down,facing=east,facing=south,facing=up,": { "model": "better_mc:copper_wire_neud", "y": 90 },
        "facing=down,facing=south,facing=up,facing=west": { "model": "better_mc:copper_wire_neud", "y": 180 },
        "facing=down,facing=north,facing=up,facing=west": { "model": "better_mc:copper_wire_neud", "y": 270 },
        
        "facing=east,facing=north,facing=south,facing=west": { "model": "better_mc:copper_wire_nesw", "y": 0 },
        
        "facing=up,": { "model": "better_mc:copper_wire_u", "y": 0 },
        
        "facing=down,": { "model": "better_mc:copper_wire_d", "y": 0 },
        
        "facing=down,facing=up,": { "model": "better_mc:copper_wire_ud", "y": 0 },
        
        "facing=east,facing=north,facing=south,facing=up,facing=west": { "model": "better_mc:copper_wire_neswu", "y": 0 },
        "facing=down,facing=east,facing=north,facing=south,facing=west": { "model": "better_mc:copper_wire_neswd", "y": 0 },
        "facing=down,facing=east,facing=north,facing=south,facing=up,facing=west": { "model": "better_mc:copper_wire_neswud", "y": 0 0}
        }
        }

 

 

 

Then i run the client and this these two errors are still here

m33m18:10.22 [Server-Worker-3/WARN] [minecraft/ModelBakery]: Exception loading blockstate definition: 'better_mc:blockstates/copperwire.json' missing model for variant: 'better_mc:copperwire#'
m33m18:10.22 [Server-Worker-3/WARN] [minecraft/ModelBakery]: Exception loading blockstate definition: 'better_mc:blockstates/copperwire.json' in resourcepack: 'Mod Resources': com.google.gson.stream.MalformedJsonException: Unterminated object at line 87 column 135 path $.variants.

 

I honestly dont know what to do from here on. Please fill me in on what to do.

Exception loading blockstate…
Thu, 12/05/2019 - 08:30

Exception loading blockstate definition: 'better_mc:blockstates/copperwire.json' in resourcepack: 'Mod Resources': com.google.gson.stream.MalformedJsonException: Unterminated object at line 87 column 135 path $.variants.

It tells you exactly where the problem is. Line 87, column 135 in copperwire.json

Your JSON is invalid. If you are just doing guesswork here (which I have a feeling you do), I would recommend you to learn a bit of Java first and basics of JSON format before doing extensive code modifications.