Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ricocheted arrows don't retain all data #5093

Closed
TheBentoBox opened this issue Sep 26, 2024 · 0 comments
Closed

Ricocheted arrows don't retain all data #5093

TheBentoBox opened this issue Sep 26, 2024 · 0 comments

Comments

@TheBentoBox
Copy link
Contributor

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:

  • newProjectile.setShooter(arrowToCopy.getShooter())
  • newProjectile.setCritical(arrowToCopy.isCritical())
  • newProjectile.setPierceLevel(arrowToCopy.getPierceLevel())
  • newProjectile.setPickupStatus(arrowToCopy.getPickupStatus())
  • newProjectile.setKnockbackStrength(arrowToCopy.getKnockbackStrength())
@nossr50 nossr50 closed this as completed in 04eefae Nov 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant