public abstract class TridentProjectile extends TridentEntity implements Projectile
Modifier and Type | Field and Description |
---|---|
protected WeakReference<ProjectileLauncher> |
source
The source that fires the projectile
|
airTicks, boundingBox, counter, displayName, executor, fallDistance, fireTicks, godMode, HANDLER, height, id, loc, nameVisible, onGround, passenger, portalCooldown, silent, ticksExisted, uniqueId, velocity, width
Constructor and Description |
---|
TridentProjectile(UUID uniqueId,
Position spawnLocation,
ProjectileLauncher source)
Inherits UUID and spawnPosition from
TridentEntity |
Modifier and Type | Method and Description |
---|---|
abstract void |
applyProperties(EntityProperties properties)
Sets the properties of this entity to the specified properties
|
void |
doHit()
Performs hit action
|
protected void |
doTick() |
protected abstract void |
hit()
Performed when the projectile hits something
|
boolean |
isNameVisible()
Gets if the entity's display name visible
|
ProjectileLauncher |
launcher()
The projectile source
|
void |
setLauncher(ProjectileLauncher shooter)
Returns the shooter of the Projectile
|
asNbt, boundingBox, displayName, doEncodeMeta, doLoad, doRemove, eject, encodeMetadata, entityId, isSilent, load, onGround, passenger, position, remove, setDisplayName, setOnGround, setPassenger, setPosition, setSize, setVelocity, spawn, teleport, teleport, teleport, tick, type, uniqueId, velocity, withinRange, world
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
boundingBox, displayName, eject, entityId, isSilent, onGround, passenger, position, remove, setDisplayName, setPassenger, setSize, setVelocity, teleport, teleport, teleport, type, uniqueId, velocity, withinRange, world
protected volatile WeakReference<ProjectileLauncher> source
public TridentProjectile(UUID uniqueId, Position spawnLocation, ProjectileLauncher source)
TridentEntity
source
- the entity which fired the projectilepublic boolean isNameVisible()
Entity
isNameVisible
in interface Entity
isNameVisible
in class TridentEntity
public abstract void applyProperties(EntityProperties properties)
Entity
applyProperties
in interface Entity
applyProperties
in class TridentEntity
properties
- the properties to setprotected void doTick()
doTick
in class TridentEntity
public void doHit()
Projectile
doHit
in interface Projectile
protected abstract void hit()
public ProjectileLauncher launcher()
Projectile
launcher
in interface Projectile
public void setLauncher(ProjectileLauncher shooter)
Projectile
setLauncher
in interface Projectile
shooter
- the ProjectileSource of the ProjectileCopyright © 2016. All rights reserved.