Jump to content

Mob with HumanoidMobRenderer - how to render attack arm swing? [1.18.2]


bradsk88

Recommended Posts

I have a mob that uses the HumanoidMobRenderer. It is meant to look like another player.

public class VisitorMobRenderer extends HumanoidMobRenderer<VisitorMobEntity, PlayerModel<VisitorMobEntity>> {

I have basically no custom rendering code. Just some logic for loading custom skins.

https://github.com/bradsk88/Questown/blob/0d913c9bf06bb6b2de981717d2a38e182d9669ca/src/main/java/ca/bradj/questown/mobs/visitor/VisitorMobRenderer.java#L14

I've tried to call the "swing" method from the server side, which should publish a message to the client side. But I'm not seeing any animation.

((LivingEntity)mcExtra.entity()).swing(InteractionHand.MAIN_HAND);

https://github.com/bradsk88/Questown/blob/0770d0d161a92d69f0749832552671b781360a64/src/main/java/ca/bradj/questown/jobs/declarative/RealtimeWorldInteraction.java#L284

 

Any suggestions to get my mob's arm swinging?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.