Interface ArrowProjectile
- All Superinterfaces:
Entity, HoverEventSource<HoverEvent.ShowEntity>, Projectile, SchedulerSource, Sound.Emitter, Sound.Source.Provider
- All Known Subinterfaces:
Arrow, SpectralArrow, Trident
A projectile that flies like an arrow: it deals damage scaling with its speed, sticks in the
block it hits and can be picked up again.
- Since:
- 0.1.0
-
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the damage of a hit at a speed of one block per tick, in half-hearts.booleanReturnstrueif a player in survival mode may pick this projectile up.booleanReturnstrueif this projectile was shot at full power, which adds a random bonus to its damage.booleanisStuck()Returnstrueonce this projectile is stuck in a block.Returns the item a player gets back when picking this projectile up.intpiercing()Returns how many entities this projectile goes through before it stops.voidsetBaseDamage(double damage) Changes the damage of a hit at a speed of one block per tick.voidsetCritical(boolean critical) Marks this projectile as shot at full power, or not.weapon()Returns the bow, crossbow or trident this projectile was shot with, whose enchantments apply to its hits;ItemStack.EMPTYif unknown.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 Projectile
owner, setVelocity, velocityX, velocityY, velocityZMethods inherited from interface SchedulerSource
execute, execute, executeDelayed, executeDelayed, isOwnedByCurrentThreadMethods inherited from interface Sound.Source.Provider
soundSource
-
Method Details
-
baseDamage
double baseDamage()Returns the damage of a hit at a speed of one block per tick, in half-hearts.- Returns:
- the damage of a hit at a speed of one block per tick, in half-hearts
- Since:
- 0.1.0
-
setBaseDamage
void setBaseDamage(double damage) Changes the damage of a hit at a speed of one block per tick.- Parameters:
damage- the damage, in half-hearts- Since:
- 0.1.0
-
isCritical
boolean isCritical()Returnstrueif this projectile was shot at full power, which adds a random bonus to its damage.- Returns:
trueif this projectile was shot at full power, which adds a random bonus to its damage- Since:
- 0.1.0
-
setCritical
void setCritical(boolean critical) Marks this projectile as shot at full power, or not.- Parameters:
critical-truefor a critical projectile- Since:
- 0.1.0
-
piercing
int piercing()Returns how many entities this projectile goes through before it stops.- Returns:
- how many entities this projectile goes through before it stops
- Since:
- 0.1.0
-
isStuck
boolean isStuck()Returnstrueonce this projectile is stuck in a block.- Returns:
trueonce this projectile is stuck in a block- Since:
- 0.1.0
-
canBePickedUp
boolean canBePickedUp()Returnstrueif a player in survival mode may pick this projectile up.- Returns:
trueif a player in survival mode may pick this projectile up- Since:
- 0.1.0
-
pickupItem
ItemStack pickupItem()Returns the item a player gets back when picking this projectile up.- Returns:
- the item a player gets back when picking this projectile up
- Since:
- 0.1.0
-
weapon
ItemStack weapon()Returns the bow, crossbow or trident this projectile was shot with, whose enchantments apply to its hits;ItemStack.EMPTYif unknown.- Returns:
- the bow, crossbow or trident this projectile was shot with, whose enchantments
apply to its hits;
ItemStack.EMPTYif unknown - Since:
- 0.1.0
-