Hello Minecraft Development Team,
In Minecraft 1.21.11 and snapshot 26w11a, mannequins are unable to perform a main-hand swing animation.
While investigating this behavior using mcp-reborn, I noticed that the swing animation never progresses because the swing timer is not updated on the client side.
Specifically, the issue appears to be that updateSwingTime() is never called for mannequins.
If updateSwingTime() is called inside the tick() method of ClientMannequin, the swing animation works correctly.
Example (simplified):
@Override
public void tick() {
super.tick();
this.updateSwingTime();
}After adding this call, mannequins are able to swing their hands as expected.
However, I am not deeply familiar with the client implementation, so I am not sure if there is a specific reason why this call is intentionally omitted or if this is simply an oversight.
Linked issues
duplicates 1
Comments 3
Can confirm in 1.21.11:
protected void fv() {
int $$0 = this.F();
if (this.bp) {
++this.br;
if (this.br >= $$0) {
this.br = 0;
this.bp = false;
}
} else {
this.br = 0;
}
this.by = (float)this.br / (float)$$0;
}The ClientMannequin class (gij.class) overrides tick() (g()). However, its implementation only checks asynchronous skin profile lookups and delegates to super.tick(), completely omitting the call to updateSwingTime() (fv()):
@Override
public void g() {
super.g();
this.g.a(this.dI(), this.dN());
if (this.h != null && this.h.isDone()) {
try {
this.h.get().ifPresent(this::a);
this.h = null;
}
catch (Exception $$0) {
f.error("Error when trying to look up skin", (Throwable)$$0);
}
}
}Furthermore, an analysis of the inheritance chain confirms that super.g() (Mannequin.class <Mob.class < LivingEntity.class) does not call updateSwingTime() either.
Thank you for your report!
We're tracking this issue in MC-302373, so this ticket is being resolved and linked as a duplicate.
That ticket has already been resolved as invalid. Please take a look at the parent ticket (MC-302373) and see if an explanation is provided there in the description of the ticket or in the comments for why this issue is invalid.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
omg yes we need this fix for my server :OOOOO