介绍
Mannequin Swing
This mod adds support for swing animations on mannequins. It does not add any new way to cause a swing animation, such as the /swing command from the 26.1 snapshots.
Technical details
LivingEntity has a method updateSwingTime that needs to be called both on the client and on the server to allow an entity to swing its arms. However, it is only used by Players and monsters. This mod adds a call in Mannequins’ aiStep function, through the technique of submixins.
@Mixin(LivingEntity.class)
public class LivingEntityMixin {
@Shadow
protected void updateSwingTime() {};
@WrapMethod(method = "aiStep")
public void overrideAiStep(Operation<Void> original) {
original.call();
}
}
@Mixin(Mannequin.class)
public class MannequinSubMixin extends LivingEntityMixin {
@Override
public void overrideAiStep(Operation<Void> original) {
super.overrideAiStep(original);
updateSwingTime();
}
}
常见问题
Mannequin Swing 支持哪些 Minecraft 版本?
Mannequin Swing 支持 Minecraft Java 版 1.21.11,可用的加载器:Fabric / Forge / NeoForge。下载时注意选择和你游戏版本一致的文件。
Mannequin Swing 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric / Forge / NeoForge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:客户端和服务端都要装。
rubenverg 的其他作品
查看全部 →GregTech Molecule Drawings
为格雷科技中的有机分子在提示框中添加结构式绘图。
GTCEu Greenhouse
A mod that adds the capability to create multiblock greenhouses with renders of the current recipe
GTCEu Greenhouse
A mod that adds the capability to create multiblock greenhouses with renders of the current recipe
评论
登录后评论和评分