tutorial:model_predicate_providers
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
tutorial:model_predicate_providers [2021/03/05 18:49] – created oroarmor | tutorial:model_predicate_providers [2022/06/01 11:48] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 8: | Line 8: | ||
For this example, let's say we have we have a custom bow item called '' | For this example, let's say we have we have a custom bow item called '' | ||
+ | |||
+ | Inside a method, we register a '' | ||
<code java [enable_line_numbers=" | <code java [enable_line_numbers=" | ||
- | FabricModelPredicateProviderRegistry.register(EXAMPLE_BOW, | + | ModelPredicateProviderRegistry.register(EXAMPLE_BOW, |
if (livingEntity == null) { | if (livingEntity == null) { | ||
return 0.0F; | return 0.0F; | ||
Line 18: | Line 20: | ||
}); | }); | ||
- | FabricModelPredicateProviderRegistry.register(EXAMPLE_BOW, | + | ModelPredicateProviderRegistry.register(EXAMPLE_BOW, |
if (livingEntity == null) { | if (livingEntity == null) { | ||
return 0.0F; | return 0.0F; | ||
Line 26: | Line 28: | ||
</ | </ | ||
+ | If the '' | ||
+ | |||
+ | The '' | ||
+ | |||
+ | All '' | ||
+ | |||
+ | Taking a closer look at the '' | ||
+ | |||
+ | All of this is useful, but is only half of the features we need to implement in order to have our item change its model. | ||
+ | |||
+ | <code json [enable_line_numbers=" | ||
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | } | ||
+ | ] | ||
+ | </ | ||
+ | |||
+ | The way that Minecraft works is that it checks to see which model is last in the list that either matches or has values greater than specified. so with a pull value of '' |
tutorial/model_predicate_providers.1614970189.txt.gz · Last modified: 2021/03/05 18:49 by oroarmor