#Texture Pack with custom items

72 messages · Page 1 of 1 (latest)

odd schooner
#

so im in a server and wanting to make a texture pack for custom items with commands we did a /give command and was wondering if anyone knew how to make a texture pack so it would only go onto that one item

plain geyserBOT
#
Welcome to the help forum!

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.

mild rain
#

custom model data

odd schooner
#

/give @a diamond_sword[custom_name='["",{"text":"Gingerbread Sword","italic":false}]',item_name=Gingerbread_Sword] like this

#

are you able to make it a differnet texture

#

without mods

mild rain
#

yes through custom model data

odd schooner
#

are you able to vc to explain it

rain tree
#

well, with the newer versions you don't even need custom_model_data

#

you can just directly reference the model in the command

mild rain
#

i have no idea how 1.21.4 packs work at all

odd schooner
rain tree
#

no

odd schooner
rain tree
#

/give @a diamond_sword[custom_name='["",{"text":"Gingerbread Sword","italic":false}]',item_name=Gingerbread_Sword,item_model=your_model]
Would give that diamond_sword the model that is in assets/minecraft/models/item/your_model.json

#

though idk why you have custom_name and item_name components in that command 🤔

#

Discord, I meant to reply to that, not delete it

odd schooner
#

lol

rain tree
#

anyways, the command is the same on a server

odd schooner
#

what about the texture pack

rain tree
#

(unless you have plugins on the server that screw default commands)

#

you just put the model where I just mentioned

odd schooner
rain tree
#

you mean /minecraft:give ?

odd schooner
#

so would we need the texture pack

odd schooner
rain tree
#

unless you reference a default model with the item_model component you will need a resource pack, yes

odd schooner
#

how do we go about with making one

rain tree
#

same way as any other model

odd schooner
#

i just use blockbench for dun so i dont know much

rain tree
#

!faq export-vanilla-java-model

plain geyserBOT
# rain tree !faq export-vanilla-java-model
FAQ
Java: Export Vanilla Models

IMPORTANT:
-Any missing folders need to be created if they aren't there yet!
-Do the steps in this exact order!

Step 0: Setup
**-In Blockbench: **
Use the Java Block/Item format. (Check at File > Project... in Blockbench).
If it's not convert it via File > Convert Project. ATTENTION: This can break the model due to format specific restrictions! (see !faq java-rotation and !faq java-sizelimit)

-Setting up your pack:
Create a folder inside Minecraft's resource pack folder (aka "YourPack" for the rest of this guide). It is usually at C:\Users\INSERT_YOUR_PC_USER_HERE\AppData\Roaming\.minecraft\resourcepacks. Put this file https://cdn.discordapp.com/attachments/883449189533638777/899224109869846558/pack.mcmeta in YourPack.
Optionally: Edit it in a text editor and adjust the value of "pack_format" (see https://minecraft.fandom.com/wiki/Pack_format). This only affects whether your pack is shown as "outdated" ingame or not.

Step 1: Saving Textures
Save all your textures first.
To do that either:
-Ctrl+S, or
-click 💾 next to the texture(s), or
-rightclick the texture(s) and click "Save As"
Save them directly within YourPack/assets/minecraft/textures/block/... or /item/....
Reason: If you don't do that or move/rename the files later your model won't find the textures anymore.
(For custom subfolders check !faq java-1.19.3-textures)

Don't use capital letters nor spaces in file/folder names. The model will be invalid ingame!.

Step 2: Exporting the Model
After saving the textures use File > Export > Block/Item export it to YourPack/assets/minecraft/models/item (or /block, but only for placed down blocks.).
Name the file based on the id of the thing you wanna replace (totem_of_undying for a Totem of Undying for example). Check the default pack if you are not sure what the exact name is (see !faq default-pack for more information)

rain tree
#

(in this case the model has to be within models/item specificially)

odd schooner
#

!faq defult-pack

plain geyserBOT
# odd schooner !faq defult-pack
FAQ
Minecraft: 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.

odd schooner
rain tree
#

what part do you get stuck on?

odd schooner
#

how to first set up to pack

odd schooner
rain tree
odd schooner
rain tree
#

you can either use that Resource Pack Utilities (Blockbench) plugin to create an empty pack.
Or you just create a folder in the "resourcepacks" folder. Its name will be the name of your pack. In the first bot message it's referenced as "YourPack". The other folders are mentioned in the points afterwards

odd schooner
odd schooner
rain tree
#

Assuming you saved the texture(s) and model (and are using the downloaded version of Blockbench) that's it.

odd schooner
#

what about renaming how does that work

#

like renaming the file

#

like its replacing the leather chestplate but its a custom version

rain tree
#

you cannot replace the model of armor

#

only the model of the item, not the armor rendering on your player

odd schooner
#

how would we be able to do that without mods (if possible)

#

atleast ik how to do the otems tho

odd schooner
#

minecraft:give Pikachu190 wooden_sword[custom_name='["",{"text":"Gingerbread Sword","italic":false,"color":"#663300","underlined":true,"bold":true}]',lore=['["",{"text":"Forged from the finest confectionery and cooled by the breath of winter’s chill.","italic":false}]'],enchantments={levels:{mending:1,sharpness:5,unbreaking:5}}] 1

#

how would i go about adding a texture to that??

#

since i cant do armor

#

like what do i rename the file to

rain tree
odd schooner
#

isnt that 1.21.2 or older

rain tree
#

1.21.2 and newer, yes

odd schooner
#

oki

#

imma have to talk to the owner to see if we can go to that rn were ar 1.21.1

rain tree
#

ah

#

!faq custom_model_data

plain geyserBOT
# rain tree !faq custom_model_data
FAQ
Java: 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, for example, a stick more models you would have something like this 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"}
    ]
}``` 
That would give the stick 3 additional models it could have.

If you use something else than a stick replace the parts before "overrides" with the exact same information the default model has (The one in models/**item**, not the one in models/block!)
If the default model also has override entries put them before your custom ones in the "overrides" section (don't forget commas between entries).
Type `!faq default-pack` if you don't know how to get the default assets.


# But can I do it without editing .json manually?
Well, good for you Blockbench can actually add overrides to model files.
So copy the default model of the item you wanna add models to into your pack, then load it into Blockbench.
In Blockbench go to Tools > Edit Override Predicates.
There you can add overrides and define the custom_model_data predicates you wanna add.
See the _General knowledge/tips_ section further down if you don't know how to set the model path here.
After you are done, save/export the .json model again.

# Ingame use
To get the item with a custom model use: `/give <player> stick[custom_model_data=X]` 
_(`/give <player> stick{CustomModelData:X}` for 1.20.5 and older)_


# General knowledge/tips
- A 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;
while `"custom/branch"` will load the model in `YourPack/assets/minecraft/models`**`custom`** called **branch**.json;
and so on.
- The predicates have to be ordered from lowest to highest! This is because Minecraft reads the predicates as "this value or higher" and uses the last entry whose predicate checks are fullfilled.
rain tree
#

that would be what you need to for custom_model_data instead

odd schooner
woven inlet
mild rain
odd schooner
#

i just wanted to mess around with it too