Jump to content

Playeranimator 1.19.2 forge


kavi

Recommended Posts

Hi  I have been trying to get support on playeranimator but without any success. I just want to make an animation that can be seen in both client and server side. How do I render player models to animate all players to see. Source like better combat is too confusing because they have fabric and forge source mixed together and have way to much files for me to make sense of the actual fuck they are saying. Someone said to check Emotecraft Server-api but that was unless I can't make sense of that. I don't care how much time it takes, I will get to make this happens even if I go nuts. What packets do I send to the client from the server and what method do I use on the client side to see other player models moving? Do I have to create custom packets if so how? Why aren't there any example for server side. 

 

Here is how I understand how the client see the render:

 

var player = Minecraft.getInstance().level.getPlayerByUUID(Minecraft.getInstance().player.getUUID());

var animation = (ModifierLayer<IAnimation>) PlayerAnimationAccess.getPlayerAssociatedData((AbstractClientPlayer) player).get(new ResourceLocation(Technic.MOD_ID, "animation"));

if (animation != null) { if(Keybinding.TESTING_KEY.consumeClick()) { animation.setAnimation(new KeyframeAnimationPlayer(PlayerAnimationRegistry.getAnimation(new ResourceLocation("technic", "waving")))); ModMessages.sendToServer(new ExampleC2SPacket()); } }

 

I thought that somehow I need to send info of the playermodel to the client for all player see the animation. But I have been checking the code of bettercombat, emotecraft and I don't see them using that. If someone manage to code this action of pressing a button and animate it such that all players see the animation, I swear I will do anything for that. Ik this may be out of my level to learn this level of programming but I hate giving up.

Edited by kavi
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.