public interface Living extends Entity, ProjectileSource, TeamMember
Living entities can have PotionEffect
s, breathing air
under water, custom names, be meaningfully added to teams, and become
invisible.
UNKNOWN
Modifier and Type | Method and Description |
---|---|
default DamageableData |
getDamageableData()
Gets a copy of the current
DamageableData . |
com.flowpowered.math.vector.Vector3d |
getHeadRotation()
Returns this entity's head rotation.
|
default HealthData |
getHealthData()
Gets a copy of the current
HealthData . |
default MutableBoundedValue<Double> |
health()
Returns the health amount.
|
default OptionalValue<EntitySnapshot> |
lastAttacker()
Gets the
OptionalValue for the last attacker. |
default OptionalValue<Double> |
lastDamage()
Gets the last amount of damage dealt as an optional value.
|
default void |
lookAt(com.flowpowered.math.vector.Vector3d targetPos)
Makes the entity look at the specified target position.
|
default MutableBoundedValue<Double> |
maxHealth()
Gets the current maximum health.
|
void |
setHeadRotation(com.flowpowered.math.vector.Vector3d rotation)
Sets the entity's head rotation.
|
addPassenger, addTag, canSee, clearPassengers, createArchetype, createSnapshot, damage, getBaseVehicle, getBoundingBox, getCreator, getNearbyEntities, getNearbyEntities, getNotifier, getPassengers, getRandom, getRotation, getScale, getTags, getTransform, getType, getVehicle, getVelocity, gravity, hasPassenger, hasTag, isLoaded, isOnGround, isRemoved, remove, removePassenger, removeTag, setCreator, setLocation, setLocationAndRotation, setLocationAndRotation, setLocationAndRotationSafely, setLocationAndRotationSafely, setLocationSafely, setNotifier, setRotation, setScale, setTransform, setTransformSafely, setVehicle, setVelocity, transferToWorld, transferToWorld, transferToWorld, transferToWorld
getUniqueId
getLocation, getWorld
setRawData, validateRawData
getContentVersion, toContainer
getApplicableProperties, getProperty
copyFrom, copyFrom, get, getContainers, getOrCreate, offer, offer, offer, offer, offer, offer, remove, remove, remove, require, supports, transform, tryOffer, tryOffer, tryOffer, tryOffer, undo
copy, get, getKeys, getOrElse, getOrNull, getValue, getValues, require, supports, supports
getTranslation
launchProjectile, launchProjectile
getTeamRepresentation
default HealthData getHealthData()
HealthData
.default MutableBoundedValue<Double> health()
The range of the health depends on the object on which this method is defined. For players in Minecraft, the nominal range is between 0 and 20, inclusive, but the range can be adjusted.
Convention dictates that health does not follow below 0 but this convention may be broken.
default MutableBoundedValue<Double> maxHealth()
The maximum health set here may affect the attribute increasing health points. The base health should be minded that it may be lower than the total maximum health of this entity.
default DamageableData getDamageableData()
DamageableData
.default OptionalValue<EntitySnapshot> lastAttacker()
OptionalValue
for the last attacker.
This is generally an entity snapshot of a Living
.
default OptionalValue<Double> lastDamage()
com.flowpowered.math.vector.Vector3d getHeadRotation()
The format of the rotation is represented by:
x -> pitch
, y -> yaw
, z -> roll
Note that the pitch will be the same x value returned by
Entity.getRotation()
and Minecraft does not currently support
head roll so the z value will always be zero.
void setHeadRotation(com.flowpowered.math.vector.Vector3d rotation)
The format of the rotation is represented by:
x -> pitch
, y -> yaw
, z -> roll
Note that the pitch (x value) supplied will update the entity's pitch
via Entity.setRotation(Vector3d)
.
rotation
- Rotation of the entities headdefault void lookAt(com.flowpowered.math.vector.Vector3d targetPos)
targetPos
- Position to target