mcMMO-Dev / mcMMO

The RPG Lover's Mod!
https://mcmmo.org
GNU General Public License v3.0
1.01k stars 867 forks source link

Ricocheted arrows don't retain all data #5093

Closed TheBentoBox closed 2 weeks ago

TheBentoBox commented 2 months ago

I have custom content which spawns arrows with bespoke settings, namely pickup statuses to prevent players from picking certain arrows up, and the crossbow ricochet skill basically breaks this because none of these settings are carried over to the newly spawned arrow when a ricochet occurs.

CrossbowManager::spawnReflectedArrow, or perhaps ProjectileUtils::copyArrowMetadata, should add the following logic (pseudo-code) to maintain as much plugin compatibility as possible: