zh_cn:tutorial:armor
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionNext revisionBoth sides next revision | ||
zh_cn:tutorial:armor [2021/07/25 01:14] – created solidblock | zh_cn:tutorial:armor [2022/08/10 01:40] – [添加击退保护] xtexchooser | ||
---|---|---|---|
Line 3: | Line 3: | ||
==== 介绍 ==== | ==== 介绍 ==== | ||
- | 盔甲是比一般的方块或者物品更复杂一点的实现,但是只要了解了,实现还是很简单的。如需添加盔甲,需要先做一个CustomArmorMaterial类,然后注册物品。无门还需要看看如何为盔甲提供材质。There' | + | 盔甲是比一般的方块或者物品更复杂一点的实现,但是只要了解了,实现还是很简单的。如需添加盔甲,需要先实现CustomArmorMaterial类,然后注册物品。我们还需要看看如何为盔甲提供纹理。本文最后有一个解释如何添加击退的特殊章节,因为此方法只能通过Mixin访问(对于1.16.3)。 |
- | 本文档的一个例子可以在[[https:// | + | 本文档的一个例子可以在[[https:// |
==== 创建盔甲材料类 ==== | ==== 创建盔甲材料类 ==== | ||
Line 137: | Line 137: | ||
</ | </ | ||
- | 好了!你的盔甲现在应该存在于游戏中,虽然还没有材质,但是已经可以通过/ | + | 好了!你的盔甲现在应该存在于游戏中,虽然还没有纹理,但是已经可以通过/ |
- | 现在分配材质。 | + | 现在分配纹理。 |
- | ==== 提供材质 | + | ==== 提供纹理 |
假定你已经: | 假定你已经: | ||
- | * 有了每一个盔甲物品的材质(x_helmet.png、x_chestplate.png等) | + | * 有了每一个盔甲物品的纹理(x_helmet.png、x_chestplate.png等) |
- | * 有了穿着的每个盔甲的材质(x_layer_1.png和x_layer_2.png) | + | * 有了穿着的每个盔甲的纹理(x_layer_1.png和x_layer_2.png) |
将其分配到每一个盔甲物品。 | 将其分配到每一个盔甲物品。 | ||
Line 164: | Line 164: | ||
重复上述过程,完成其他物品。 | 重复上述过程,完成其他物品。 | ||
- | 要给予穿着的盔甲的材质,只需要将X_layer_1.png和X_layer_2.png(其中X是你在你的盔甲材料类中选择的参数)放到' | + | 要给予穿着的盔甲的纹理,只需要将X_layer_1.png和X_layer_2.png(其中X是你在你的盔甲材料类中选择的参数)放到' |
Line 172: | Line 172: | ||
==== 添加击退保护 ==== | ==== 添加击退保护 ==== | ||
- | And here comes the so very cursed! | + | 来了,非常折磨! |
- | Mojang | + | Mojang |
To get around this, we're gonna make a mixin that goes into ArmorItem. If this is your first time, [[tutorial: | To get around this, we're gonna make a mixin that goes into ArmorItem. If this is your first time, [[tutorial: |
zh_cn/tutorial/armor.txt · Last modified: 2023/08/20 10:19 by wjz_p