zh_cn:tutorial:model_predicate_providers
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
zh_cn:tutorial:model_predicate_providers [2021/08/17 12:11] – [介绍] 标准译名 solidblock | zh_cn:tutorial:model_predicate_providers [2022/06/01 11:51] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 3: | Line 3: | ||
==== 介绍 ==== | ==== 介绍 ==== | ||
- | 模型谓词提供器用于给予'' | + | 模型谓词提供器用于给予 '' |
==== 可行示例 ==== | ==== 可行示例 ==== | ||
- | 在此例中,我们假定有了自定义的弓,叫做'' | + | 在此例中,我们假定有了自定义的弓,叫做 '' |
- | 在其方法中,使用其物品和一个'' | + | 在其方法中,使用其物品和一个 '' |
<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 20: | Line 20: | ||
}); | }); | ||
- | FabricModelPredicateProviderRegistry.register(EXAMPLE_BOW, | + | ModelPredicateProviderRegistry.register(EXAMPLE_BOW, |
if (livingEntity == null) { | if (livingEntity == null) { | ||
return 0.0F; | return 0.0F; | ||
Line 27: | Line 27: | ||
}); | }); | ||
</ | </ | ||
+ | 可 | ||
+ | 如果 '' | ||
- | '' | + | '' |
- | 所有的'' | + | 所有的 '' |
- | 仔细看看'' | + | 仔细看看 '' |
所有这些都是有用的,但为了让我们的物品改变其模型,我们只需要实现其一部分的特性。 | 所有这些都是有用的,但为了让我们的物品改变其模型,我们只需要实现其一部分的特性。 | ||
Line 61: | Line 63: | ||
</ | </ | ||
- | Minecraft运作的方式是,在指定的值中,检查模型大于等于的值的最后一个值。所以拉伸值为'' | + | Minecraft 运作的方式是,在指定的值中,检查模型大于等于的值的最后一个值。所以拉伸值为 '' |
zh_cn/tutorial/model_predicate_providers.txt · Last modified: 2022/06/01 11:51 by 127.0.0.1