Posted March 31, 20205 yr 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!
March 31, 20205 yr Author 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 March 31, 20205 yr by Nitoxym
March 31, 20205 yr Author 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 March 31, 20205 yr by Nitoxym
March 31, 20205 yr Author 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?
March 31, 20205 yr Author 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"
March 31, 20205 yr Author Just now, diesieben07 said: EntityDataManager cannot help you here. Then what do I use?
March 31, 20205 yr What if you detect it to the server then make a custom info then send it to the client?
March 31, 20205 yr Author 1 minute ago, Kiljaeden053 said: What if you detect it to the server then make a custom info then send it to the client? It's a client only mod
March 31, 20205 yr 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 March 31, 20205 yr by Kiljaeden053
March 31, 20205 yr Author 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.