#How do i get the item code
1 messages · Page 1 of 1 (latest)
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.
!faq default pack
Disclaimer: Use these packs as REFERENCE, don't put your models inside them, it just increases your pack needlessly. Also don't put any of the unedited files from it into your own pack. The distribution of default assets in your pack is illegal.
For Java Edition:
Simple Method
Use the Pack Creator utility from the Resource Pack Utilities Blockbench plugin. Make sure to enable the Import vanilla assets option.
Manual Method
(This works the same for all versions, 1.21 is just used as an example here)
Go to .minecraft/versions/1.21 and open the 1.21.jar file with a zip program.
Alternativley you can copy the .jar file and change the file extension to .zip, then double click it.
Extract/copy the "assets" folder from inside the jar. This folder contains all the default models and textures.
For Bedrock Edition:
Go to the bedrock resource pack documentation and scroll to "Building the Resource Pack". The download for the vanilla resource pack can be found right above that title. You can also use this Direct download link.
I dont get how this helps me
did you by chance come from this video
https://www.youtube.com/watch?v=Cw8PPPEl_IQ&t=710s
A huge thank you to Violet for teaching me all of this: https://twitter.com/violxiv
A stream where I make hats: https://www.youtube.com/watch?v=PfHN7cO87sc
Minecraft commands, particularly around NBT values have changed from 1.20.5 so I've updated them below for those who need it :)
00:00 - Intro
00:50 - Creating your model
06:49 - Texturing ...
I remember this because the part about the pumpkin is just wrong
but im trying to make a sword
what should i do?
do you want to make a custom sword model or just retexture
custom sword model
ok do you have anything so far
yes i already made a sword and followed most of the video
ok is it saved as a json file named one of the default sword names like diamond_sword
it says model.json
ok cool
do you want this model to:
replace an existing sword completely?
or
only change to use your model when you rename it?
and if you want the 2nd option are you using it for a Minecraft version 1.21.5 or newer
ok gotcha
which sword do you want to change when you rename it
like golden, diamond, netherite
you can choose more than one
then diamond
alrighty gimme a sec
"model": {
"type": "minecraft:condition",
"property": "minecraft:has_component",
"component": "minecraft:custom_name",
"on_true": {
"type": "minecraft:select",
"property": "minecraft:component",
"component": "minecraft:custom_name",
"cases": [
{
"when": {
"text": "Example Name"
},
"model": {
"type": "minecraft:model",
"model": "item/example_model"
}
}
],
"fallback": {
"type": "minecraft:model",
"model": "item/diamond_sword"
}
},
"on_false": {
"type": "minecraft:model",
"model": "item/diamond_sword"
}
}
}```
This will be the contents of a file "diamond_sword.json" that goes in assets/minecraft/items
not assets/minecraft/models/item, the two are often confused
and of course change the "Example Name" to whatever you'd like
and change the example_model to what you decide for your custom model
the one that is currently just named "model"
I used this site to create the file, it has a handy UI for making these item definitions
https://misode.github.io/assets/item/?share=aq1qpU4CU9
oh one more thing this only works if you are using Minecraft 1.21.5 or newer
if you are using older versions you will need to use the Optifine CIT method
Okay thanks so much i sadly had to leave so i can’t see if it works right now but i’ll check latter do you need me to close this?
nah leave it open until your issue is fixed
okay thanks
ok if you have questions when you come back feel free to ping me
There is no need to check if it has a custom_name component first.
Just directly test for the name.
You make one in any image editor of your choice (which can be Blockbench)
wait fr? I gotta reformat my own pack files then
yeah, the way you have it (and is in the most viewed tutorial about this too unfortunately) it's an unecessary extra check.
It's like
if (custom_name) {
if (custom_name == 'Test') doStuff();
}```
at which point you can just skip the first check (since there ofc is no worry about having to check for null to prevent errors etc.)
ok good to know 👍
It makes sense but I guess I made the assumption that you had to do the kinda "existing" check before checking the value
yeah, fortunately not necessary in resource pack files 😅
im not o sure what i did wrong maybe its the command but its not summoning the item
the command i did was /give @s minecraftdiamond_sword{Curved_Blade}
yeah, that's not how you give an item a custom name
/give @s diamond_sword[custom_name="Curved_Blade"]
js like that or do i need to change the custom_name part
dose it matter if the resource pack is in compactable
no
Just like that.
You can ofc adjust the actual name if required
i tryed 3 more times and still nothing is there something wrong with my code
{
"model": {
"type": "minecraft:condition",
"property": "minecraft:has_component",
"component": "minecraft:custom_name",
"on_true": {
"type": "minecraft:select",
"property": "minecraft:component",
"component": "minecraft:custom_name",
"cases": [
{
"when": {
"text": "Curved Bladefor"
},
"model": {
"type": "minecraft:model",
"model": "item/curved_sword"
}
}
],
"fallback": {
"type": "minecraft:model",
"model": "item/diamond_sword"
}
},
"on_false": {
"type": "minecraft:model",
"model": "item/diamond_sword"
}
}
}
what's the command you are trying to use?
and is that file called diamond_sword.json in assets/minecraft/items ?
no its called curved sword and im try to use the command in this video to sommon the item
here the text says "Curved Bladefor"
But I am assuming your command just has "Curved Blade"
those two should match so change one or the other so they are the same
still nothing
/give @s diamond_sword[custom_name="Curved_Blade"]
that was the command
You don't have an underscore in your item definition file value so you need to not have an underscore in your command eirher
(For the name)
sill noting idk may its the texture that is worng
wait did you mean to reply to dragonmaster here and say that your file is not called "diamond_sword" but called "curved_sword" instead?
That would explain why the command is not working
as in the txt is not called diamond_sword
well it should also be a json file not a txt file
in this case you can indeed just change the file extension from txt to json and it will work
for most files you can't just switch formats like that but for this you can
its not giving me a option to change it from a notepad txt to a .json
idk i feel like nither one of us know what the other means
do you have file extensions enabled in File Explorer?
i dont no
on Windows you should be able to find it like this
i do have it enabled and my custom item is named diamond_sword.json but still nothing
is there any way we could vc and i share my screan or somthing cuz im still lost
sure I can do that
my DMs are open if you want to call me there