Jump to content

[1.15.2]Player Animation


Papa_Prime

Recommended Posts

Hello, I would really like to avoid any form of core modding or vanilla file replacement.

I have got this but entity models are not possible to modify in this way after registration. Either way here is my attempt:

@SubscribeEvent
    public static void renderPlayer(RenderPlayerEvent.Pre event) {

        PlayerEntity player = event.getPlayer();

       PlayerModel<AbstractClientPlayerEntity> model = event.getRenderer().getEntityModel();

        if (player.getCapability(VoidProvider.VOID, null).isPresent()) {

            IVoid cap = player.getCapability(VoidProvider.VOID, null).orElse(null);

            if (player.getActiveItemStack().getItem() instanceof ItemCasting && cap.getMaxCharge() > 0) {
                ModelRenderer arm = model.bipedRightArm;;

                arm.rotateAngleY = -0.6F;
            }
        }
    }

 

Edited by Papa_Prime
Added version
Link to comment
Share on other sites

  • 1 month later...

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.

Announcements



×
×
  • Create New...

Important Information

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