public class Entity extends MovableWorldObject implements IAdditionalDataProvider
| Modifier and Type | Field and Description |
|---|---|
protected BoundBox |
boundingBox |
boolean |
canClimb |
int |
chunkX |
int |
chunkY |
protected boolean |
dead |
Direction |
facing |
double |
fallStartY |
boolean |
isClimbing |
boolean |
isFalling |
double |
lastX |
double |
lastY |
int |
ticksExisted |
protected java.util.UUID |
uniqueId |
collidedHor, collidedVert, motionX, motionY, onGround, world, x, y| Modifier and Type | Method and Description |
|---|---|
void |
applyMotion() |
boolean |
canCollideWith(MovableWorldObject object,
BoundBox entityBox,
BoundBox entityBoxMotion) |
boolean |
doesSave() |
boolean |
doesSync() |
DataSet |
getAdditionalData() |
BoundBox |
getBoundingBox() |
double |
getMaxInteractionDistance(IWorld world,
double mouseX,
double mouseY,
AbstractEntityPlayer player) |
DataSet |
getOrCreateAdditionalData() |
IEntityRenderer |
getRenderer() |
int |
getRenderPriority() |
int |
getSyncFrequency() |
java.util.UUID |
getUniqueId() |
boolean |
hasAdditionalData() |
boolean |
isDead() |
void |
kill() |
void |
load(DataSet set) |
void |
moveToChunk(IChunk chunk) |
void |
onCollideWithEntity(Entity otherEntity,
BoundBox thisBox,
BoundBox thisBoxMotion,
BoundBox otherBox,
BoundBox otherBoxMotion) |
void |
onCollideWithTile(int x,
int y,
TileLayer layer,
TileState state,
BoundBox entityBox,
BoundBox entityBoxMotion,
java.util.List<BoundBox> tileBoxes) |
void |
onEntityCollision(Entity entity,
BoundBox thisBox,
BoundBox thisBoxMotion,
BoundBox otherBox,
BoundBox otherBoxMotion) |
void |
onEntityIntersection(Entity entity,
BoundBox thisBox,
BoundBox thisBoxMotion,
BoundBox otherBox,
BoundBox otherBoxMotion) |
void |
onGroundHit(double fallDistance) |
boolean |
onInteractWith(AbstractEntityPlayer player,
double mouseX,
double mouseY) |
void |
onIntersectWithEntity(Entity otherEntity,
BoundBox thisBox,
BoundBox thisBoxMotion,
BoundBox otherBox,
BoundBox otherBoxMotion) |
void |
onIntersectWithTile(int x,
int y,
TileLayer layer,
TileState state,
BoundBox entityBox,
BoundBox entityBoxMotion,
java.util.List<BoundBox> tileBoxes) |
void |
onRemoveFromWorld() |
void |
onTileCollision(int x,
int y,
TileLayer layer,
TileState state,
BoundBox objBox,
BoundBox objBoxMotion,
java.util.List<BoundBox> boxes) |
void |
onTileIntersection(int x,
int y,
TileLayer layer,
TileState state,
BoundBox objBox,
BoundBox objBoxMotion,
java.util.List<BoundBox> boxes) |
void |
save(DataSet set) |
void |
setAdditionalData(DataSet set) |
void |
setDead(boolean dead) |
boolean |
shouldBeRemoved() |
boolean |
shouldRender() |
boolean |
shouldStartClimbing(int x,
int y,
TileLayer layer,
TileState state,
BoundBox entityBox,
BoundBox entityBoxMotion,
java.util.List<BoundBox> tileBoxes) |
void |
update(IGameInstance game) |
canCollideWithTile, move, setPosprotected final BoundBox boundingBox
public int chunkX
public int chunkY
public Direction facing
public int ticksExisted
public double fallStartY
public boolean isFalling
public double lastX
public double lastY
public boolean isClimbing
public boolean canClimb
protected boolean dead
protected java.util.UUID uniqueId
public Entity(IWorld world)
public java.util.UUID getUniqueId()
public IEntityRenderer getRenderer()
public void update(IGameInstance game)
public boolean doesSync()
public int getSyncFrequency()
public void applyMotion()
public boolean isDead()
public boolean shouldBeRemoved()
public void onRemoveFromWorld()
public boolean shouldRender()
public void setDead(boolean dead)
public void kill()
public int getRenderPriority()
public void onGroundHit(double fallDistance)
public BoundBox getBoundingBox()
getBoundingBox in class MovableWorldObjectpublic void moveToChunk(IChunk chunk)
public boolean hasAdditionalData()
hasAdditionalData in interface IAdditionalDataProviderpublic DataSet getAdditionalData()
getAdditionalData in interface IAdditionalDataProviderpublic void setAdditionalData(DataSet set)
setAdditionalData in interface IAdditionalDataProviderpublic DataSet getOrCreateAdditionalData()
getOrCreateAdditionalData in interface IAdditionalDataProviderpublic void save(DataSet set)
public void load(DataSet set)
public boolean doesSave()
public void onCollideWithTile(int x,
int y,
TileLayer layer,
TileState state,
BoundBox entityBox,
BoundBox entityBoxMotion,
java.util.List<BoundBox> tileBoxes)
public void onCollideWithEntity(Entity otherEntity, BoundBox thisBox, BoundBox thisBoxMotion, BoundBox otherBox, BoundBox otherBoxMotion)
public void onIntersectWithTile(int x,
int y,
TileLayer layer,
TileState state,
BoundBox entityBox,
BoundBox entityBoxMotion,
java.util.List<BoundBox> tileBoxes)
public void onIntersectWithEntity(Entity otherEntity, BoundBox thisBox, BoundBox thisBoxMotion, BoundBox otherBox, BoundBox otherBoxMotion)
public boolean onInteractWith(AbstractEntityPlayer player, double mouseX, double mouseY)
public boolean shouldStartClimbing(int x,
int y,
TileLayer layer,
TileState state,
BoundBox entityBox,
BoundBox entityBoxMotion,
java.util.List<BoundBox> tileBoxes)
public boolean canCollideWith(MovableWorldObject object, BoundBox entityBox, BoundBox entityBoxMotion)
public double getMaxInteractionDistance(IWorld world, double mouseX, double mouseY, AbstractEntityPlayer player)
public final void onTileCollision(int x,
int y,
TileLayer layer,
TileState state,
BoundBox objBox,
BoundBox objBoxMotion,
java.util.List<BoundBox> boxes)
onTileCollision in class MovableWorldObjectpublic final void onEntityCollision(Entity entity, BoundBox thisBox, BoundBox thisBoxMotion, BoundBox otherBox, BoundBox otherBoxMotion)
onEntityCollision in class MovableWorldObjectpublic final void onTileIntersection(int x,
int y,
TileLayer layer,
TileState state,
BoundBox objBox,
BoundBox objBoxMotion,
java.util.List<BoundBox> boxes)
onTileIntersection in class MovableWorldObjectpublic final void onEntityIntersection(Entity entity, BoundBox thisBox, BoundBox thisBoxMotion, BoundBox otherBox, BoundBox otherBoxMotion)
onEntityIntersection in class MovableWorldObject