public class ScriptableEntity
extends java.lang.Object
Constructor and Description |
---|
ScriptableEntity(net.minecraft.entity.Entity entity) |
Modifier and Type | Method and Description |
---|---|
void |
addVelocity(double x,
double y,
double z)
Adds velocity to the entity
|
void |
addVelocityToLookingDirection(double velocity)
Adds velocity to the entity into the direction it looks
|
void |
dropItem(int id,
int stacksize,
int md)
Drops an item at the position of the entity
|
void |
extinguish()
Removes fire from entity
|
float |
getFallDistance()
Gets the entitiy's fall distance.
|
java.lang.String |
getName()
Gets the name of the entity
|
double |
getPosX() |
double |
getPosY() |
double |
getPosZ() |
double |
getVelocityX()
Gets the x-direction velocity
|
double |
getVelocityY()
Gets the y-direction velocity
|
double |
getVelocityZ()
Gets the z-direction velocity
|
boolean |
isItem()
Checks if the entity is an item
|
boolean |
isLiving()
Checks if the entity is a living
|
boolean |
isPlayer()
Checks if the entity is a player
|
void |
move(double x,
double y,
double z)
Adds the given values to the living's position
|
void |
move(ScriptablePosition pos)
Adds the given position to the living's position
|
void |
setAir(int air)
Sets the air of the entity
|
void |
setFallDistance(float distance)
Sets the entity's fall distance which is the amount of blocks that the player has already been fallen.
|
void |
setFire(int duration)
Sets the entity on fire
|
void |
setMod(cubex2.cs2core.Mod mod) |
void |
setPosition(double x,
double y,
double z)
Sets the position of the entity
|
void |
setPosition(ScriptablePosition position)
Sets the position of the entity
|
void |
setPosX(double x)
Sets the x-position of the entity
|
void |
setPosY(double y)
Sets the y-position of the entity
|
void |
setPosZ(double z)
Sets the z-position of the entity
|
void |
setVelocity(double x,
double y,
double z)
Sets the velocity of the entity
|
void |
setVelocityToLookingDirection(double velocity)
Sets the velocity to the entity into the direction it looks
|
void |
setVelocityX(double value)
Sets the x-direction velocity
|
void |
setVelocityY(double value)
Sets the y-direction velocity
|
void |
setVelocityZ(double value)
Sets the z-direction velocity
|
void |
shear()
Shears the entity.
|
public void setMod(cubex2.cs2core.Mod mod)
public void setFire(int duration)
duration
- The duration in secondspublic void extinguish()
public void setAir(int air)
air
- public void dropItem(int id, int stacksize, int md)
id
- The item's idstacksize
- The item's stacksizemd
- The item's metadatapublic double getPosX()
public double getPosY()
public double getPosZ()
public void setPosX(double x)
x
- The x-positionpublic void setPosY(double y)
y
- The y-positionpublic void setPosZ(double z)
z
- The z-positionpublic void setPosition(double x, double y, double z)
x
- The x-positiony
- The y-positionz
- The z-positionpublic void setPosition(ScriptablePosition position)
position
- the positionpublic void move(ScriptablePosition pos)
pos
- public void move(double x, double y, double z)
x
- The x-valuey
- The y-valuez
- The z-valuepublic void addVelocityToLookingDirection(double velocity)
velocity
- The amount of velocitypublic void setVelocityToLookingDirection(double velocity)
velocity
- The amount of velocitypublic void addVelocity(double x, double y, double z)
x
- The velocity in x-directiony
- The velocity in y-directionz
- The velocity in z-directionpublic void setVelocity(double x, double y, double z)
x
- The velocity in x-directiony
- The velocity in y-directionz
- The velocity in z-directionpublic void setVelocityX(double value)
value
- The new velocitypublic void setVelocityY(double value)
value
- The new velocitypublic void setVelocityZ(double value)
value
- The new velocitypublic double getVelocityX()
public double getVelocityY()
public double getVelocityZ()
public float getFallDistance()
public void setFallDistance(float distance)
distance
- The new fall distancepublic java.lang.String getName()
public void shear()
public boolean isLiving()
public boolean isPlayer()
public boolean isItem()