Skip to content

API layer for EntityThrowableItem#setItem #2538

@crysis992

Description

@crysis992

Is your feature request related to a problem? Please describe.
I think 1.14 (or 1.13?) introduced the EntityProjectileThrowable class which projectiles like EnderPearls/Snowballs extend. This class has a method to change the displayed Item of that projectile. This can be used to display any item as a projectile.

Describe the solution you'd like
An API method to change the projectiles ItemStack

Describe alternatives you've considered
Currently only possible with nms.

Additional context
Sample:

		Snowball projectile = player.launchProjectile(Snowball.class);
		((CraftSnowball) projectile).getHandle().setItem(CraftItemStack.asNMSCopy(new ItemStack(Material.CARROT)));

https://puu.sh/Edy71/17cdc4ed73.png

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions