#Unable to use any textures outside block/item folder

5 messages · Page 1 of 1 (latest)

tulip reef
#

Hey guys, I have block model file pearlstone.json :

{
  "parent": "minecraft:block/cube_all",
  "textures": {
    "all": "anomaly:block/pearlstone"
  }
}

And this textures structure:

- textures
   - block
      - pearlstone.png
   - item
      - pearlstone.png
   - effect
      - pearlstone.png
   - special
      - pearlstone.png

I want to use texture path "all": "anomaly:effect/pearlstone" or "all": "anomaly:special/pearlstone" inside pearlstone.json model file, but this block shows as missing texture in game.
If I change texture path to "all": "anomaly:item/pearlstone" this block shows as expected.

  • I noticed vanilla has effect folder by default and tried to put textures here but it didn't work.

Same problem occurs with custom models. I can place model file wherever I want and load it using Identifier (for example resources/models/special/laser_beam.json, but it still unable to use textures outside block/item folders)

Is this intended behavior and if so, where do I place textures for custom models that aren't associated with blocks or items?

edgy elbow
#

you have to add directories to the atlas for the textures inside to be usable, to do this you can simply put an atlas definition at assets/minecraft/atlases/blocks.json with the contents

{
  "sources": [
    {
      "type": "directory",
      "source": "effect",
      "prefix": "effect/"
    }
  ]
}

this will apply to all namespaces

#

the wiki has documentation on these files https://minecraft.wiki/w/Atlas

also if youre using a custom atlas then youd put this at assets/<namespace>/atlases/<your atlas name>.json. if you dont know if you are using a custom one, then you most likely arent

#

by default, vanilla only adds the block, item, and entity/conduit directories to the blocks atlas (as well as some individual files) which is why you are getting a missing texture