Skip to content
This repository was archived by the owner on Sep 8, 2023. It is now read-only.

Figure out some way to attribute end crystal pvp deaths to the correct players. #42

Open
Jaxkr opened this issue Dec 9, 2021 · 4 comments

Comments

@Jaxkr
Copy link
Member

Jaxkr commented Dec 9, 2021

This is a tricky issue even when you're not dealing with cross-server combat.

plan-player-analytics/Plan#1571
https://www.spigotmc.org/threads/ender-crystal-get-killer.474526/

We need this in order to drop blocks for the person who detonated the end crystal that dealt the killing blow.

@walksanatora
Copy link

i thought end crystals didn't track who placed/exploded them (Source: entirety of mumbo jumbo ruing season 8 of hermit craft where he refued to have a single kill)

@Jaxkr
Copy link
Member Author

Jaxkr commented Jan 8, 2022

i thought end crystals didn't track who placed/exploded them (Source: entirety of mumbo jumbo ruing season 8 of hermit craft where he refued to have a single kill)

Yep, you're exactly correct. We can figure out when they're created by listening for a PlayerInteractEvent then searching for a new nearby end crystal after a few ticks. Attributing them to a player, especially cross-server, is a bit of a mystery.

@fatpowaranga
Copy link

Just a thought as I’m still familiarising myself with Mammoth, but would it not be enough to attribute to the server where the explosion event originated from? A play through of events:

  1. End Crystal is placed in Server A
  2. Player A detonates End Crystal from Server B
  3. Both Player B and Player C were killed by explosion on Server A and Server B respectively.
  4. Loot from both player B and Player C drops on Server B.

Apologies if I’m misunderstanding

@AuroraLS3
Copy link

You can find who killed the end crystal from the last entity that caused damage to it - although since you have multiple servers I'd imagine you need some netcode to get that information between servers.

If you use some sort of payload for exploding the crystal on server B you can lookup the killer of crystal on server A and include the information before sending the payload

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants