Entity Interface. Used to obtain and modify information entities' data.
Entities are everything that is freely movable in the world such as players, monsters, items on the ground any many more.

It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import.
import crafttweaker.entity.IEntity;

Extending ICommandSender

Link to extending-icommandsender

IEntity extends ICommandSender. That means that all methods that are availabel to ICommandSender Objects also are available to IEntity Objects!

Derived Methods
  • entity.displayName
  • entity.position
  • entity.world
  • entity.server
  • entity.sendMessage(String text)
GetterNameGetterMethodReturn Type (can be null)
GetterName
air
GetterMethod
getAir()
Return Type (can be null)
int
GetterName
alive
GetterMethod
isAlive()
Return Type (can be null)
布尔值
GetterName
alwaysRenderNameTag
GetterMethod
Return Type (can be null)
布尔值
GetterName
armorInventory
GetterMethod
Return Type (can be null)
List<IItemStack
GetterName
canBeAttackedWithItem #可以被物体攻击
GetterMethod
Return Type (can be null)
布尔值
GetterName
canBeCollidedWith #具有碰撞箱
GetterMethod
Return Type (can be null)
布尔值
GetterName
canPassengerSteer #可以乘坐
GetterMethod
Return Type (can be null)
布尔值
GetterName
canRiderInteract #是否可以互动
GetterMethod
Return Type (can be null)
布尔值
GetterName
controllingPassenger
GetterMethod
Return Type (can be null)
IEntity
GetterName
customName
GetterMethod
getCustomName()
Return Type (can be null)
string
GetterName
definition
GetterMethod
Return Type (can be null)
IEntityDefinition
GetterName
dimension
GetterMethod
getDimension()
Return Type (can be null)
int
GetterName
doesTriggerPressurePlate
GetterMethod
Return Type (can be null)
布尔值
GetterName
equipmentAndArmor
GetterMethod
Return Type (can be null)
List<IItemStack
GetterName
eyeHeight
GetterMethod
Return Type (can be null)
float
GetterName
hasCustomName
GetterMethod
Return Type (can be null)
布尔值
GetterName
hasNoGravity
GetterMethod
Return Type (can be null)
布尔值
GetterName
heldEquipment
GetterMethod
Return Type (can be null)
List<IItemStack
GetterName
id
GetterMethod
Return Type (can be null)
int
GetterName
immuneToFire #免疫火焰
GetterMethod
isImmuneToFire()
Return Type (can be null)
布尔值
GetterName
isBeingRidden
GetterMethod
Return Type (can be null)
布尔值
GetterName
isBoss
GetterMethod
Return Type (can be null)
布尔值
GetterName
isBurning
GetterMethod
Return Type (can be null)
布尔值
GetterName
isGlowing
GetterMethod
Return Type (can be null)
布尔值
GetterName
isImmuneToExplosions
GetterMethod
Return Type (can be null)
布尔值
GetterName
isInLava
GetterMethod
Return Type (can be null)
布尔值
GetterName
isInsideOpaqueBlock
GetterMethod
Return Type (can be null)
布尔值
GetterName
isInvisible
GetterMethod
Return Type (can be null)
布尔值
GetterName
isInvulnerable
GetterMethod
Return Type (can be null)
布尔值
GetterName
isInWater
GetterMethod
Return Type (can be null)
布尔值
GetterName
isLightningbolt
GetterMethod
Return Type (can be null)
布尔值
GetterName
isOutsideBorder
GetterMethod
Return Type (can be null)
布尔值
GetterName
isOverWater
GetterMethod
Return Type (can be null)
布尔值
GetterName
isPushedByWater
GetterMethod
Return Type (can be null)
布尔值
GetterName
isRiding
GetterMethod
Return Type (can be null)
布尔值
GetterName
isSilent
GetterMethod
Return Type (can be null)
布尔值
GetterName
isSneaking
GetterMethod
Return Type (can be null)
布尔值
GetterName
isSprinting
GetterMethod
Return Type (can be null)
布尔值
GetterName
lowestRidingEntity
GetterMethod
Return Type (can be null)
IEntity
GetterName
maxFallHeight
GetterMethod
Return Type (can be null)
int
GetterName
maxInPortalTime
GetterMethod
Return Type (can be null)
int
GetterName
onGround
GetterMethod
onGround()
Return Type (can be null)
布尔值
GetterName
parts
GetterMethod
Return Type (can be null)
IEntity[]
GetterName
passengers
GetterMethod
getPassengers()
Return Type (can be null)
List<IEntity>
GetterName
passengersRecursive
GetterMethod
Return Type (can be null)
List<IEntity>
GetterName
portalCooldowne
GetterMethod
Return Type (can be null)
int
GetterName
position3f
GetterMethod
getPosition3f()
Return Type (can be null)
Position3f
GetterName
ridingEntity
GetterMethod
getRidingEntity()
Return Type (can be null)
IEntity
GetterName
shouldRiderSit
GetterMethod
Return Type (can be null)
布尔值
GetterName
tags
GetterMethod
Return Type (can be null)
List<string>
GetterName
team
GetterMethod
Return Type (can be null)
ITeam
GetterName
wet
GetterMethod
isWet()
Return Type (can be null)
布尔值
GetterName
world
GetterMethod
Return Type (can be null)
IWorld
GetterName
x
GetterMethod
getX()
Return Type (can be null)
double
GetterName
y
GetterMethod
getY()
Return Type (can be null)
double
GetterName
z
GetterMethod
getZ()
Return Type (can be null)
double
GetterName
motionX
GetterMethod
Return Type (can be null)
double
GetterName
motionY
GetterMethod
Return Type (can be null)
double
GetterName
motionZ
GetterMethod
Return Type (can be null)
double
GetterName
posX
GetterMethod
Return Type (can be null)
double
GetterName
posY
GetterMethod
Return Type (can be null)
double
GetterName
posZ
GetterMethod
Return Type (can be null)
double
GetterName
rotationYaw
GetterMethod
Return Type (can be null)
float
GetterName
rotationPitch
GetterMethod
Return Type (can be null)
float
GetterName
lookingDirection
GetterMethod
Return Type (can be null)
IVector3d
GetterName
nbt
GetterMethod
getNBT()
Return Type (can be null)
IData #数据
GetterName
horizontalFacing
GetterMethod
gethorizontalFacing()
Return Type (can be null)
IFacing
GetterName
updateBlocked
GetterMethod
getUpdateBlocked()
Return Type (can be null)
布尔值
GetterName
inPortal
GetterMethod
getInPortal()
Return Type (can be null)
布尔值
GetterName
portalCounter
GetterMethod
getPortalCounter()
Return Type (can be null)
int
GetterName
lastPortalVec
GetterMethod
getLastPortalVec()
Return Type (can be null)
IVector3d
GetterName
lastPortalPos
GetterMethod
getLastPortalPos()
Return Type (can be null)
IBlockPos
GetterName
lastPortalDirection
GetterMethod
getLastPortalDirection()
Return Type (can be null)
IFacing
SetterNameSetterMethod参数类型
SetterName
air
SetterMethod
setAir(seconds)
参数类型
int
SetterName
alwaysRenderNameTag
SetterMethod
参数类型
布尔值
SetterName
customName
SetterMethod
setCustomName(name)
参数类型
string
SetterName
dimension
SetterMethod
setDimension(id)
参数类型
int
SetterName
fire
SetterMethod
setFire(seconds)
参数类型
int
SetterName
hasNoGravity
SetterMethod
参数类型
布尔值
SetterName
id
SetterMethod
参数类型
int
SetterName
isGlowing
SetterMethod
参数类型
布尔值
SetterName
isInvisible
SetterMethod
参数类型
布尔值
SetterName
isOutsideBorder
SetterMethod
参数类型
布尔值
SetterName
isSilent
SetterMethod
参数类型
布尔值
SetterName
isSneaking
SetterMethod
参数类型
布尔值
SetterName
isSprinting
SetterMethod
参数类型
布尔值
SetterName
position
SetterMethod
setPosition(pos)
参数类型
IBlockPos
SetterName
rotationYaw
SetterMethod
参数类型
float
SetterName
rotationPitch
SetterMethod
参数类型
float
SetterName
motionX
SetterMethod
参数类型
double
SetterName
motionY
SetterMethod
参数类型
double
SetterName
motionZ
SetterMethod
参数类型
double
SetterName
posX
SetterMethod
参数类型
double
SetterName
posY
SetterMethod
参数类型
double
SetterName
posZ
SetterMethod
参数类型
double
SetterName
nbt
SetterMethod
setNBT(data)
参数类型
IData #数据
SetterName
team
SetterMethod
setTeam(team)
参数类型
ITeam
SetterName
updateBlocked
SetterMethod
setUpdateBlocked(value)
参数类型
布尔值
SetterName
inPortal
SetterMethod
setInPortal(value)
参数类型
布尔值
SetterName
portalCounter
SetterMethod
setPortalCounter(value)
参数类型
int
SetterName
lastPortalVec
SetterMethod
setLastPortalVec(vector)
参数类型
IVector3d
SetterName
lastPortalPos
SetterMethod
setLastPortalPos(pos)
参数类型
IBlockPos
SetterName
lastPortalDirection
SetterMethod
setLastPortalDirection(direction)
参数类型
IFacing
  • boolean attackEntityFrom(IDamageSource source, float amount);
  • boolean canTrample(IWorld world, IBlockDefinition block, IBlockPos pos, float fall);
  • boolean isInsideOfMaterial(IMaterial material);
  • double getDistanceSqToEntity(entity); → Returns the distance to the given Entity
  • IItemStack getPickedResult(); → Returns the item that picking up the entity would return (e.g. the item id the entity is an item or the minecart item)
  • void addTag(String tag);
  • void extinguish(); → Extinguishes the entity, if on fire
  • void onEntityUpdate();
  • void onKillCommand();
  • void onUpdate();
  • void removeTag(String tag);
  • void setDead(); → Kills the entity
  • void spawnRunningParticles();
  • void removePassengers();
  • void dismountRidingEntity();
  • boolean isOnSameTeam(IEntity other);
  • void setInWeb();
  • void doWaterSplashEffect();
  • boolean isEntityEqual(IEntity other);
  • boolean isInvulnerableTo(IDamageSource source);
  • boolean shouldRiderDismountInWater(IEntity rider)
  • boolean boolean isPassenger(IEntity entity);
  • boolean isRidingSameEntity(IEntity other);
  • IRayTraceResult getRayTrace(double blockReachDistance, float partialTicks, @Optional boolean stopOnLiquid, @Optional boolean ignoreBlockWithoutBoundingBox, @Optional(valueBoolean = true) boolean returnLastUncollidableBlock);