#how to make the same item have 2 different textures

1 messages · Page 1 of 1 (latest)

velvet quartz
#

I wanna make an item have 2 different textures using the custom model data I was following a tutorial on how to do this and it just didnt work

raven wagonBOT
#

<@&1201956957406109788>

Someone will come and help soon!

💬 While you wait, take this time to provide more context and details.

✅ Once your question has been resolved (or you no longer need it), please click Resolve Question or run /resolve

raven wagonBOT
# raven wagon <@&1201956957406109788>

<@&1166082198152159386> <@&1202694677766348840>

🙇 Helpers Arise!

Please note that you still might not immediately get a response since all helpers are human beings and volunteers (and also might be sleeping right now)

shadow ibex
#

What version are you on?

velvet quartz
#

1.20.1 the tutorial I watched said it worked from 1.19.3 ultill 1.20.4

shadow ibex
#

Okay, should be fairly simple then. Could you send over the resource pack so I can look through the file structure?

velvet quartz
shadow ibex
#

Well, the zip file you sent me contains a folder

#

assets, pack.mcmeta, and pack.png should be at the root of the zip file

velvet quartz
#

I tried to send a folder but it didnt worked so I ziped it

#

holdon

shadow ibex
#

ah, got it

velvet quartz
#

I can just send you screenshots of everything

shadow ibex
#

so you are testing with the folder directly in the resourcepacks directory?

shadow ibex
#

I have to go, but I should be back in 10-20 minutes

#

in the meantime someone else may help you, if not I will be back

velvet quartz
#

no I have the folder om my desktop

shadow ibex
#

I have returned much earlier than I anticipated

#

I found the issue

#

In /assets/excalibur/models/item/ you have the file named excalibur.json

#

What you want to do is add data to netherite_sword.json, not create a new file

#

it should work if you rename excalibur.json to netherite_sword.json

velvet quartz
#

ohh

#

I will try that give me a second

shadow ibex
#

oh

#

also

#

you are pointing to a nonexistant model

#

see json { "predicate": { "custom_model_data": 1}, "model": "excalibur/excalibur"}

#

what this line does is check if custom_model_data is 1, and if it is, use the specified model, rather than this one

#

bear in mind you are specifying a model, not a texture

#

models tell minecraft how to display the textures you give it

velvet quartz
#

oh

shadow ibex
#

netherite_sword.json is a model

velvet quartz
#

um

#

yea

#

right

shadow ibex
#

first of all, change "model": "excalibur/excalibur to "model": "excalibur:item/excalibur.

#

before the colon is your resource pack's namespace

#

after is the path, from the models directory

#

so you would make a file named excalibur.json in the models/item directory

velvet quartz
#

alright

shadow ibex
#

the syntax of this file isn't important for now, you can just copy and paste this in: json { "parent": "minecraft:item/handheld", "textures": { "layer0": "excalibur:item/excalibur" } }

velvet quartz
#

okay I did it

#

it still doesnt work

shadow ibex
#

Okay

#

I'm done and I've got things working, time to explain

#
  1. netherite_sword.json needs to be located under the minecraft namespace, as you are modifying the minecraft pack
  2. in 1.19.4 mojang added atlas files for locating textures, so you can add them to custom directories. Tradeoff: you need an atlas file
#

so you need to make a directory in the minecraft folder called models, make a directory in there, called item, and move netherite_sword.json there.

#

then, make a directory in minecraft called atlases, and make a file called blocks.json. Add these contents: ```json
{
"sources": [
{
"type": "directory",
"source": "item",
"prefix": "item/"
}
]
}

#

When you're done, you should end up with something like this (I changed the pack format to reflect the correct version, and removed the sound, as it was unrelated.)

#

(bear in mind, the words "folder," and "directory," are interchangeable)

velvet quartz
#

it works!!

#

thank you so much

velvet quartz
#

one thing tho

#

it doesnt really work with animated textures

#

nevermind

raven wagonBOT
# velvet quartz it works!!
🎗️ Is your question resolved?

If your question is resolved, that's great to hear! Make sure to run /resolve or click the Resolve Question button. Otherwise, feel free to continue asking for help! :D

velvet quartz
#

one more thing

#

is there any way I can make that item with the custom model data have a custom name description or like generally make it deal more damage change the cooldown etc?

high hawk
#

You can for sure change the name, lore, and damage, yes. You do this by giving it custom NBT in your give command or loot table.

Unfortunately documentation on doing that may be a bit slim. 1.20.5 overhauled the item data system, and it's been a while since I've worked with the old system, so don't remember well enough to exactly show you how to do it, but it should be something like {display:{CustomName:"{\"text\":\"Whatever\"}"}} for the name