Open MileyHollenberg opened 2 years ago
Certainly a valid behaviour as paper disables unloaded enderpearls from maintaining their owner by default. This "reset" happens before the unload event is called.
I am unsure if we want to change this behaviour as the unload event is the last last thing that is called for an entity before it is untracked.
The EntityPortalReadyEvent is called early enough for you to catch the shooter if that is a valid alternative. Beyond that, this would need input from others as it is more of a philosophical question when to remove the shooter.
Interesting, I would expect that the owner object would still have a value before going through the portal as that would match the behavior with the void as well as there it also gets destroyed and unloaded in the end.
I've already created a small workaround for my setup
It is still valid before going through the portal. The entity remove event is just far far beyond the "going through the portal" logic.
As stated, it is pretty much the last thing that touches the entity before it is erased. All logic for portals etc run before it.
Expected behavior
When shooting an Ender Pearl through a Nether Portal and it fires the
EntityRemoveFromWorldEvent
I would assume the EnderPearl to still have an owner as it would when the Ender Pearl gets destroyed by the void. Ender Pearls that get destroyed by the void do have their shooter still associated to themObserved/Actual behavior
The owner property of the Ender Pearl entity is null
Steps/models to reproduce
The following snippet does some checks on the event, when you shoot an Ender Pearl into the void the console will print
All good
, but if you shoot it through a Nether Portal it will printShooter is null
.Plugin and Datapack List
Plugins: TestPlugin (my own) and VoxelSniper Datapacks: None
Paper version
Other
No response