#I need help with fixing this code

1 messages · Page 1 of 1 (latest)

mental basin
#

all it really does it makes it so if an item has a custom model data 745001 then it changes the texture

cyan sparrowBOT
#

<@&1201956957406109788>

Someone will come and help soon!

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

                        🙇 After a while, hit the Summon Helpers button to ping the helper team. They'll be happy to help you


                        
                        ✅ Once your question has been resolved (or you no longer need it), please click Resolve Question or run /resolve
mental basin
#
{
  "parent": "minecraft:item/generated",
  "textures": {
    "layer0": "minecraft:item/sentry_armor_trim_smithing_template"
  },
  "overrides": [
    {
      "predicate": {
        "custom_model_data": 745001
      },
      "model": "item/money"
    }
  ]
} 
steady sparrow
#

What’s it doing instead of working?

mental basin
#

well its not really changing it

cyan sparrowBOT
# cyan sparrow <@&1201956957406109788>

<@&935561184806060073> <@&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)

sinful imp
#

The model file is in the Minecraft namespace?

mental basin
sinful imp
#

Where is your item/money JSON file in your resource pack? What filepath?

#

Because of you don't define a namespace, it will assume the minecraft namespace

mental basin
#

its in my resource pack for the datapack

sinful imp
#

Filepath please

#

Not like the whole filepath, but starting from assets

mental basin
#

assets/minecraft/textures/items/money.png

steady sparrow
#

The filepath for the model?

#

Or do you not have a model?

sinful imp
#

Ok, so that is just a texture file. Even if you're just using a flat texture, you also need a model file in minecraft/models/item

mental basin
#

no i dont?

#

i did it with the compass

sinful imp
#

And that is what the custom_model_data is looking for. That file will point to the texture

mental basin
#

and it worked

#

i just changed the item and it stopped

sinful imp
#

Ok then I guess I'm wrong

#

Good luck

mental basin
#

ok bye

mental basin
#

im just changing the flat texture

sinful imp
#

I just don't know how to help if my suggestion is incorrect, because that's what I always do for custom textures and it works.

steady sparrow
#

Same

mental basin
#

well its a item

#

im only changing the item

#

not the armour it comes with

sinful imp
#

Not relevant

#

Generally, you still need a model file

#

I know it's confusing, there's a lot of misnomers in Minecraft

mental basin
#

but i did it with a carrot on a stick before and it worked

sinful imp
#

But that's why it's called custom_model_data

mental basin
#

so whats up with that

sinful imp
#

Ok, then do that again I guess

#

Because I don't understand how that could be, so you must know something I don't

mental basin
#

im genually asking whats up with that i did it with carrot on a stick

sinful imp
#

I don't know

#

I've informed you of the method I'm familiar with

#

If there's another method, I'm not familiar

mental basin
#

ive done that again

#

its not working

#

and im asking why isnt this working

sinful imp
#

And I've told you my understanding of why it's not

sick elbow
#

what’s the problem?

mental basin
#

look in chat

sick elbow
#

yeah it just looks like arguing to me lol

mental basin
#

have you looked at the very top

sick elbow
#

wdym by not working

mental basin
#

like its not changing the texture its not even giving me a black and purple cube just the normal texture

sick elbow
#

where’s that file saved?

mental basin
#

the .json or the texture

sick elbow
#

this json

#

you should have two json

#

item/money should point to a json too

sinful imp
#

They disagree

mental basin
#

i do have two jsons

mental basin
#

up

sick elbow
#

you need the file assets/minecraft/models/item/money.json

sick elbow
#

cut that out

#

we’re trying to help you, don’t tell our helpers to shut up

mental basin
#

i have models/items

#

i followed tutorial and it said to do that

sick elbow
mental basin
#

oh its resourcepack/assets/models/items/money.json

sick elbow
#

it should be in assets/minecraft/models, for a start

#

and it should be models/item

mental basin
#

i meant that

sick elbow
#

you should have two json files and one png file:

  • the JSON file which overrides the vanilla item model (such as assets/minecraft/models/item/flint.json)
  • the JSON file which is the custom sprite model (assets/minecraft/models/item/money.json)
  • the texture png
mental basin
#

one sec

#

ill show both

#

money.json:

  "parent": "minecraft:item/generated",
  "textures": {
    "layer0": "item/money"
  }
}```
#

sentry_armour_trim_smithing_template.json:

  "parent": "minecraft:item/generated",
  "textures": {
    "layer0": "minecraft:item/sentry_armor_trim_smithing_template"
  },
  "overrides": [
    {
      "predicate": {
        "custom_model_data": 745001
      },
      "model": "models/money"
    }
  ]
}```
sick elbow
mental basin
#

i changed it so its in models

#

bc u said to move it into models or thats what i understood

sick elbow
#

so it’s in models/models/money.json

mental basin
#

no

sick elbow
mental basin
#

" or thats what i understood"

sick elbow
#

It needs to be in models**/item/**money.json

#

You can have it in another folder if you want but this is much easier for you

mental basin
#

ok done

mental basin
#

done

#

its still displaying the same texture

sick elbow
#

also the filename should be armor and not armour bcuz it uses American English

mental basin
#

ok im dumb

#

i will admit that

#

and look that it worked

#

it was because of stupidity

#

right at 100 texts to

#

half of it was aruging

sick elbow
#

maybe if ur nicer and more cooperative with the helpers (who are volunteers and don’t have to answer your questions) and treat them like real people you’d get help more quickly

mental basin
#

i waited like 6 hours before i started arguing

#

can you blame me for being a little upset

#

no that doesnt really justify my actions

sick elbow
#

you pressed the summon helpers button two hours after you posted it, someone replied instantly, then you took another 2 hours before answering

mental basin
#

ok i do admit that i was slow on the answering

#

so even if you take out the 2hrs

#

its 4hrs

sick elbow
#

still only two hours, and that’s because it took you two hours before you pressed the button

mental basin
sinful imp
#

If I don't know how to help you then I will say so

#

That's not attitude

#

Especially when the thing I was asking if you had, you did have and kept saying you didn't need it

mental basin
#

i come from a sarcastic family so i thought that was sarcasim

sinful imp
#

Ok well do you see how that is your problem and not mine?

mental basin
#

yes

sinful imp
#

Troubleshooting is a collaborative endeavor

mental basin
#

i can see how that was my bad

#

for taking it wrong

mental basin
#

and also my fault

#

as well

sick elbow
#

drop it now

sinful imp
#

Yeah, it's really not important

sick elbow
#

if you’ve fixed it, run /resolve

mental basin
#

k

#

thx for the help sorry for being rude