|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectBaseEntity
public class BaseEntity extends java.lang.Object
BaseEntity.java - Class for accessing things that all entities share - X, Y, Z, health.
Constructor and Description |
---|
BaseEntity()
Interface for entities. |
BaseEntity(fe entity)
Creates an interface for an entity |
Modifier and Type | Method and Description |
---|---|
int |
getAirTicks()
Get the amount of AirTicks left. |
int |
getBaseAirTicks()
Get the default amount of AirTicks for this entity 20 ticks per second. |
fe |
getEntity()
Returns the entity we're wrapping. |
int |
getFireTicks()
Get the amount of FireTicks left. |
int |
getId()
Returns the ID for this mob |
int |
getNoDamageTicks()
Get the current NoDamageTicks for this entity This gets lowered every game tick, until its smaller than half the BaseNoDamageTicks it only registers any damage more than LivingEntity.getLastDamage() . |
float |
getPitch()
Returns the entity's pitch |
Player |
getPlayer()
Returns the player for this entity |
float |
getRotation()
Returns the entity's rotation |
double |
getX()
Returns the entity's X |
double |
getY()
Returns the entity's Y |
double |
getZ()
Returns the entity's Z |
boolean |
isAnimal()
Returns whether or not this entity is an animal |
boolean |
isLiving()
Returns whether or not this entity is alive |
boolean |
isMob()
Returns whether or not this entity is a mob |
boolean |
isPlayer()
Returns true if this entity is a player |
void |
setAirTicks(int ticks)
Set the amount of AirTicks left. |
void |
setBaseAirTicks(int ticks)
Set the default amount of AirTicks for this entity 20 ticks per second. |
void |
setFireTicks(int ticks)
Set the amount of FireTicks left. |
void |
setNoDamageTicks(int ticks)
Set the current NoDamageTicks for this entity This gets lowered every game tick, until its smaller than half the BaseNoDamageTicks it only registers any damage more than LivingEntity.getLastDamage() . |
void |
setPitch(float pitch)
Sets the entity's pitch |
void |
setRotation(float rotation)
Sets the entity's rotation |
void |
setX(double x)
Sets the entity's X |
void |
setY(double y)
Sets the entity's Y |
void |
setZ(double z)
Sets the entity's Z |
void |
teleportTo(BaseEntity ent)
Teleports to the other entity |
void |
teleportTo(double x,
double y,
double z,
float rotation,
float pitch)
Teleports to the provided location |
void |
teleportTo(Location location)
Teleports to the provided location |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BaseEntity(fe entity)
entity
- public BaseEntity()
Method Detail |
---|
public int getId()
public void teleportTo(double x, double y, double z, float rotation, float pitch)
x
- rotation
- y
- z
- pitch
- public void teleportTo(BaseEntity ent)
ent
- entity to teleport topublic void teleportTo(Location location)
location
- location to teleport topublic double getX()
public void setX(double x)
x
- x to setpublic double getY()
public void setY(double y)
y
- y to setpublic double getZ()
public void setZ(double z)
z
- z to setpublic float getPitch()
public void setPitch(float pitch)
pitch
- pitch to setpublic float getRotation()
public void setRotation(float rotation)
rotation
- rotation to setpublic fe getEntity()
public boolean isMob()
public boolean isAnimal()
public boolean isPlayer()
public boolean isLiving()
public Player getPlayer()
public int getBaseAirTicks()
public void setBaseAirTicks(int ticks)
ticks
- public int getNoDamageTicks()
LivingEntity.getLastDamage()
.
20 ticks per second.
public void setNoDamageTicks(int ticks)
LivingEntity.getLastDamage()
.
20 ticks per second.
ticks
- public int getAirTicks()
public void setAirTicks(int ticks)
public int getFireTicks()
public void setFireTicks(int ticks)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |