#Help with having my custom model appear in game (no black/purple texture either)

65 messages · Page 1 of 1 (latest)

pliant night
#

Hello!, so I decided to make another model and have it be a plushie this time and have it be something that you can wear on your head however, I followed a tutorial that this server recommended to those who want to start out and they were using the 1.18 version and im using the 1.20.1 version and so it didn't work and it just shows up as a normal carved pumpkin. Ill send the resource pack below so that hopefully yall find the mistake(s)

open nexusBOT
#
Welcome to the help forum!

Please make sure to read #1029373817119838218 as it may answer your question!

Once your question has been resolved, please mark the post as closed by using the </close:1163944441741049897> command.

pliant night
#

Also, I saved the textures after I was done painting my model which couldve been why but I don't see why it would've.

#

And I also did save everything directly into my folders as I do know that you can't just save it to downloads

charred echo
#

It's because your file is carved_pumpkin**.json.json**

#

Also, you can replace everything above the overrides section with just "parent": block/carved_pumpkin",

And one thing the tutorial didn't mention is this change that happened in 1.19.3 related to textures:

#

!faq 1.19.3-textures

open nexusBOT
# charred echo !faq 1.19.3-textures
FAQ
Java: 1.19.3 Textures

General Information:
The game creates a "texture atlas" (combination of all textures into one file) for block/item models.
For performance reasons as of Java 1.19.3 the game by default only loads textures from within textures/item and textures/block (and any folders within those two folders) into that atlas instead of reading through every model for the relevant textures.

_________________________

Making the game load from custom directories
If you want the game to add textures from other directories (that are still somewhere within the "textures" folder) to that atlas you will need to create a blocks.json file in YourPack/assets/minecraft/atlases:

Example blocks.json

{
    "sources": [
        {
            "type": "directory",
            "source": "custom",
            "prefix": "custom/"
        }
    ]
}```
This example would make the game add _all_ textures that are within `textures/custom` to the atlas. This **even** applies to images that are not used by your models, so keep your pack clean for better performance and smaller size!.

**_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_**

**Additional/more specific information**:
If you have several custom directories you can add several json objects in the "sources" list/array.
blocks.json's of different packs combine btw, so you don't need to worry that one pack will stop another pack from loading their textures.

Here is also an example pack from a Minecraft dev (boq) with some more specific examples (like only using the face part of the default pig texture instead of loading all entity textures or the whole pig texture): <https://cdn.discordapp.com/attachments/593812273164976166/1042452631743901756/sprites.zip>

The official blog post with the changes (you will have to scroll down quite a bit for the relevant information): <https://www.minecraft.net/en-us/article/minecraft-snapshot-22w46a>
pliant night
charred echo
#

when giving yourself a carved_pumpkin with a CustomModelData value of 123456

#

cause that's what you specified in your carved_pumpkin.json

pliant night
#

kk

pliant night
charred echo
#

!faq custom_model_data

open nexusBOT
# charred echo !faq custom_model_data
FAQ
Java: Custom Model Data

Disclaimer: This only works for items (not placed blocks!) and only if you are in Java Edition 1.14 or later!

Example

To give, for example, a stick more models you would have something like this in YourResourcePack/assets/minecraft/models/item and call it stick.json.

stick.json

{
    "parent": "item/generated",
    "textures": {
        "layer0": "item/stick"
    },
    "overrides": [
        { "predicate": {"custom_model_data": 1}, "model": "item/custom_stick"},
        { "predicate": {"custom_model_data": 2}, "model": "custom/branch"},
        { "predicate": {"custom_model_data": 3}, "model": "block/stone"}
    ]
}``` 
That would give the stick 3 additional models it could have.

If you use something else than a stick replace the parts before "overrides" with the exact same information the default model has (The one in models/**item**, not the one in models/block!)
If the default model also has override entries put them before your custom ones in the "overrides" section (don't forget commas between entries).
Type `!faq default-pack` if you don't know how to get the default assets.


# But can I do it without editing .json manually?
Well, good for you Blockbench can actually add overrides to model files.
So copy the default model of the item you wanna add models to into your pack, then load it into Blockbench.
In Blockbench go to Tools > Edit Override Predicates.
There you can add overrides and define the custom_model_data predicates you wanna add.
See the _General knowledge/tips_ section further down if you don't know how to set the model path here.
After you are done, save/export the .json model again.

# Ingame use
To get the item with a custom model use: `/give <player> stick[custom_model_data=X]` 
_(`/give <player> stick{CustomModelData:X}` for 1.20.5 and older)_


# General knowledge/tips
- A model path is **always** relative to the "models" folder of your pack.
So `"item/custom_stick"` will load the model in `YourPack/assets/minecraft/models/`**`item`** called **custom_stick**.json;
while `"custom/branch"` will load the model in `YourPack/assets/minecraft/models`**`custom`** called **branch**.json;
and so on.
- The predicates have to be ordered from lowest to highest! This is because Minecraft reads the predicates as "this value or higher" and uses the last entry whose predicate checks are fullfilled.
pliant night
#

I did rename my folder to texture/item too

charred echo
#

did you adjust the texture path in the model after moving the texture/renaming the folder?

#

cause otherwise that will still look for the "custom" folder

pliant night
#

ohhh

#

maybe I didnt, hol on

#

kk soo I don’t have any custom folder in my codings and I tried to switch the textures in my plushies code to “item/texture” but then it changed to just a cube and even when I switched it back to the original, it stayed the same

#

It was originally “block/texture”

pliant night
charred echo
#

Well, that would break it if your model is in models/custom

pliant night
#

ohh no, it was in texture/custom but now its in texture/item and also my plushies and carved pumpkin json files are in my model/item folder

pliant night
charred echo
#

k, then if your model showed up but with the wrong texture all you needed to do was adjust the texture path inside the model
no need to touch the override or anything, only your plushies model defines what texture it uses

pliant night
#

ohhh ok

pliant night
charred echo
#

could you send the current version of your pack?

pliant night
charred echo
#

that only has plushies in it, not carved_pumpkin and 2 textuers in textures/custom

charred echo
#

so why do you have this here now?

#

also, you are missing a ] to close the overrides section (before that last } in line 8)

pliant night
charred echo
#

sticks and pumpkins are not the same

#

sticks are just 1 unit thick models generated from a texture
pumpkins are a block

#

and in here instead of texture you need to have the actual name of the texture you wanna use here

pliant night
#

omg i’m so dumb

charred echo
#

also, if it said block/texture before here then that means you are either using the web version of Blockbench or you never saved the texture before exporting the model btw.

pliant night
#

I saved my textures after painting everything and I saved my model before I think soo I might of just messed it up

pliant night
charred echo
pliant night
#

ohh kk

pliant night
charred echo
#

0 and 1 can't both be "main"

#

one is main, one is background

pliant night
#

ohh

charred echo
#

and particle is whichever texture you wanna use if the item gets eaten or breaks etc.

pliant night
#

kk

pliant night
charred echo
#

you can save the texture at any point
you just gotta save or load the texture at least once before exporting the model for the last time (that way Blockbench can generate the texture path for the model)

pliant night
#

kk tyy

pliant night
charred echo
pliant night
#

mhm