#Custom Block texture not working

27 messages · Page 1 of 1 (latest)

viscid eagle
#

Im getting this while trying to load my custom textures

[19:58:14] [Worker-Main-4/WARN] (Minecraft) Exception loading blockstate definition: 'mcc:blockstates/microcontroller.json' missing model for variant: 'mcc:microcontroller#'
[19:58:14] [Worker-Main-4/WARN] (Minecraft) Unable to load model: 'mcc:item/microcontroller' referenced from: mcc:item/microcontroller: java.io.FileNotFoundException: mcc:models/item/microcontroller.json

wanton ermine
#

Based on what you posted your blockstate file has invalid values; you may wish to add the code here

viscid eagle
wanton ermine
#

Can you post the code of the item model as well?

viscid eagle
#

the block model

{
  "credit": "Made by Constexpr(photo.png)",
  "parent": "block/cube_all",
  "textures": {
    "0": "mcc:block/microcontroller_texture",
    "1": "mcc:block/circuitry1",
    "2": "mcc:block/circuitry2",
    "4": "mcc:block/microcontroller_body",
    "5": "mcc:block/circuitry3",
    "particle": "mcc:block/microcontroller_texture"
  },
  "elements": [
    {
      "name": "Base",
      "from": [0, 0, 0],
      "to": [16, 1, 16],
      "faces": {
        "north": {"uv": [0, 0, 16, 1], "texture": "#4"},
        "east": {"uv": [0, 0, 16, 1], "texture": "#4"},
        "south": {"uv": [0, 0, 16, 1], "texture": "#4"},
        "west": {"uv": [0, 0, 16, 1], "texture": "#4"},
        "up": {"uv": [0, 0, 16, 16], "texture": "#0"},
        "down": {"uv": [0, 0, 16, 16], "texture": "#4"}
      }
    },
    {
      "name": "Circuitry1",
      "from": [2, 1, 2],
      "to": [6, 2, 9],
      "rotation": {"angle": 0, "axis": "y", "origin": [2, 0, 2]},
      "faces": {
        "north": {"uv": [0, 8, 4, 9], "texture": "#1"},
        "east": {"uv": [0, 7, 7, 8], "texture": "#1"},
        "south": {"uv": [8, 0, 12, 1], "texture": "#1"},
        "west": {"uv": [7, 7, 14, 8], "texture": "#1"},
        "up": {"uv": [4, 7, 0, 0], "texture": "#1"},
        "down": {"uv": [8, 0, 4, 7], "texture": "#1"}
      }
    },
    {
      "name": "Circuitry2",
      "from": [13, 1, 1],
      "to": [15, 2, 3],
      "rotation": {"angle": 0, "axis": "y", "origin": [13, 0, 1]},
      "faces": {
        "north": {"uv": [2, 0, 4, 1], "texture": "#5"},
        "east": {"uv": [2, 1, 4, 2], "texture": "#5"},
        "south": {"uv": [2, 2, 4, 3], "texture": "#5"},
        "west": {"uv": [2, 3, 4, 4], "texture": "#5"},
        "up": {"uv": [2, 2, 0, 0], "texture": "#5"},
        "down": {"uv": [2, 2, 0, 4], "texture": "#5"}
      }
    },
    {
      "name": "Circuitry3",
      "from": [6, 1, 12],
      "to": [13, 2, 15],
      "rotation": {"angle": 0, "axis": "y", "origin": [12, 0, 12]},
      "faces": {
        "north": {"uv": [0, 6, 7, 8], "texture": "#2"},
        "east": {"uv": [7, 2, 10, 4], "texture": "#2"},
        "south": {"uv": [7, 0, 14, 2], "texture": "#2"},
        "west": {"uv": [7, 4, 10, 6], "texture": "#2"},
        "up": {"uv": [7, 3, 0, 0], "texture": "#2"},
        "down": {"uv": [7, 3, 0, 6], "texture": "#2"}
      }
    }
  ]
}
#
{
  "parent": "mcc:block/microcontroller"
}

Item model

viscid eagle
wanton ermine
#

I cannot see anything immediately wrong. However I do want to make two observations:

  1. Stock Minecraft files use "parent": "block/block" when doing all the configurating you are doing;
  2. 99.9% of variable names may NOT start with a number, I suggest renaming the textures 0 to 5

So in short, I do not know what is wrong 😦 maybe adding the log file may give a better clue.

viscid eagle
#

[20:24:50] [Worker-Main-2/INFO] (net.minecraft.client.font.UnihexFont) Found unifont_jp_patch-15.1.05.hex, loading
[20:24:51] [Worker-Main-4/WARN] (net.minecraft.client.render.model.BlockStatesLoader) Exception loading blockstate definition: 'mcc:blockstates/microcontroller.json' missing model for variant: 'mcc:microcontroller#'
[20:24:51] [Worker-Main-4/WARN] (net.minecraft.client.render.model.ModelLoader) Unable to load model: 'mcc:item/microcontroller' referenced from: mcc:item/microcontroller: java.io.FileNotFoundException: mcc:models/item/microcontroller.json

#

this is the only thing inm the debuglog that relates that u saw

#

that i saw*

#

im gonna try the ""parent": "block/block" and the renaming

#

same error

[23:05:35] [Worker-Main-3/WARN] (Minecraft) Exception loading blockstate definition: 'mcc:blockstates/microcontroller.json' missing model for variant: 'mcc:microcontroller#'
[23:05:35] [Worker-Main-3/WARN] (Minecraft) Unable to load model: 'mcc:item/microcontroller' referenced from: mcc:item/microcontroller: java.io.FileNotFoundException: mcc:models/item/microcontroller.json

#

updated that all aswell

wanton ermine
#

Than we have to assume the file is indeed not there. You can verify if it is in the jar by renaming the .jar to .zip

wanton ermine
#

Yes

#

build/libs/your_mod_name.jar

viscid eagle
#

ill do that now

#

the shouldnt be any reason that using the runClient would cause issues right?

wanton ermine
#

Normally it should not cause issues, but than again nothing is perfect 😛

viscid eagle
#

all things are in the jar

wanton ermine
#

It says it cannot find assets/mmc/models/item/microcontroller.json but if it is there, than I am sorry because I have no further clues

viscid eagle