Paper
Paper copied to clipboard
Arrow bouncing back on entity causes it to allow pickup again
Expected behavior
An arrow projectile modified with the following code:
Arrow arrow;
arrow.setPickupStatus(AbstractArrow.PickupStatus.DISALLOWED);
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):
arrow.setPickupStatus(AbstractArrow.PickupStatus.CREATIVE_ONLY);
https://github.com/PaperMC/Paper/assets/69715898/2b446294-5c43-4e41-b781-1bacfb5bdd45
Code used (the actual issue):
arrow.setPickupStatus(AbstractArrow.PickupStatus.DISALLOWED);
https://github.com/PaperMC/Paper/assets/69715898/bb4de958-9230-4ce9-b64d-c62426f94a82
Plugin and Datapack List
Plugins:
[22:21:17 INFO]: Server Plugins (1):
[22:21:17 INFO]: Bukkit Plugins:
[22:21:17 INFO]: - CrossYourBows
Datapacks
[22:21:32 INFO]: There are 3 data pack(s) enabled: [vanilla (built-in)], [file/bukkit (world)], [paper (built-in)]
[22:21:32 INFO]: There are no more data packs available
Paper version
[22:20:24 INFO]: Checking version, please wait...
[22:20:24 INFO]: This server is running Paper version 1.20.6-138-master@906df69 (2024-06-10T06:32:15Z) (Implementing API version 1.20.6-R0.1-SNAPSHOT)
You are running the latest 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.