#how can I get model override to work for fishing rods?

1 messages · Page 1 of 1 (latest)

alpine leaf
#

I tried making two models one for fishing_rod, and another for fishing_rod_cast but just setting them as the parent models doesnt work for casting

strange parrotBOT
# zenith sand !faq java-parents

(Result for "java-parent")

Explanation: A parent is an optional reference to another model file. If it is specified your model will inherit information from the parent file (textures, elements, display settings, etc.) if that information isn't already specified in your own model.

Changing/setting a parent: Go to File > Project... and put a model reference into the parent field. Model references always start inside the "models" folder (so example/custom will look for assest/minecraft/models/example/custom.json)

Common mistakes:
-Do not force yourself to specify a parent if you don't need it. A model can work just fine without one. A reference to a non-existent parent file will cause your model to be an error block!
-Do not use item/generated and item/handheld in combination with a custom made model. (The game would try to generate a model based on your texture with those parents, and then gets confused with your custom cubes/elements you added to the model).
_ Feel free to use them to generate models from textures though (just like in the vanilla files)._

zenith sand
#

(TL;DR a parent model has nothing to do with predicates/overrides)

#

what you need to do is this:

#

!faq shield-model

strange parrotBOT
# zenith sand !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!
zenith sand
#

but instead of "blocking" you use "cast"

#

(and in the fishing_rod.json)

#

if you don't want custom_model_data you can ignore the last 2 lines

#

you can also define this in Blockbench by opening your fishing_rod.json and then using Tools > Edit Override Predicates

alpine leaf
#

I tried doing it manually on the json already, mustve messed something up, ill try doing it through blockbench :)

zenith sand
#

Keep in mind only the base model (fishing_rod.json) should have overrides.
Your override models like fishing_rod_cast.json etc. should not have any in them.

alpine leaf
#

oop thats it

#

thanks, I can work it out from here ;P

#

!close

for future reference, I had to add model.fishing_rod_cast= to the properties file to get this to work

strange parrotBOT
#

Channel closed ----------

alpine leaf
#

oh, editing reopened it 0.0

#

!close