Jump to content

Recommended Posts

Posted

Hey!

I wanted to know if it is possible to detect client side when an entity dies. It works with LivingDeathEvent server side, but not client side. Thanks!

  • Like 1
Posted (edited)

Any way to detect that animation? Or the fact that the entity is removed?

Also, any way to know if this is player who killed it?

Edited by Nitoxym
Posted (edited)
3 minutes ago, diesieben07 said:

Not easily, there's no event being fired. The way it works is that the health of the entity is synced to the client using EntityDataManager and the client starts doing the death animation if the health is <= 0.

Ok thanks, but how can I be sure that the player killed the entity? I saw this mod, and they managed to do it, but I can't figure how: https://github.com/symt/zealot-counter/tree/1.2.2/src/main/java/io/github/symt

What I know is that it only detects when the player one shot the mob

Edited by Nitoxym
Posted
1 minute ago, diesieben07 said:

They check that the entity dying either was the entity you last attacked or the entity you are looking at.

How can I do that?

5 minutes ago, Nitoxym said:

EntityDataManager

Also, where do I use that? And how?

Posted
Just now, diesieben07 said:

Did you even look at the code you linked to?

My bad, I checked after

Just now, diesieben07 said:

Well, what do you want to achieve?

I want to detect when the entity is dying, then I'll manage to detect "if the entity is killed by the player"

Posted (edited)
3 minutes ago, Nitoxym said:

It's a client only mod

Can you please describe your mod even more friend? WE can't fix the puzzle without enough information/pieces? oes this mo ad death animations?

Edited by Kiljaeden053
Posted

The mod is supposed to be a counter for a server, and only count mobs with specific names

But finally, I'll warn people to use it only if they can one shot the mob, so I only count attacks

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.