zh_cn:tutorial:modding_tips
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
zh_cn:tutorial:modding_tips [2022/01/30 03:11] – [基本(API)] solidblock | zh_cn:tutorial:modding_tips [2022/05/27 23:54] – external edit 127.0.0.1 | ||
---|---|---|---|
Line 12: | Line 12: | ||
===== Mixins ===== | ===== Mixins ===== | ||
- | * 要将类强制转换为它未实现的接口,或强制转换为最终类,或将mixin强制转换为目标类,你可以使用“(TargetClass) (Object) sourceClassObject”的技巧。 | + | * 要将类强制转换为它未实现的接口,或强制转换为最终类,或将 mixin 强制转换为目标类,你可以使用“(TargetClass) (Object) sourceClassObject”的技巧。 |
- | * @Redirect 和 @ModifyConstant mixins 目前无法嵌套(多个模组同时应用在同一个地方)。这在开发中可能以后会改变——然而,目前,同@Overwrite一样,请尽量避免使用(or discuss bringing the hook over to Fabric' | + | * @Redirect 和 @ModifyConstant mixins 目前无法嵌套(多个模组同时应用在同一个地方)。这在开发中可能以后会改变——然而,目前,同 @Overwrite 一样,请尽量避免使用(或尝试将钩子桥接至 |
- | * If you're adding non-private custom fields or methods, prefix them with " | + | * 如果你要添加非私有的自定义字段或方法,请加上“模组id$”的前缀,或者加上其他独一无二的字符串并注解为 |
===== 网络 ===== | ===== 网络 ===== | ||
- | * Packets always begin execution on the **network thread**, however accesses to most Minecraft | + | * 封包永远是在**网络线程**开始执行的,但它对 |
- | ===== Pitfalls | + | ===== 陷阱 |
- | * Avoid using the '' | + | * 避免使用 |
zh_cn/tutorial/modding_tips.txt · Last modified: 2024/04/15 02:25 by solidblock