EliteFantasy ResourcePack Guide
  • ResourcePack Guide
    • Introduction
    • Beginning
      • lang
      • sounds
      • texts
      • particles
      • atlases
      • fonts
      • blockstates
      • textures
        • Equipment
        • Entity Textures
      • models
        • Blockbench Models
        • ItemsModels & CustomModelData
          • custommodeldata (old)
          • custommodeldata extras (old)
        • Understanding the system the new item system
      • shaders
  • Components Guide
    • Introduction
      • Components
  • Discord
    • Discord
Powered by GitBook
On this page
  • Step A:
  • Step B:
  1. ResourcePack Guide
  2. Beginning
  3. models
  4. ItemsModels & CustomModelData

custommodeldata (old)

First step: Add your textures

Assuming you already did the basic guide, you can now go to assets/minecraft/textures/custom/item and add your textures. Please note that textures must not exceed 256x256 pixels!

Texture_pack:
  ➞ assets
    ➞ minecraft
       ➞ textures
          ➞ custom
             ➞ wood_stick.png

Second step: adding models

Step A: Using a base model Step B: add your models Next you will see where to add the file of your model, read the options to know what's next

Step A:

If you are using an item that does not use a custom model you can use one from Minecraft, First go to assets/minecraft/models/custom/item and add a file named <item_name>.json

Texture_pack:
  ➞ assets
    ➞ minecraft
       ➞ models
          ➞ custom
             ➞ item
                ➞ wood_stick.json

Then copy this into your json

{
	"credit": "Made with Masaki",
	"parent": "item/handheld",
	"textures": {
		"layer0": "custom/item/wood_stick"
	}
}

Now go to step 3

Step B:

If you are adding an item that uses a custom texture such as a 3D modeled stick, you will have to complete several steps, this guide assumes you are using Blockbench to create your models.

Blockbench makes exporting models very simple just click on File > Export > Export Block/Item Mode And then place it in the correct directory

Third step: Define the CustomModelData

Now that you have the model in your texture pack, you need to configure the CustomModelData of the model.

What is that, the CustomModelData is a type of variation that Minecraft has for all items so you can create new ones and not replace them.

To do that you need to create a model file for your item at assets/minecraft/models/item/<base_item>.json in this case it will be stick.

Texture_pack:
  ➞ assets
    ➞ minecraft
       ➞ models
          ➞ item
             ➞ stick.json
{
   "parent":"item/generated",
   "textures":{
      "layer0":"item/stick"
   },
   "overrides":[
      {
         "predicate":{
            "custom_model_data":1
         },
         "model":"custom/item/wood_stick"
      }
   ]
}

Last step: You're done!

Incredible, we have created our first custom item, now we can get it in the game using the command /give <name> stick{CustomModelData:1}

PreviousItemsModels & CustomModelDataNextcustommodeldata extras (old)

Last updated 3 months ago