#where do i put the
215 messages · Page 1 of 1 (latest)
no, like to make my model work. theres like code and where i put the custom model data number.
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
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.*
(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)
where do i put it?
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.
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)
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"}
]
}
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
well, there is nothing to "find"
you just make a file called stick.json and put that in there
oh
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)
k
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)
if you want your models to be on a stick, yes
any text editor of your choice
winraw
Winrar ain't a text editor
Notepad
it should already suggest text editors (and other stuff) when you rightclick it and click "Open With"
click on "More Apps ↓"
Notepad is preinstalled on all Windows devices, so at least that should be there
what should what be called?
the app
Notepad
my one is called "Notepad++ for raylib
Notepad++ is a different program (basically a better version)
oh
and yes, use that one
as in when you open Notepad++ your brother's files are already open in there?
it shows his project
In Notepad++?
ye it showsit
ignore them
when i open it
just open your file and ignore the other tabs
either Rightclick > Open With
or you just drag and drop the file into Notepad++
why did you rename your custom model to stick.json 🤔 ?
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.
ye
then you can't name it stick.json
ok
cause this is already what will be in stick.json
and your custom model is a separate file you reference via those predicate liens
so i put that in the notepad?
this?
you forgot to copy a { at the very beginning
not the prettiest, but since whitespace (spaces, newlines etc.) don't matter it should work
then what do i do?
well, you still gotta change custom_stick to burger
well, unless you made a texture called "steak" there aint an item texture that exists in the default pack
yes
yes, now save the file and call it cooked_beef.json and put it with the others
mkay
actually, one thing
cooked_beef.json for name?
set that to "all types", then use cooked_beef.json as name, yes
wdym "all types"?
look at the top of that list
correct name?
yes
where is "All types"?
doesn't matter, it seems like it doesn't enforce the type when saving anyways
like any other file?
how do i drag it?
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 🤔 ?
when i drag it like this, the folder minimizes.
you don't drag that
oh...
is this your first time using a PC?
oh
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
k
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
why are we looking at your Roaming folder now?
do i drag it into here?
yes
so is this right?
looks correct
then do i load up the texture pack?
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)
yes
though depending on where you put your burger's texture it might or might not look correct
ok
(which is separate from that whole custom_model_data part though)
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 🤔
wait
?
but, i changed it
what happened to this?
whats what i ttyped
k, open the cooked_beef.json (from your pack!, not from the other place!), in Notepad++ (drag and drop it in)
change custom_stick to burger
then Ctrl+S
wait
no
that's the wrong file
I said from your pack
k, I kinda expected that (but it's progress)
did you use the web version of Blockbench or the installed version?
installed
k, then you seem to not have saved the texture before exporting the model
oh
do i delete 'burger.json' and remake model?
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)
one issue: the thing got deleted when blockbench updated
Blockbench doesn't delete files
unless you literally saved your files inside the Blockbench program files
yes, cause the texture is referenced wrong in your model, so Blockbench can't automatically find it
oh
no
-open burger.json in Blockbench, rigthclick the missing texture and click "Change File" and load the texture (directly from the resource pack)
oh
that
do that, nothing else
just cause you made a mistake doesn't mean your whole work needs to be redone completely
just drag your burger.json in there like you did for notepad++
rightclick that > "Change File" > load the texture from your resource pack
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
!close