#shield
22 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.
For which version of Minecraft?
(Recent versions replaced the overrides system)
Old system would be like this:
!faq shield-model
This is an example of an overrides section of the shield.json to add more shields for the Java Edition.
If you don't know how/where to add this to your shield.json file, copy the one from the default pack (check !faq default pack if you don't know how to get the files) and replace the overrides section in there with this:
"overrides": [
{ "predicate": {"blocking": 1 }, "model": "item/shield_blocking" },
{ "predicate": {"custom_model_data": 1}, "model": "custom/spiky_shield" },
{ "predicate": {"custom_model_data": 1, "blocking": 1 }, "model": "custom/spiky_shield_blocking" }
]```
**Explanation of the predicates:**
_blocking_ = player is blocking with the shield (either 0 or 1)
Keep in mind that the order of predicates matters. It will always use the model of the last predicate in the list whose condiitons are all met!
it's for 1.21
as in 1.21.0 or as in some other 1.21.X version?
for 1.21.0 that one should still work, as of 1.21.4 it's the new system if I'm not mixing up versions
no just 1.21.0
I can show u how I have my shield.json I tried putting the one you send me but it doesn't work
what's the command you are trying ingame?
oh its the /give isagetta minecraft:shield[minecraft_custom_model_data=1] 1
but the thing is the first override works fine but im trying to make different custom shields
should be shield[custom_model_data=1], not shield[minecraft_custom_model_data=1]
ok fixed that it works fine but now how do I make a new override for a different custom shield?
as in a second one?
yes
{
"predicate": {
"custom_model_data": 1
},
"model": "item/futuristic_shield"
},
{
"predicate": {
"custom_model_data": 1,
"blocking": 1
},
"model": "item/futuristic_shield_blocking"
},
{
"predicate": {
"custom_model_data": 2
},
"model": "item/second_shield"
},
{
"predicate": {
"custom_model_data": 2,
"blocking": 1
},
"model": "item/second_shield_blocking"
}
and so on