Closed thegatesdev closed 2 months ago
Thanks for looking at this, lmk if any more info is needed, I can quickly test out the setup.
This is likely causing some serious issues on our server/s as well.
24w09a is the cause of this
To expand on how a vanilla change caused this... When a projectile is deflected, it's owner is changed to the entity that it deflected off of. And for arrows, when the arrow's owner is changed to a player and the pickup status was disallowed, it's reset to allowed. I probably need some clarification on how this is a vanilla feature or not before we move to change it in some way. I created aI found a mojira report which hopefully provides some insight.
Expected behavior
An arrow projectile modified with the following code:
should never allow pickup.
Observed/Actual behavior
An arrow, modified with the above code, after it 'bounces back' from an entity, is suddenly allowed to be picked up. 'Bouncing back' occurs when the entity is on damage cooldown (The video demonstrates this by damaging the entity with an arrow prior to firing other arrows that will bounce back).
Steps/models to reproduce
Code used (this video is for context, not the actual issue):
https://github.com/PaperMC/Paper/assets/69715898/2b446294-5c43-4e41-b781-1bacfb5bdd45
Code used (the actual issue):
https://github.com/PaperMC/Paper/assets/69715898/bb4de958-9230-4ce9-b64d-c62426f94a82
Plugin and Datapack List
Plugins:
Datapacks
Paper version
Other
The plugin named 'CrossYourBows' is the one modifying the arrow. This is done in the
EntityShootBowEvent
. In addition, the 'knockbackStrenght', 'pierceLevel', 'damage' and 'critical' properties are adjusted as well. The plugin does not modify the arrow entity at any other time than in that specific event.Note that (as shown in the video's) the items get returned, even in creative mode.