classinternalSource
public class Entity

Wraps the fields confirmed common to every entity type in the Anvil entity format See LivingEntity for the living entity tier, and use raw() for anything type specific

Known subclasses
LivingEntity

Fields

raw

protectedSource
protected final NbtCompound raw

Constructors

public Entity(NbtCompound raw)
Parameters
rawNbtCompound

Methods

public short air()
Returns
short
public double fallDistance()
Returns
double
public short fire()
Returns
short
public String id()
Returns
String
public boolean invulnerable()
Returns
boolean
public double[] motion()
Returns
double[]
public boolean onGround()
Returns
boolean
public int portalCooldown()
Returns
int
public double[] pos()
Returns
double[]
public NbtCompound raw()
protected double[] readDoubleTriplet(String key)
Parameters
keyString
Returns
double[]
protected float[] readFloatPair(String key)
Parameters
keyString
Returns
float[]
public float[] rotation()
[yaw, pitch]
Returns
float[]
public void setAir(short value)
Parameters
valueshort
public void setFallDistance(double value)
Parameters
valuedouble
public void setFire(short value)
Parameters
valueshort
public void setInvulnerable(boolean value)
Parameters
valueboolean
public void setMotion(double x, double y, double z)
Parameters
xdouble
ydouble
zdouble
public void setOnGround(boolean value)
Parameters
valueboolean
public void setPortalCooldown(int value)
Parameters
valueint
public void setPos(double x, double y, double z)
Parameters
xdouble
ydouble
zdouble
public void setRotation(float yaw, float pitch)
Parameters
yawfloat
pitchfloat
public void setUuid(UUID uuid)
Parameters
uuidUUID
public UUID uuid()
Returns
UUID
protected void writeDoubleTriplet(String key, double x, double y, double z)
Parameters
keyString
xdouble
ydouble
zdouble
protected void writeFloatPair(String key, float a, float b)
Parameters
keyString
afloat
bfloat

Used by

Methods of other types that accept or return Entity.