Package de.ellpeck.rockbottom.api.entity
Class Entity
java.lang.Object
de.ellpeck.rockbottom.api.entity.MovableWorldObject
de.ellpeck.rockbottom.api.entity.Entity
- All Implemented Interfaces:
IAdditionalDataProvider
- Direct Known Subclasses:
AbstractBoomerangEntity,AbstractFireEntity,AbstractItemEntity,LivingEntity
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanbooleanbooleanintintprotected booleandoubledoubledoublebooleanbooleanbooleanbooleandoubledoubleintFields inherited from class de.ellpeck.rockbottom.api.entity.MovableWorldObject
collidedHor, collidedVert, currentBounds, lastTickX, lastTickY, motionX, motionY, onGround, world -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidintaddEffect(ActiveEffect effect) voidapplyKnockback(Entity source, double knockback) voidbooleancanCollideWith(MovableWorldObject object, BoundingBox entityBox, BoundingBox entityBoxMotion) booleanbooleandoesSave()booleandoesSync()DespawnHandler<? extends Entity>intgetEffectModifier(IEffect effect) doublefloatintgetInteractionPriority(AbstractPlayerEntity player, double mouseX, double mouseY) doublegetMaxInteractionDistance(IWorld world, double mouseX, double mouseY, AbstractPlayerEntity player) abstract ResourceNameIEntityRenderer<? extends Entity>intintgetTask(int id) intfloatgetWidth()booleanbooleanbooleanisDead()voidvoidmoveToChunk(IChunk chunk) voidmoveToWorld(IWorld world) booleanonAttack(AbstractPlayerEntity player, double mouseX, double mouseY, int intendedDamage) voidonCollideWithEntity(Entity otherEntity, BoundingBox thisBox, BoundingBox thisBoxMotion, BoundingBox otherBox, BoundingBox otherBoxMotion) voidonCollideWithTile(int x, int y, TileLayer layer, TileState state, BoundingBox entityBox, BoundingBox entityBoxMotion, List<BoundingBox> tileBoxes) final voidonEntityCollision(Entity entity, BoundingBox thisBox, BoundingBox thisBoxMotion, BoundingBox otherBox, BoundingBox otherBoxMotion) final voidonEntityIntersection(Entity entity, BoundingBox thisBox, BoundingBox thisBoxMotion, BoundingBox otherBox, BoundingBox otherBoxMotion) voidonGroundHit(double fallDistance) booleanonInteractWith(AbstractPlayerEntity player, double mouseX, double mouseY) booleanonInteractWithBreakKey(AbstractPlayerEntity player, double mouseX, double mouseY) voidonIntersectWithEntity(Entity otherEntity, BoundingBox thisBox, BoundingBox thisBoxMotion, BoundingBox otherBox, BoundingBox otherBoxMotion) voidonIntersectWithTile(int x, int y, TileLayer layer, TileState state, BoundingBox entityBox, BoundingBox entityBoxMotion, List<BoundingBox> tileBoxes) voidvoidfinal voidonTileCollision(int x, int y, TileLayer layer, TileState state, BoundingBox objBox, BoundingBox objBoxMotion, List<BoundingBox> boxes) final voidonTileIntersection(int x, int y, TileLayer layer, TileState state, BoundingBox objBox, BoundingBox objBoxMotion, List<BoundingBox> boxes) booleanremoveEffect(IEffect effect) voidvoidvoidvoidsetDead(boolean dead) voidvoidsetUniqueId(UUID uniqueId) booleanbooleanbooleanshouldMakeChunkPersist(IChunk chunk) booleanbooleanshouldStartClimbing(int x, int y, TileLayer layer, TileState state, BoundingBox entityBox, BoundingBox entityBoxMotion, List<BoundingBox> tileBoxes) voidupdate(IGameInstance game) Methods inherited from class de.ellpeck.rockbottom.api.entity.MovableWorldObject
canCollideWithTile, getLerpedX, getLerpedY, getOriginX, getOriginY, getX, getY, move, resetBounds, setBounds, setBoundsOrigin, setPos
-
Field Details
-
chunkX
public int chunkX -
chunkY
public int chunkY -
facing
-
currentAiTask
-
ticksExisted
public int ticksExisted -
fallStartY
public double fallStartY -
isFalling
public boolean isFalling -
lastSyncX
public double lastSyncX -
lastSyncY
public double lastSyncY -
isClimbing
public boolean isClimbing -
canClimb
public boolean canClimb -
submergedLiquid
-
canBreathe
public boolean canBreathe -
canSwim
public boolean canSwim -
isFlying
public boolean isFlying -
isDropping
public boolean isDropping -
interpolationX
public double interpolationX -
interpolationY
public double interpolationY -
dead
protected boolean dead
-
-
Constructor Details
-
Entity
-
-
Method Details
-
getRegistryName
-
getUniqueId
-
setUniqueId
-
getRenderer
-
update
-
onPositionReset
public void onPositionReset()- Overrides:
onPositionResetin classMovableWorldObject
-
doesSync
public boolean doesSync() -
getSyncFrequency
public int getSyncFrequency() -
doesInterpolate
public boolean doesInterpolate() -
shouldBeFalling
public boolean shouldBeFalling() -
applyMotion
public void applyMotion() -
isDead
public boolean isDead() -
setDead
public void setDead(boolean dead) -
sendToClients
public void sendToClients() -
setReadyToRemove
public void setReadyToRemove() -
shouldBeRemoved
public boolean shouldBeRemoved() -
onRemoveFromWorld
public void onRemoveFromWorld() -
shouldRender
public boolean shouldRender() -
getRenderPriority
public int getRenderPriority() -
onGroundHit
public void onGroundHit(double fallDistance) -
moveToChunk
-
moveToWorld
-
hasAdditionalData
public boolean hasAdditionalData()- Specified by:
hasAdditionalDatain interfaceIAdditionalDataProvider
-
getAdditionalData
- Specified by:
getAdditionalDatain interfaceIAdditionalDataProvider
-
setAdditionalData
- Specified by:
setAdditionalDatain interfaceIAdditionalDataProvider
-
getOrCreateAdditionalData
- Specified by:
getOrCreateAdditionalDatain interfaceIAdditionalDataProvider
-
save
-
load
-
doesSave
public boolean doesSave() -
onCollideWithTile
public void onCollideWithTile(int x, int y, TileLayer layer, TileState state, BoundingBox entityBox, BoundingBox entityBoxMotion, List<BoundingBox> tileBoxes) -
onCollideWithEntity
public void onCollideWithEntity(Entity otherEntity, BoundingBox thisBox, BoundingBox thisBoxMotion, BoundingBox otherBox, BoundingBox otherBoxMotion) -
onIntersectWithTile
public void onIntersectWithTile(int x, int y, TileLayer layer, TileState state, BoundingBox entityBox, BoundingBox entityBoxMotion, List<BoundingBox> tileBoxes) -
onIntersectWithEntity
public void onIntersectWithEntity(Entity otherEntity, BoundingBox thisBox, BoundingBox thisBoxMotion, BoundingBox otherBox, BoundingBox otherBoxMotion) -
onInteractWith
-
onInteractWithBreakKey
-
getInteractionPriority
-
onAttack
public boolean onAttack(AbstractPlayerEntity player, double mouseX, double mouseY, int intendedDamage) -
shouldStartClimbing
public boolean shouldStartClimbing(int x, int y, TileLayer layer, TileState state, BoundingBox entityBox, BoundingBox entityBoxMotion, List<BoundingBox> tileBoxes) -
canCollideWith
public boolean canCollideWith(MovableWorldObject object, BoundingBox entityBox, BoundingBox entityBoxMotion) -
getMaxInteractionDistance
public double getMaxInteractionDistance(IWorld world, double mouseX, double mouseY, AbstractPlayerEntity player) -
onTileCollision
public final void onTileCollision(int x, int y, TileLayer layer, TileState state, BoundingBox objBox, BoundingBox objBoxMotion, List<BoundingBox> boxes) - Overrides:
onTileCollisionin classMovableWorldObject
-
onEntityCollision
public final void onEntityCollision(Entity entity, BoundingBox thisBox, BoundingBox thisBoxMotion, BoundingBox otherBox, BoundingBox otherBoxMotion) - Overrides:
onEntityCollisionin classMovableWorldObject
-
onTileIntersection
public final void onTileIntersection(int x, int y, TileLayer layer, TileState state, BoundingBox objBox, BoundingBox objBoxMotion, List<BoundingBox> boxes) - Overrides:
onTileIntersectionin classMovableWorldObject
-
onEntityIntersection
public final void onEntityIntersection(Entity entity, BoundingBox thisBox, BoundingBox thisBoxMotion, BoundingBox otherBox, BoundingBox otherBoxMotion) - Overrides:
onEntityIntersectionin classMovableWorldObject
-
shouldMakeChunkPersist
-
getWidth
public float getWidth()- Specified by:
getWidthin classMovableWorldObject
-
getHeight
public float getHeight()- Specified by:
getHeightin classMovableWorldObject
-
getActiveEffects
-
addEffect
-
removeEffect
-
getEffectModifier
-
hasEffect
-
addAiTask
-
getTask
-
getTaskId
-
getDespawnHandler
-
applyKnockback
-
getEyeHeight
public double getEyeHeight()
-