Skip to content

Add API for retreiving the itemstack used to launch a projectile#1940

Closed
Spottedleaf wants to merge 6 commits into
PaperMC:masterfrom
Spottedleaf:arrow-getlaunchitem
Closed

Add API for retreiving the itemstack used to launch a projectile#1940
Spottedleaf wants to merge 6 commits into
PaperMC:masterfrom
Spottedleaf:arrow-getlaunchitem

Conversation

@Spottedleaf
Copy link
Copy Markdown
Member

@Spottedleaf Spottedleaf commented Apr 5, 2019

Note that we will have to watch out for new projectiles / new code to launch projectiles on updates.

Should resolve #1937

@MrIvanPlays
Copy link
Copy Markdown
Contributor

Dude, you are terminator! So much PRs

@Cryptite
Copy link
Copy Markdown
Contributor

Cryptite commented Apr 5, 2019

It may be beyond the scope of this PR, but it would be very nice (and also consistent) if the equivalent of PlayerElytraBoostEvent's setShouldConsume() method was brought over to ProjectileLaunchEvent. Very useful if you want things like infinite enderpearling, etc.

@Spottedleaf
Copy link
Copy Markdown
Member Author

That is beyond the scope of this patch

@Spottedleaf Spottedleaf force-pushed the arrow-getlaunchitem branch from 6d949cc to c6038f7 Compare April 5, 2019 22:19
Check for IProjectile in AbstractProjectile
Copy link
Copy Markdown
Member

@aikar aikar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since bukkits projectile doesnt match nms's, i rather us not put it on abstract, and use an interface instead and just tack it on the ones it is actually applicable to.

@aikar
Copy link
Copy Markdown
Member

aikar commented Apr 6, 2019

Maybe something like LaunchedProjectile? and getLaunchingItem

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

Successfully merging this pull request may close these issues.

Obtain ItemStack from Trident entity

4 participants