public abstract class Entity extends MovableWorldObject implements IAdditionalDataProvider
| Modifier and Type | Class and Description |
|---|---|
static interface |
Entity.IFactory |
| Modifier and Type | Field and Description |
|---|---|
boolean |
canBreathe |
boolean |
canClimb |
boolean |
canSwim |
int |
chunkX |
int |
chunkY |
AITask |
currentAiTask |
protected boolean |
dead |
Direction |
facing |
double |
fallStartY |
double |
interpolationX |
double |
interpolationY |
boolean |
isClimbing |
boolean |
isDropping |
boolean |
isFalling |
boolean |
isFlying |
double |
lastSyncX |
double |
lastSyncY |
TileState |
submergedLiquid |
int |
ticksExisted |
collidedHor, collidedVert, currentBounds, lastTickX, lastTickY, motionX, motionY, onGround, world| Modifier and Type | Method and Description |
|---|---|
void |
addAiTask(AITask task) |
int |
addEffect(ActiveEffect effect) |
void |
applyKnockback(Entity source,
double knockback) |
void |
applyMotion() |
boolean |
canCollideWith(MovableWorldObject object,
BoundingBox entityBox,
BoundingBox entityBoxMotion) |
boolean |
doesInterpolate() |
boolean |
doesSave() |
boolean |
doesSync() |
java.util.List<ActiveEffect> |
getActiveEffects() |
ModBasedDataSet |
getAdditionalData() |
DespawnHandler |
getDespawnHandler() |
int |
getEffectModifier(IEffect effect) |
double |
getEyeHeight() |
float |
getHeight() |
int |
getInteractionPriority(AbstractEntityPlayer player,
double mouseX,
double mouseY) |
double |
getMaxInteractionDistance(IWorld world,
double mouseX,
double mouseY,
AbstractEntityPlayer player) |
ModBasedDataSet |
getOrCreateAdditionalData() |
abstract ResourceName |
getRegistryName() |
IEntityRenderer |
getRenderer() |
int |
getRenderPriority() |
int |
getSyncFrequency() |
AITask |
getTask(int id) |
int |
getTaskId(AITask task) |
java.util.UUID |
getUniqueId() |
float |
getWidth() |
boolean |
hasAdditionalData() |
boolean |
hasEffect(IEffect effect) |
boolean |
isDead() |
void |
load(DataSet set,
boolean forFullSync) |
void |
moveToChunk(IChunk chunk) |
void |
moveToWorld(IWorld world) |
boolean |
onAttack(AbstractEntityPlayer player,
double mouseX,
double mouseY,
int intendedDamage) |
void |
onCollideWithEntity(Entity otherEntity,
BoundingBox thisBox,
BoundingBox thisBoxMotion,
BoundingBox otherBox,
BoundingBox otherBoxMotion) |
void |
onCollideWithTile(int x,
int y,
TileLayer layer,
TileState state,
BoundingBox entityBox,
BoundingBox entityBoxMotion,
java.util.List<BoundingBox> tileBoxes) |
void |
onEntityCollision(Entity entity,
BoundingBox thisBox,
BoundingBox thisBoxMotion,
BoundingBox otherBox,
BoundingBox otherBoxMotion) |
void |
onEntityIntersection(Entity entity,
BoundingBox thisBox,
BoundingBox thisBoxMotion,
BoundingBox otherBox,
BoundingBox otherBoxMotion) |
void |
onGroundHit(double fallDistance) |
boolean |
onInteractWith(AbstractEntityPlayer player,
double mouseX,
double mouseY) |
boolean |
onInteractWithBreakKey(AbstractEntityPlayer player,
double mouseX,
double mouseY) |
void |
onIntersectWithEntity(Entity otherEntity,
BoundingBox thisBox,
BoundingBox thisBoxMotion,
BoundingBox otherBox,
BoundingBox otherBoxMotion) |
void |
onIntersectWithTile(int x,
int y,
TileLayer layer,
TileState state,
BoundingBox entityBox,
BoundingBox entityBoxMotion,
java.util.List<BoundingBox> tileBoxes) |
void |
onPositionReset() |
void |
onRemoveFromWorld() |
void |
onTileCollision(int x,
int y,
TileLayer layer,
TileState state,
BoundingBox objBox,
BoundingBox objBoxMotion,
java.util.List<BoundingBox> boxes) |
void |
onTileIntersection(int x,
int y,
TileLayer layer,
TileState state,
BoundingBox objBox,
BoundingBox objBoxMotion,
java.util.List<BoundingBox> boxes) |
boolean |
removeEffect(IEffect effect) |
void |
save(DataSet set,
boolean forFullSync) |
void |
sendToClients() |
void |
setAdditionalData(ModBasedDataSet set) |
void |
setDead(boolean dead) |
void |
setReadyToRemove() |
void |
setUniqueId(java.util.UUID uniqueId) |
boolean |
shouldBeFalling() |
boolean |
shouldBeRemoved() |
boolean |
shouldMakeChunkPersist(IChunk chunk) |
boolean |
shouldRender() |
boolean |
shouldStartClimbing(int x,
int y,
TileLayer layer,
TileState state,
BoundingBox entityBox,
BoundingBox entityBoxMotion,
java.util.List<BoundingBox> tileBoxes) |
void |
update(IGameInstance game) |
canCollideWithTile, getLerpedX, getLerpedY, getOriginX, getOriginY, getX, getY, move, resetBounds, setBounds, setBoundsOrigin, setPospublic int chunkX
public int chunkY
public Direction facing
public AITask currentAiTask
public int ticksExisted
public double fallStartY
public boolean isFalling
public double lastSyncX
public double lastSyncY
public boolean isClimbing
public boolean canClimb
public TileState submergedLiquid
public boolean canBreathe
public boolean canSwim
public boolean isFlying
public boolean isDropping
public double interpolationX
public double interpolationY
protected boolean dead
public Entity(IWorld world)
public abstract ResourceName getRegistryName()
public java.util.UUID getUniqueId()
public void setUniqueId(java.util.UUID uniqueId)
public IEntityRenderer getRenderer()
public void update(IGameInstance game)
public void onPositionReset()
onPositionReset in class MovableWorldObjectpublic boolean doesSync()
public int getSyncFrequency()
public boolean doesInterpolate()
public boolean shouldBeFalling()
public void applyMotion()
public boolean isDead()
public void setDead(boolean dead)
public void sendToClients()
public void setReadyToRemove()
public boolean shouldBeRemoved()
public void onRemoveFromWorld()
public boolean shouldRender()
public int getRenderPriority()
public void onGroundHit(double fallDistance)
public void moveToChunk(IChunk chunk)
public void moveToWorld(IWorld world)
public boolean hasAdditionalData()
hasAdditionalData in interface IAdditionalDataProviderpublic ModBasedDataSet getAdditionalData()
getAdditionalData in interface IAdditionalDataProviderpublic void setAdditionalData(ModBasedDataSet set)
setAdditionalData in interface IAdditionalDataProviderpublic ModBasedDataSet getOrCreateAdditionalData()
getOrCreateAdditionalData in interface IAdditionalDataProviderpublic void save(DataSet set, boolean forFullSync)
public void load(DataSet set, boolean forFullSync)
public boolean doesSave()
public void onCollideWithTile(int x,
int y,
TileLayer layer,
TileState state,
BoundingBox entityBox,
BoundingBox entityBoxMotion,
java.util.List<BoundingBox> tileBoxes)
public void onCollideWithEntity(Entity otherEntity, BoundingBox thisBox, BoundingBox thisBoxMotion, BoundingBox otherBox, BoundingBox otherBoxMotion)
public void onIntersectWithTile(int x,
int y,
TileLayer layer,
TileState state,
BoundingBox entityBox,
BoundingBox entityBoxMotion,
java.util.List<BoundingBox> tileBoxes)
public void onIntersectWithEntity(Entity otherEntity, BoundingBox thisBox, BoundingBox thisBoxMotion, BoundingBox otherBox, BoundingBox otherBoxMotion)
public boolean onInteractWith(AbstractEntityPlayer player, double mouseX, double mouseY)
public boolean onInteractWithBreakKey(AbstractEntityPlayer player, double mouseX, double mouseY)
public int getInteractionPriority(AbstractEntityPlayer player, double mouseX, double mouseY)
public boolean onAttack(AbstractEntityPlayer player, double mouseX, double mouseY, int intendedDamage)
public boolean shouldStartClimbing(int x,
int y,
TileLayer layer,
TileState state,
BoundingBox entityBox,
BoundingBox entityBoxMotion,
java.util.List<BoundingBox> tileBoxes)
public boolean canCollideWith(MovableWorldObject object, BoundingBox entityBox, BoundingBox entityBoxMotion)
public double getMaxInteractionDistance(IWorld world, double mouseX, double mouseY, AbstractEntityPlayer player)
public final void onTileCollision(int x,
int y,
TileLayer layer,
TileState state,
BoundingBox objBox,
BoundingBox objBoxMotion,
java.util.List<BoundingBox> boxes)
onTileCollision in class MovableWorldObjectpublic final void onEntityCollision(Entity entity, BoundingBox thisBox, BoundingBox thisBoxMotion, BoundingBox otherBox, BoundingBox otherBoxMotion)
onEntityCollision in class MovableWorldObjectpublic final void onTileIntersection(int x,
int y,
TileLayer layer,
TileState state,
BoundingBox objBox,
BoundingBox objBoxMotion,
java.util.List<BoundingBox> boxes)
onTileIntersection in class MovableWorldObjectpublic final void onEntityIntersection(Entity entity, BoundingBox thisBox, BoundingBox thisBoxMotion, BoundingBox otherBox, BoundingBox otherBoxMotion)
onEntityIntersection in class MovableWorldObjectpublic boolean shouldMakeChunkPersist(IChunk chunk)
public float getWidth()
getWidth in class MovableWorldObjectpublic float getHeight()
getHeight in class MovableWorldObjectpublic java.util.List<ActiveEffect> getActiveEffects()
public int addEffect(ActiveEffect effect)
public boolean removeEffect(IEffect effect)
public int getEffectModifier(IEffect effect)
public boolean hasEffect(IEffect effect)
public void addAiTask(AITask task)
public AITask getTask(int id)
public int getTaskId(AITask task)
public DespawnHandler getDespawnHandler()
public void applyKnockback(Entity source, double knockback)
public double getEyeHeight()