Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (โ‹ฎ) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

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!

  • 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 by Nitoxym

  • 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 by Nitoxym

  • 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?

  • 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"

  • Author
Just now, diesieben07 said:

EntityDataManager cannot help you here.

Then what do I use?

  • 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

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

  • 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.

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions โ†’ Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.