public class ScriptEntity<T extends net.minecraft.entity.Entity> extends java.lang.Object implements IEntity
| Constructor and Description |
|---|
ScriptEntity(T entity) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearStoredData()
Remove all stored data
|
void |
clearTempData()
Remove all tempdata
|
void |
despawn()
Despawns this entity.
|
void |
dropItem(IItemStack item) |
void |
extinguish()
Removes fire from this entity
|
long |
getAge() |
INbt |
getAllNbt() |
int |
getBlockX() |
int |
getBlockY() |
int |
getBlockZ() |
int |
getDimension() |
int |
getEntityId() |
double |
getHeight() |
T |
getMCEntity() |
double |
getMotionX() |
double |
getMotionY() |
double |
getMotionZ() |
IEntity |
getMount() |
INbt |
getNbt() |
float |
getPitch() |
IPos |
getPos() |
IEntity |
getRider() |
float |
getRotation() |
java.lang.Object |
getStoredData(java.lang.String key) |
IEntity[] |
getSurroundingEntities(int range) |
IEntity[] |
getSurroundingEntities(int range,
int type) |
java.lang.Object |
getTempData(java.lang.String key) |
int |
getType() |
java.lang.String |
getTypeName() |
java.lang.String |
getUniqueID() |
double |
getWidth() |
IWorld |
getWorld() |
double |
getX() |
double |
getY() |
double |
getYOffset() |
double |
getZ() |
boolean |
hasCollided() |
boolean |
hasStoredData(java.lang.String key) |
boolean |
hasTempData(java.lang.String key) |
boolean |
inFire() |
boolean |
inLava() |
boolean |
inWater() |
boolean |
isAirborne() |
boolean |
isAlive() |
boolean |
isBurning() |
boolean |
isSneaking() |
boolean |
isSprinting() |
void |
knockback(int power,
float direction) |
void |
knockback(int xpower,
int ypower,
int zpower,
float direction) |
void |
playSound(java.lang.String name,
float volume,
float pitch) |
void |
removeStoredData(java.lang.String key) |
void |
removeTempData(java.lang.String key) |
void |
setBurning(int ticks) |
void |
setImmune(int ticks) |
void |
setInvisible(boolean invisible) |
void |
setMotion(double x,
double y,
double z) |
void |
setMotionX(double x) |
void |
setMotionY(double y) |
void |
setMotionZ(double z) |
void |
setMount(IEntity entity) |
void |
setNbt(INbt nbt) |
void |
setPitch(float pitch) |
void |
setPos(IPos pos) |
void |
setPosition(double x,
double y,
double z) |
void |
setRider(IEntity entity) |
void |
setRotation(float rotation) |
void |
setSneaking(boolean sneaking) |
void |
setSprinting(boolean sprinting) |
void |
setStoredData(java.lang.String key,
int[] array) |
void |
setStoredData(java.lang.String key,
java.lang.Object value)
Stored data persists through world restart.
|
void |
setTempData(java.lang.String key,
java.lang.Object value)
Tempdata gets cleared when the entity gets unloaded or the world restarts
|
void |
setX(double x) |
void |
setY(double y) |
void |
setZ(double z) |
void |
spawnParticle(IParticle entityParticle) |
void |
spawnParticle(java.lang.String directory,
int HEXcolor,
int amount,
int maxAge)
Deprecated.
|
void |
spawnParticle(java.lang.String directory,
int HEXcolor,
int amount,
int maxAge,
double x,
double y,
double z)
Deprecated.
|
void |
spawnParticle(java.lang.String directory,
int HEXcolor,
int amount,
int maxAge,
double x,
double y,
double z,
double motionX,
double motionY,
double motionZ,
float gravity)
Deprecated.
|
void |
spawnParticle(java.lang.String directory,
int HEXcolor,
int amount,
int maxAge,
double x,
double y,
double z,
double motionX,
double motionY,
double motionZ,
float gravity,
float scale1,
float scale2,
float scaleRate,
int scaleRateStart)
Deprecated.
|
void |
spawnParticle(java.lang.String directory,
int HEXcolor,
int amount,
int maxAge,
double x,
double y,
double z,
double motionX,
double motionY,
double motionZ,
float gravity,
float scale1,
float scale2,
float scaleRate,
int scaleRateStart,
float alpha1,
float alpha2,
float alphaRate,
int alphaRateStart)
Deprecated.
|
void |
spawnParticle(java.lang.String directory,
int HEXcolor,
int amount,
int maxAge,
double x,
double y,
double z,
double motionX,
double motionY,
double motionZ,
float gravity,
float scale1,
float scale2,
float scaleRate,
int scaleRateStart,
float alpha1,
float alpha2,
float alphaRate,
int alphaRateStart,
float rotation1,
float rotation2,
float rotationRate,
int rotationRateStart,
float rotationX1,
float rotationX2,
float rotationXRate,
int rotationXRateStart,
float rotationY1,
float rotationY2,
float rotationYRate,
int rotationYRateStart,
float rotationZ1,
float rotationZ2,
float rotationZRate,
int rotationZRateStart)
Deprecated.
|
void |
storeAsClone(int tab,
java.lang.String name) |
boolean |
typeOf(int type) |
public ScriptEntity(T entity)
@Deprecated
public void spawnParticle(java.lang.String directory,
int HEXcolor,
int amount,
int maxAge,
double x,
double y,
double z,
double motionX,
double motionY,
double motionZ,
float gravity,
float scale1,
float scale2,
float scaleRate,
int scaleRateStart,
float alpha1,
float alpha2,
float alphaRate,
int alphaRateStart,
float rotation1,
float rotation2,
float rotationRate,
int rotationRateStart,
float rotationX1,
float rotationX2,
float rotationXRate,
int rotationXRateStart,
float rotationY1,
float rotationY2,
float rotationYRate,
int rotationYRateStart,
float rotationZ1,
float rotationZ2,
float rotationZRate,
int rotationZRateStart)
directory - The particle's directory. Use only forward slashes when writing a directory. Example: "customnpcs:textures/particle/tail.png"HEXcolor - The particle's color as a HEX integeramount - The amount of particles to spawnmaxAge - The particle's maximum age in MC ticksx - The particle's x positiony - The particle's y positionz - The particle's z positionmotionX - The particle's speed in the x axismotionY - The particle's speed in the y axismotionZ - The particle's speed in the z axisgravity - The particle's gravityscale1 - The particle's starting scalescale2 - The particle's ending scalescaleRate - Multiplier for the particle's scale growth ratescaleRateStart - The time at which the particle begins growing/shrinkingalpha1 - The particle's starting transparencyalpha2 - The particle's ending transparencyscaleRate - Multiplier for the particle's transparency growth ratealphaRateStart - The time at which the particle begins appearing/fading@Deprecated
public void spawnParticle(java.lang.String directory,
int HEXcolor,
int amount,
int maxAge,
double x,
double y,
double z,
double motionX,
double motionY,
double motionZ,
float gravity,
float scale1,
float scale2,
float scaleRate,
int scaleRateStart,
float alpha1,
float alpha2,
float alphaRate,
int alphaRateStart)
@Deprecated
public void spawnParticle(java.lang.String directory,
int HEXcolor,
int amount,
int maxAge,
double x,
double y,
double z,
double motionX,
double motionY,
double motionZ,
float gravity,
float scale1,
float scale2,
float scaleRate,
int scaleRateStart)
@Deprecated
public void spawnParticle(java.lang.String directory,
int HEXcolor,
int amount,
int maxAge,
double x,
double y,
double z,
double motionX,
double motionY,
double motionZ,
float gravity)
@Deprecated
public void spawnParticle(java.lang.String directory,
int HEXcolor,
int amount,
int maxAge,
double x,
double y,
double z)
@Deprecated
public void spawnParticle(java.lang.String directory,
int HEXcolor,
int amount,
int maxAge)
public void spawnParticle(IParticle entityParticle)
spawnParticle in interface IEntitypublic int getEntityId()
getEntityId in interface IEntitypublic java.lang.String getUniqueID()
getUniqueID in interface IEntitypublic double getYOffset()
getYOffset in interface IEntitypublic double getWidth()
public double getHeight()
public void setX(double x)
public void setY(double y)
public void setZ(double z)
public double getMotionX()
getMotionX in interface IEntitypublic void setMotionX(double x)
setMotionX in interface IEntityx - The entities x motionpublic double getMotionY()
getMotionY in interface IEntitypublic void setMotionY(double y)
setMotionY in interface IEntityy - The entities y motionpublic double getMotionZ()
getMotionZ in interface IEntitypublic void setMotionZ(double z)
setMotionZ in interface IEntityz - The entities z motionpublic void setMotion(double x,
double y,
double z)
public boolean isAirborne()
isAirborne in interface IEntitypublic int getBlockX()
public int getBlockY()
public int getBlockZ()
public void setPosition(double x,
double y,
double z)
setPosition in interface IEntityx - The x positiony - The y positionz - The z positionpublic int getDimension()
getDimension in interface IEntitypublic IEntity[] getSurroundingEntities(int range)
getSurroundingEntities in interface IEntityrange - The search range for entities around this entitypublic IEntity[] getSurroundingEntities(int range, int type)
getSurroundingEntities in interface IEntityrange - The search range for entities around this entitytype - The EntityType you want to findpublic boolean isAlive()
public java.lang.Object getTempData(java.lang.String key)
getTempData in interface IEntitykey - Get temp data for this keypublic void setTempData(java.lang.String key,
java.lang.Object value)
setTempData in interface IEntitykey - The key for the data storedvalue - The data storedpublic boolean hasTempData(java.lang.String key)
hasTempData in interface IEntitykey - The key thats going to be tested against the temp datapublic void removeTempData(java.lang.String key)
removeTempData in interface IEntitykey - The key for the temp data to be removedpublic void clearTempData()
clearTempData in interface IEntitypublic java.lang.Object getStoredData(java.lang.String key)
getStoredData in interface IEntitykey - The key of the data to be returnedpublic void setStoredData(java.lang.String key,
java.lang.Object value)
setStoredData in interface IEntitykey - The key for the data storedvalue - The data stored. This data can be either a Number or a String. Other data is not storedpublic void setStoredData(java.lang.String key,
int[] array)
public boolean hasStoredData(java.lang.String key)
hasStoredData in interface IEntitykey - The key of the data to be checkedpublic void removeStoredData(java.lang.String key)
removeStoredData in interface IEntitykey - The key of the data to be removedpublic void clearStoredData()
clearStoredData in interface IEntitypublic long getAge()
public void despawn()
public boolean inWater()
public boolean inLava()
public boolean inFire()
public boolean isBurning()
public void setBurning(int ticks)
setBurning in interface IEntityticks - Amount of world ticks this entity will burn. 20 ticks equals 1 secondpublic void extinguish()
extinguish in interface IEntitypublic java.lang.String getTypeName()
getTypeName in interface IEntitypublic void playSound(java.lang.String name,
float volume,
float pitch)
public void dropItem(IItemStack item)
public IEntity getRider()
public void setRider(IEntity entity)
public IEntity getMount()
public void setMount(IEntity entity)
public int getType()
public boolean typeOf(int type)
public void setRotation(float rotation)
setRotation in interface IEntityrotation - The rotation to be set (0-360)public float getRotation()
getRotation in interface IEntitypublic void knockback(int power,
float direction)
public void knockback(int xpower,
int ypower,
int zpower,
float direction)
public void setInvisible(boolean invisible)
setInvisible in interface IEntitypublic void setSneaking(boolean sneaking)
setSneaking in interface IEntitypublic void setSprinting(boolean sprinting)
setSprinting in interface IEntitypublic boolean hasCollided()
hasCollided in interface IEntitypublic boolean isSneaking()
isSneaking in interface IEntitypublic boolean isSprinting()
isSprinting in interface IEntitypublic T getMCEntity()
getMCEntity in interface IEntitypublic void storeAsClone(int tab,
java.lang.String name)
storeAsClone in interface IEntity