You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After 1.21.4, custom model data has gotten a lot more flexible, but also requires more things to be added.
24
+
25
+
So first, change the `"type": "minecraft:model"` to be ```"type": "minecraft:select"```, and remove the next line. It should look like this now:
26
+
'`minecraft:select`' is the setup that allows us to use strings to declare the name of the item, if you want to use numbers that's a different setup, which I don't want to teach here because strings are a lot more straightforward.
27
+
28
+
```json
29
+
{
30
+
"model": {
31
+
"type": "minecraft:select",
32
+
}
33
+
}
34
+
```
35
+
36
+
Now, add on the next line - ```"property": "minecraft:custom_model_data",```
37
+
38
+
```json
39
+
{
40
+
"model": {
41
+
"type": "minecraft:select",
42
+
"property": "minecraft:custom_model_data",
43
+
}
44
+
}
45
+
```
46
+
47
+
then you add the 'fallback' texture, so basically the texture this used to point to. In this case, iron nugget. Add `"fallback": {}` and then basically the original contents of the file into the brackets
48
+
49
+
```json
50
+
{
51
+
"model": {
52
+
"type": "minecraft:select",
53
+
"property": "minecraft:custom_model_data",
54
+
"fallback": {
55
+
"type": "minecraft:model",
56
+
"model": "minecraft:item/iron_nugget"
57
+
}
58
+
}
59
+
}
60
+
```
61
+
62
+
Now for the actual declaration of the custom data, we need to add '`"cases":[{}]`' for the different cases that will be shown. i.e. the different models that will be shown.
63
+
64
+
```json
65
+
{
66
+
"model": {
67
+
"type": "minecraft:select",
68
+
"property": "minecraft:custom_model_data",
69
+
"fallback": {
70
+
"type": "minecraft:model",
71
+
"model": "minecraft:item/iron_nugget"
72
+
},
73
+
"cases": [
74
+
{
75
+
}
76
+
]
77
+
}
78
+
}
79
+
```
80
+
81
+
Now inside the `{}` we're gonna add `"when": <name>` - this will be the name of the custom data, it'll be what's used in the command.
82
+
83
+
```json
84
+
{
85
+
"model": {
86
+
"type": "minecraft:select",
87
+
"property": "minecraft:custom_model_data",
88
+
"fallback": {
89
+
"type": "minecraft:model",
90
+
"model": "minecraft:item/iron_nugget"
91
+
},
92
+
"cases": [
93
+
{
94
+
"when": "uno_reverse"
95
+
}
96
+
]
97
+
}
98
+
}
19
99
```
20
-
<br>For this example, this looks like:
100
+
101
+
Then we add the model information for where the model is. So it should look like this, after all that.
0 commit comments