#where do i put the

215 messages · Page 1 of 1 (latest)

lilac fog
#

Do you wanna add another model to an item as a (controlled) variant of that item or do you wanna completely replace the model of an item?

rose edge
#

no, like to make my model work. theres like code and where i put the custom model data number.

lilac fog
#

I just wanna make sure you actually wanna use custom_model_data and not just replace the whole item model.

#

if you want to use custom_model_data to give, for example, a stick a different model if you give yourself a stick with that CustomModelData value you'd do something like this:

#

!faq custom_model_data

heavy oracleBOT
# lilac fog !faq 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 a stick 4 new models:
You'd place this file 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"},
        { "predicate": {"custom_model_data": 4}, "model": "item/more_sticks"}
    ]
}```
Ingame you can give yourself one of the custom sticks by doing `/give <player> stick{CustomModelData:X}` (X being replaced by the number you want)

*PS: The 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.*
*For `"custom/branch"` it would be the model in `YourPack/assets/minecraft/models/custom` called branch.json and so on.*
lilac fog
#

(IF you just want to remodel all sticks then you name your actual custom model model stick.json instead of putting that code up there into stick.json)

rose edge
#

where do i put it?

lilac fog
#

well, first of all, don't use capital letters in file/folder names (nor spaces, just fyi)
That makes the file completely invalid for a vanilla client.

rose edge
#

oh

lilac fog
#

Second of all that position is fine.
Your pack doesn't need to be a .zip file btw. (common misconception).
It can be just a folder, which even allows you to edit the pack while you are ingame (and then use F3+T ingame to reload the pack)

rose edge
#

no wait

#

where do i put {
"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"},
{ "predicate": {"custom_model_data": 4}, "model": "item/more_sticks"}
]
}

lilac fog
#

in the .json of the item you want to give those models

#

so if you wanna do that for a stick you'd put that in stick.json

rose edge
#

OH

#

so i find the stick model

#

and put it in there>

#

there?*

lilac fog
#

well, there is nothing to "find"
you just make a file called stick.json and put that in there

rose edge
#

oh

lilac fog
#

that example is already the default model of the stick + some example custom_model_data predicates

#

basically like that

#

the red part you'd basically check in the default pack.
the green part is up to your model names and locations (and how many variants you need)

rose edge
#

k

lilac fog
#

if you add/remove predicate lines just make sure there is a comma at the end of each line except for the last line (else the game expects another predicate line, doesn't get one and invalidates the whole file)

rose edge
#

so this?

#

how do i open the file?

lilac fog
lilac fog
rose edge
#

winraw

lilac fog
#

Winrar ain't a text editor

rose edge
#

oh

#

what is

lilac fog
#

Notepad

rose edge
#

Ohhhhhhhhhhh

#

so i open it

#

and then what?

lilac fog
#

it should already suggest text editors (and other stuff) when you rightclick it and click "Open With"

rose edge
#

hm?

#

oh

lilac fog
#

Notepad is preinstalled on all Windows devices, so at least that should be there

rose edge
#

oh

#

what should it be called?

lilac fog
#

what should what be called?

rose edge
#

the app

lilac fog
#

Notepad

rose edge
#

my one is called "Notepad++ for raylib

lilac fog
#

Notepad++ is a different program (basically a better version)

rose edge
#

oh

lilac fog
#

and yes, use that one

rose edge
#

but my brother already has smth on it

#

how do i create diff thing

lilac fog
rose edge
#

it shows his project

lilac fog
#

In Notepad++?

rose edge
#

ye it showsit

lilac fog
#

ignore them

rose edge
#

when i open it

lilac fog
#

just open your file and ignore the other tabs

rose edge
#

how open my file?

lilac fog
#

either Rightclick > Open With
or you just drag and drop the file into Notepad++

rose edge
lilac fog
#

why did you rename your custom model to stick.json 🤔 ?

rose edge
#

cuz u said no capitals

#

so i just renamed it to stick.json

#

why

lilac fog
#

no, I meant why is your custom model the stick.json?
You just said earlier you want to use custom_model_data to put your custom model as a variant model of the stick item.

rose edge
#

ye

lilac fog
#

then you can't name it stick.json

rose edge
#

ok

lilac fog
rose edge
rose edge
lilac fog
#

you forgot to copy a { at the very beginning

rose edge
#

oh

#

how bout dis?

lilac fog
#

not the prettiest, but since whitespace (spaces, newlines etc.) don't matter it should work

rose edge
#

then what do i do?

lilac fog
#

well, you still gotta change custom_stick to burger

rose edge
#

oh yeah

#

final?

lilac fog
#

well, unless you made a texture called "steak" there aint an item texture that exists in the default pack

rose edge
#

i thought thats the item

#

also steak needs to be "cooked_beef"

lilac fog
#

yes

rose edge
#

this good?

lilac fog
#

yes, now save the file and call it cooked_beef.json and put it with the others

rose edge
#

mkay

lilac fog
#

actually, one thing

rose edge
#

cooked_beef.json for name?

lilac fog
#

set that to "all types", then use cooked_beef.json as name, yes

rose edge
#

wdym "all types"?

lilac fog
#

look at the top of that list

rose edge
#

correct name?

lilac fog
#

yes

rose edge
#

where is "All types"?

lilac fog
#

doesn't matter, it seems like it doesn't enforce the type when saving anyways

rose edge
#

ok

#

so how do i move it with the rest?

lilac fog
#

like any other file?

rose edge
#

how do i drag it?

lilac fog
#

you just put the file where the others are

#

Do I really need to explain to you how to move a file from one folder to another 🤔 ?

rose edge
#

when i drag it like this, the folder minimizes.

lilac fog
#

you don't drag that

rose edge
#

oh...

lilac fog
#

is this your first time using a PC?

rose edge
#

no

#

but i dont do stuff like this alot

lilac fog
#

you saved that file somewhere

#

now you go there

rose edge
#

Oh

lilac fog
#

not like that

#

in your file explorer

#

nothing with Notepad++

rose edge
#

oh

lilac fog
#

this is a completely normal file

#

this isn't any different from dragging some game icon around on the Desktop (idea wise)

#

just that you move a file from one folder to another

rose edge
#

k

lilac fog
# rose edge

have two file explorers open
one like in this screenshot, and the other where you just saved that file
then you drag it from one explorer to the other

rose edge
lilac fog
#

why are we looking at your Roaming folder now?

rose edge
#

do i drag it into here?

lilac fog
#

yes

rose edge
#

so is this right?

lilac fog
#

looks correct

rose edge
#

then do i load up the texture pack?

lilac fog
#

you go into Minecraft, make sure the pack is equipped then use F3+T (ingame) to reload the pack
(or, if the pack isn't equipped yet you equip it)

rose edge
#

Ok

#

then do i do /give @s cooked_beef{CustomModelData:1}?

lilac fog
#

yes

#

though depending on where you put your burger's texture it might or might not look correct

rose edge
#

ok

lilac fog
#

(which is separate from that whole custom_model_data part though)

rose edge
#

uh oh

#

what do i do here?

lilac fog
#

huh, so unless your burger is supposed to be a block (ignoring the wrong texture) I'm not quiet sure what it doesn't like 🤔

rose edge
#

it aint a block

#

ill just create another model for it

lilac fog
#

wait

rose edge
#

?

lilac fog
#

why is this all about sticks again?

#

(in your last screenshot)

rose edge
#

but, i changed it

lilac fog
#

what happened to this?

rose edge
#

whats what i ttyped

lilac fog
#

k, open the cooked_beef.json (from your pack!, not from the other place!), in Notepad++ (drag and drop it in)

rose edge
lilac fog
#

change custom_stick to burger

#

then Ctrl+S

#

wait

#

no

#

that's the wrong file

#

I said from your pack

rose edge
#

Oh

#

i drag that into notepad?

#

oh

#

i forgot

lilac fog
#

yes, save it (Ctrl+S)

#

then go to Minecraft and press F3+T ingame

rose edge
#

ok

#

done

#

progress?

#

just no color 😦

lilac fog
#

k, I kinda expected that (but it's progress)

#

did you use the web version of Blockbench or the installed version?

rose edge
#

installed

lilac fog
#

k, then you seem to not have saved the texture before exporting the model

rose edge
rose edge
#

do i delete 'burger.json' and remake model?

lilac fog
#

no

#

so you have 2 options now:
-open the burger.json in Notepad++ and adjust the texture path from "block/texture" to the actual location/name of the file (so for example item/burger or wherever the texture is inside your pack's "textures" folder)
-open burger.json in Blockbench, rigthclick the missing texture and click "Change File" and load the texture (directly from the resource pack)

rose edge
#

one issue: the thing got deleted when blockbench updated

lilac fog
#

Blockbench doesn't delete files

#

unless you literally saved your files inside the Blockbench program files

rose edge
#

but it didnt show

#

ima just create new model?

lilac fog
rose edge
#

oh

lilac fog
#

-open burger.json in Blockbench, rigthclick the missing texture and click "Change File" and load the texture (directly from the resource pack)

rose edge
#

oh

lilac fog
#

that

#

do that, nothing else

#

just cause you made a mistake doesn't mean your whole work needs to be redone completely

rose edge
lilac fog
#

just drag your burger.json in there like you did for notepad++

rose edge
#

Oh ok

#

that is why!

lilac fog
#

rightclick that > "Change File" > load the texture from your resource pack

rose edge
#

oh, i deleted the texture...

#

brb dinner

lilac fog
#

no

#

why is your first instinct "let's throw everything away" if something doesn't work exactly as intended?

#

get the texture back from the trash bin, then do that.
Then save the model again.
That's it.

#

It's already 1:25 AM for me, I'm not gonna help you when you come back from dinner

rose edge
#

mkau

#

mkay*

lilac fog
#

!close