Skip to content

Commit f3ea73a

Browse files
committed
change texture, add more explanation
1 parent 25b439c commit f3ea73a

File tree

6 files changed

+36
-10
lines changed

6 files changed

+36
-10
lines changed

CustomModelDataGuidePack/assets/custom_model_data_guide_assets/models/item/purpur_item.json

Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"parent": "minecraft:item/generated",
3+
"textures": {
4+
"layer0": "custom_model_data_guide_assets:item/uno_reverse_texture"
5+
}
6+
}
Binary file not shown.
804 Bytes
Loading

CustomModelDataGuidePack/assets/minecraft/models/item/iron_nugget.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
"layer0": "minecraft:item/iron_nugget"
55
},
66
"overrides": [
7-
{ "predicate": { "custom_model_data": 1 }, "model": "custom_model_data_guide_assets:item/purpur_item" }
7+
{ "predicate": { "custom_model_data": 1 }, "model": "custom_model_data_guide_assets:item/uno_reverse_model" }
88
]
99
}

README.md

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,48 @@ To create a custom model data, you first need to take the original model file an
99
<br>Within this folder, create the initial folders `models`, and `textures`, and an `item` folder within both of those.
1010

1111
## Base Model
12-
Open the original model file you're basing off of (in this demo we're using an iron nugget) and add the following code:
12+
Open the original model file you're basing off of and add the following code:
1313

1414
```json
15+
,
1516
"overrides" : [
16-
{ "predicate": { "custom_model_data": 1 }, "model": "custom_model_data_guide_assets:item/purpur_item" }
17+
{ "predicate": { "custom_model_data": <data number> }, "model": "<namespace>:<path>" }
1718
]
1819
```
20+
<br>For this example, this looks like:
21+
```json
22+
,
23+
"overrides": [
24+
{ "predicate": { "custom_model_data": 1 }, "model": "custom_model_data_guide_assets:item/uno_reverse_model" }
25+
]
26+
```
27+
1928
This code tells the game which model file to look for. The model file should be in the `assets/<declared namespace>/models/<declared path>` folder.
2029
<br>For example, if you have a model in `models -> weapons -> swords -> basic -> iron -> noob_sword.json`, it would look like `"model": "your_namespace:weapons/swords/basic/iron/noob_sword"`.
2130
<br>You should also name your custom model data with a unique prefix number that makes sense to you to avoid conflicts with other custom model data packs.
2231

2332
## New Model
2433
Then, create a model file in the folder you declared in the previous step.
2534
<br>This is the json file that tells the game where to place and render the textures. In this file, you are telling the game which texture file(s) to look for.
26-
<br>The texture file(s) should be in the `assets/<declared namespace>/textures/<declared path>` folder. You can use assets that are already in the game or your own textures.
35+
<br>You can create your own folder for this, and this will likely make it easier to find things if you are making a large pack.
36+
<br>If making your own folder, you will put it under the `assets` directory. For this demonstration I will be creating a directory called `custom_model_data_guide_assets` to put the models and textures into
37+
<br>
38+
<br>This will be the model that you exported from blockbench/another software if you used one - or if you're just using a hand-made texture, you can make your own. I will be making my own for this demonstration - it looks like this:
39+
40+
```json
41+
{
42+
"parent": "minecraft:item/generated",
43+
"textures": {
44+
"layer0": "custom_model_data_guide_assets:item/uno_reverse_texture"
45+
}
46+
}
47+
```
48+
This must be named and in the location that was declared in the override from earlier. So for this demonstration, this file must go into `custom_model_data_guide_assets/models/item` and then be named `uno_reverse_model.json`
49+
50+
## Textures
51+
The texture file(s) should be in the `assets/<declared namespace>/textures/<declared path>` folder. You can use assets that are already in the game or your own textures.
2752
<br>If you export a blockbench model file, you might need to manually adjust the texture file assignments in the case that it was not getting the files from the same place that you are getting them in the pack.
53+
<br>For this demonstration, the file must be in the `custom_model_data_guide_assets/textures/item` folder, and be named `uno_reverse_texture`
2854

2955
### Final
3056
You need an mcmeta file or your pack won't work. [misode.github.io](https://misode.github.io/pack-mcmeta/) has a generator, as well as many other very helpful resources for data/resource packs.

0 commit comments

Comments
 (0)