Package de.ellpeck.rockbottom.api.entity
Class MovableWorldObject
java.lang.Object
de.ellpeck.rockbottom.api.entity.MovableWorldObject
-
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanbooleanfinal BoundingBoxdoubledoubledoubledoubleboolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanCollideWithTile(TileState state, int x, int y, TileLayer layer) abstract floatdoubledoubledoubledoubleabstract floatgetWidth()doublegetX()doublegetY()voidmove()voidonEntityCollision(Entity entity, BoundingBox thisBox, BoundingBox thisBoxMotion, BoundingBox otherBox, BoundingBox otherBoxMotion) voidonEntityIntersection(Entity entity, BoundingBox thisBox, BoundingBox thisBoxMotion, BoundingBox otherBox, BoundingBox otherBoxMotion) voidvoidonTileCollision(int x, int y, TileLayer layer, TileState state, BoundingBox objBox, BoundingBox objBoxMotion, List<BoundingBox> boxes) voidonTileIntersection(int x, int y, TileLayer layer, TileState state, BoundingBox objBox, BoundingBox objBoxMotion, List<BoundingBox> boxes) voidvoidsetBounds(double x, double y) voidsetBoundsOrigin(double x, double y) voidsetPos(double x, double y)
-
Field Details
-
currentBounds
-
world
-
motionX
public double motionX -
motionY
public double motionY -
collidedHor
public boolean collidedHor -
collidedVert
public boolean collidedVert -
onGround
public boolean onGround -
lastTickX
public double lastTickX -
lastTickY
public double lastTickY
-
-
Constructor Details
-
MovableWorldObject
-
-
Method Details
-
setPos
public void setPos(double x, double y) -
resetBounds
public void resetBounds() -
setBounds
public void setBounds(double x, double y) -
setBoundsOrigin
public void setBoundsOrigin(double x, double y) -
getX
public double getX() -
getY
public double getY() -
getOriginX
public double getOriginX() -
getOriginY
public double getOriginY() -
onPositionReset
public void onPositionReset() -
getLerpedX
public double getLerpedX() -
getLerpedY
public double getLerpedY() -
move
-
onTileCollision
@ApiInternal public void onTileCollision(int x, int y, TileLayer layer, TileState state, BoundingBox objBox, BoundingBox objBoxMotion, List<BoundingBox> boxes) -
onEntityCollision
@ApiInternal public void onEntityCollision(Entity entity, BoundingBox thisBox, BoundingBox thisBoxMotion, BoundingBox otherBox, BoundingBox otherBoxMotion) -
onTileIntersection
@ApiInternal public void onTileIntersection(int x, int y, TileLayer layer, TileState state, BoundingBox objBox, BoundingBox objBoxMotion, List<BoundingBox> boxes) -
onEntityIntersection
@ApiInternal public void onEntityIntersection(Entity entity, BoundingBox thisBox, BoundingBox thisBoxMotion, BoundingBox otherBox, BoundingBox otherBoxMotion) -
canCollideWithTile
-
getWidth
public abstract float getWidth() -
getHeight
public abstract float getHeight()
-