Interface Projectile
- All Superinterfaces:
Entity, HoverEventSource<HoverEvent.ShowEntity>, SchedulerSource, Sound.Emitter, Sound.Source.Provider
- All Known Subinterfaces:
Arrow, ArrowProjectile, SpectralArrow, Trident
An entity flying through the air after being shot or thrown.
Like every entity, change it from the region thread owning its chunk.
- Since:
- 0.1.0
-
Method Summary
Modifier and TypeMethodDescriptionowner()Returns the entity that shot or threw this projectile, credited with what it hits, ornullif there is none.voidsetVelocity(double x, double y, double z) Changes the velocity of this projectile.doubleReturns the velocity of this projectile along the x axis, in blocks per tick.doubleReturns the velocity of this projectile along the y axis, in blocks per tick.doubleReturns the velocity of this projectile along the z axis, in blocks per tick.Methods inherited from interface Entity
chunk, displayName, entityId, isRemoved, location, remove, server, teleport, teleport, teleport, type, uuid, worldMethods inherited from interface HoverEventSource
asHoverEvent, asHoverEventMethods inherited from interface SchedulerSource
execute, execute, executeDelayed, executeDelayed, isOwnedByCurrentThreadMethods inherited from interface Sound.Source.Provider
soundSource
-
Method Details
-
owner
-
velocityX
double velocityX()Returns the velocity of this projectile along the x axis, in blocks per tick.- Returns:
- the velocity of this projectile along the x axis, in blocks per tick
- Since:
- 0.1.0
-
velocityY
double velocityY()Returns the velocity of this projectile along the y axis, in blocks per tick.- Returns:
- the velocity of this projectile along the y axis, in blocks per tick
- Since:
- 0.1.0
-
velocityZ
double velocityZ()Returns the velocity of this projectile along the z axis, in blocks per tick.- Returns:
- the velocity of this projectile along the z axis, in blocks per tick
- Since:
- 0.1.0
-
setVelocity
void setVelocity(double x, double y, double z) Changes the velocity of this projectile.- Parameters:
x- the velocity along the x axis, in blocks per ticky- the velocity along the y axis, in blocks per tickz- the velocity along the z axis, in blocks per tick- Since:
- 0.1.0
-