MCEntity

Importing the class

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 at the very top of the file.

ZenScript
Copy
import crafttweaker.api.entity.MCEntity;

Methods

addTag

Return Type: boolean

ZenScript
Copy
MCEntity.addTag(tag as string) as boolean
ParameterTypeDescription
tagstringNo Description Provided
addVelocity

Return Type: void

ZenScript
Copy
MCEntity.addVelocity(x as double, y as double, z as double) as void
ParameterTypeDescription
xdoubleNo Description Provided
ydoubleNo Description Provided
zdoubleNo Description Provided
applyEntityCollision

Return Type: void

ZenScript
Copy
MCEntity.applyEntityCollision(entityIn as MCEntity) as void
ParameterTypeDescription
entityInMCEntityNo Description Provided
canSwim

Return Type: boolean

ZenScript
Copy
MCEntity.canSwim() as boolean
myMCEntity.canSwim();
changeDimension

Return Type: void

ZenScript
Copy
MCEntity.changeDimension(world as MCServerWorld) as void
ParameterTypeDescription
worldMCServerWorldNo Description Provided
extinguish

Return Type: void

ZenScript
Copy
MCEntity.extinguish() as void
myMCEntity.extinguish();
forceFireTicks

Return Type: void

ZenScript
Copy
MCEntity.forceFireTicks(ticks as int) as void
ParameterTypeDescription
ticksintNo Description Provided
forceSetPosition

Return Type: void

ZenScript
Copy
MCEntity.forceSetPosition(x as double, y as double, z as double) as void
ParameterTypeDescription
xdoubleNo Description Provided
ydoubleNo Description Provided
zdoubleNo Description Provided
getAir

Return Type: int

ZenScript
Copy
MCEntity.getAir() as int
myMCEntity.getAir();
getBrightness

Return Type: float

ZenScript
Copy
MCEntity.getBrightness() as float
myMCEntity.getBrightness();
getData

Return Type: MapData

ZenScript
Copy
MCEntity.getData() as MapData
myMCEntity.getData();
getDistance

Return Type: float

ZenScript
Copy
MCEntity.getDistance(entityIn as MCEntity) as float
ParameterTypeDescription
entityInMCEntityNo Description Provided
getDistanceSq

Return Type: double

ZenScript
Copy
MCEntity.getDistanceSq(entityIn as MCEntity) as double
ParameterTypeDescription
entityInMCEntityNo Description Provided
getDistanceSq

Return Type: double

ZenScript
Copy
MCEntity.getDistanceSq(x as double, y as double, z as double) as double
ParameterTypeDescription
xdoubleNo Description Provided
ydoubleNo Description Provided
zdoubleNo Description Provided
getEntityId

Return Type: int

ZenScript
Copy
MCEntity.getEntityId() as int
myMCEntity.getEntityId();
getFireTimer

Return Type: int

ZenScript
Copy
MCEntity.getFireTimer() as int
myMCEntity.getFireTimer();
getMaxInPortalTime

Return Type: int

ZenScript
Copy
MCEntity.getMaxInPortalTime() as int
myMCEntity.getMaxInPortalTime();
getName

Return Type: string

ZenScript
Copy
MCEntity.getName() as string
myMCEntity.getName();
getTags

Return Type: Set<string>

ZenScript
Copy
MCEntity.getTags() as Set<string>
myMCEntity.getTags();
getType

Return Type: MCEntityType

ZenScript
Copy
MCEntity.getType() as MCEntityType
myMCEntity.getType();
getUUID

Return Type: string

ZenScript
Copy
MCEntity.getUUID() as string
myMCEntity.getUUID();
getWorld

Return Type: MCWorld

ZenScript
Copy
MCEntity.getWorld() as MCWorld
myMCEntity.getWorld();
hasNoGravity

Return Type: boolean

ZenScript
Copy
MCEntity.hasNoGravity() as boolean
myMCEntity.hasNoGravity();
isEntityInRange

Return Type: boolean

ZenScript
Copy
MCEntity.isEntityInRange(entity as MCEntity, distance as double) as boolean
ParameterTypeDescription
entityMCEntityNo Description Provided
distancedoubleNo Description Provided
isImmuneToFire

Return Type: boolean

ZenScript
Copy
MCEntity.isImmuneToFire() as boolean
myMCEntity.isImmuneToFire();
isInLava

Return Type: boolean

ZenScript
Copy
MCEntity.isInLava() as boolean
myMCEntity.isInLava();
isInWater

Return Type: boolean

ZenScript
Copy
MCEntity.isInWater() as boolean
myMCEntity.isInWater();
isInWaterOrBubbleColumn

Return Type: boolean

ZenScript
Copy
MCEntity.isInWaterOrBubbleColumn() as boolean
myMCEntity.isInWaterOrBubbleColumn();
isInWaterRainOrBubbleColumn

Return Type: boolean

ZenScript
Copy
MCEntity.isInWaterRainOrBubbleColumn() as boolean
myMCEntity.isInWaterRainOrBubbleColumn();
isOffsetPositionInLiquid

Return Type: boolean

ZenScript
Copy
MCEntity.isOffsetPositionInLiquid(x as double, y as double, z as double) as boolean
ParameterTypeDescription
xdoubleNo Description Provided
ydoubleNo Description Provided
zdoubleNo Description Provided
isOnGround

Return Type: boolean

ZenScript
Copy
MCEntity.isOnGround() as boolean
myMCEntity.isOnGround();
isSilent

Return Type: boolean

ZenScript
Copy
MCEntity.isSilent() as boolean
myMCEntity.isSilent();
isSpectator

Return Type: boolean

ZenScript
Copy
MCEntity.isSpectator() as boolean
myMCEntity.isSpectator();
isWet

Return Type: boolean

ZenScript
Copy
MCEntity.isWet() as boolean
myMCEntity.isWet();
moveForced

Return Type: void

ZenScript
Copy
MCEntity.moveForced(x as double, y as double, z as double) as void
ParameterTypeDescription
xdoubleNo Description Provided
ydoubleNo Description Provided
zdoubleNo Description Provided
onCollideWithPlayer

Return Type: void

ZenScript
Copy
MCEntity.onCollideWithPlayer(entityIn as MCPlayerEntity) as void
ParameterTypeDescription
entityInMCPlayerEntityNo Description Provided
onKillCommand

Return Type: void

ZenScript
Copy
MCEntity.onKillCommand() as void
myMCEntity.onKillCommand();
onLivingFall

Return Type: boolean

ZenScript
Copy
MCEntity.onLivingFall(distance as float, damageMultiplier as float) as boolean
ParameterTypeDescription
distancefloatNo Description Provided
damageMultiplierfloatNo Description Provided
removeTag

Return Type: boolean

ZenScript
Copy
MCEntity.removeTag(tag as string) as boolean
ParameterTypeDescription
tagstringNo Description Provided
setAir

Return Type: void

ZenScript
Copy
MCEntity.setAir(air as int) as void
ParameterTypeDescription
airintNo Description Provided
setEntityId

Return Type: void

ZenScript
Copy
MCEntity.setEntityId(id as int) as void
ParameterTypeDescription
idintNo Description Provided
setFire

Return Type: void

ZenScript
Copy
MCEntity.setFire(seconds as int) as void
ParameterTypeDescription
secondsintNo Description Provided
setNoGravity

Return Type: void

ZenScript
Copy
MCEntity.setNoGravity(noGravity as boolean) as void
ParameterTypeDescription
noGravitybooleanNo Description Provided
setOnGround

Return Type: void

ZenScript
Copy
MCEntity.setOnGround(grounded as boolean) as void
ParameterTypeDescription
groundedbooleanNo Description Provided
setPosition

Return Type: void

ZenScript
Copy
MCEntity.setPosition(x as double, y as double, z as double) as void
ParameterTypeDescription
xdoubleNo Description Provided
ydoubleNo Description Provided
zdoubleNo Description Provided
setSilent

Return Type: void

ZenScript
Copy
MCEntity.setSilent(isSilent as boolean) as void
ParameterTypeDescription
isSilentbooleanNo Description Provided
teleportKeepLoaded

Teleports the entity, forcing the destination to stay loaded for a short time

Return Type: void

ZenScript
Copy
MCEntity.teleportKeepLoaded(x as double, y as double, z as double) as void
ParameterTypeDescription
xdoubleNo Description Provided
ydoubleNo Description Provided
zdoubleNo Description Provided
updateData

Return Type: void

ZenScript
Copy
MCEntity.updateData(data as MapData) as void
ParameterTypeDescription
dataMapDataNo Description Provided

Properties

NameTypeHas GetterHas Setter
airinttruetrue
dataMapDatatruefalse
facingDirectionsDirection[]truefalse
namestringtruefalse
uuidstringtruefalse
worldMCWorldtruefalse