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.Entity;

已实现的接口

Link to 已实现的接口

Entity implements the following interfaces. That means all methods defined in these interfaces are also available in Entity

Name: addTag

Return Type: boolean

ZenScript
Copy
Entity.addTag(tagName as string) as boolean
参数类型描述
参数
tagName
类型
string
描述
No Description Provided

Name: blockPosition

Return Type: BlockPos

ZenScript
Copy
// Entity.blockPosition() as BlockPos

myEntity.blockPosition();

Link to canBeCollidedWith

Name: canBeCollidedWith

Return Type: boolean

ZenScript
Copy
// Entity.canBeCollidedWith() as boolean

myEntity.canBeCollidedWith();

Name: canCollideWith

Return Type: boolean

ZenScript
Copy
Entity.canCollideWith(other as Entity) as boolean
参数类型描述
参数
other
类型
Entity
描述
No Description Provided

Name: canFreeze

Return Type: boolean

ZenScript
Copy
// Entity.canFreeze() as boolean

myEntity.canFreeze();

Name: clearFire

Return Type: void

ZenScript
Copy
// Entity.clearFire() as void

myEntity.clearFire();

Name: closerThan

Return Type: boolean

ZenScript
Copy
Entity.closerThan(other as Entity, distance as double) as boolean
参数类型描述
参数
other
类型
Entity
描述
No Description Provided
参数
distance
类型
double
描述
No Description Provided

Name: discard

Return Type: void

ZenScript
Copy
// Entity.discard() as void

myEntity.discard();

Name: distanceTo

Return Type: float

ZenScript
Copy
Entity.distanceTo(entity as Entity) as float
参数类型描述
参数
entity
类型
Entity
描述
No Description Provided

Name: distanceToSqr

Return Type: double

ZenScript
Copy
Entity.distanceToSqr(entity as Entity) as double
参数类型描述
参数
entity
类型
Entity
描述
No Description Provided

Name: distanceToSqr

Return Type: double

ZenScript
Copy
Entity.distanceToSqr(vec as Vec3) as double
参数类型描述
参数
vec
类型
Vec3
描述
No Description Provided

Name: distanceToSqr

Return Type: double

ZenScript
Copy
Entity.distanceToSqr(x as double, y as double, z as double) as double
参数类型描述
参数
x
类型
double
描述
No Description Provided
参数
y
类型
double
描述
No Description Provided
参数
z
类型
double
描述
No Description Provided

Name: ejectPassengers

Return Type: void

ZenScript
Copy
// Entity.ejectPassengers() as void

myEntity.ejectPassengers();

Link to eyeBlockPosition

Name: eyeBlockPosition

Return Type: BlockPos

ZenScript
Copy
// Entity.eyeBlockPosition() as BlockPos

myEntity.eyeBlockPosition();

Name: fireImmune

Return Type: boolean

ZenScript
Copy
// Entity.fireImmune() as boolean

myEntity.fireImmune();

Name: getAirSupply

Return Type: int

ZenScript
Copy
// Entity.getAirSupply() as int

myEntity.getAirSupply();

Name: getAllSlots

Return Type: stdlib.Iterable<ItemStack>

ZenScript
Copy
// Entity.getAllSlots() as stdlib.Iterable<ItemStack>

myEntity.getAllSlots();

Name: getArmorSlots

Return Type: stdlib.Iterable<ItemStack>

ZenScript
Copy
// Entity.getArmorSlots() as stdlib.Iterable<ItemStack>

myEntity.getArmorSlots();

Name: getBbHeight

Return Type: float

ZenScript
Copy
// Entity.getBbHeight() as float

myEntity.getBbHeight();

Name: getBbWidth

Return Type: float

ZenScript
Copy
// Entity.getBbWidth() as float

myEntity.getBbWidth();

Name: getBlockX

Return Type: int

ZenScript
Copy
// Entity.getBlockX() as int

myEntity.getBlockX();

Name: getBlockY

Return Type: int

ZenScript
Copy
// Entity.getBlockY() as int

myEntity.getBlockY();

Name: getBlockZ

Return Type: int

ZenScript
Copy
// Entity.getBlockZ() as int

myEntity.getBlockZ();

Link to getBoundingBoxForCulling

Name: getBoundingBoxForCulling

Return Type: AABB

ZenScript
Copy
// Entity.getBoundingBoxForCulling() as AABB

myEntity.getBoundingBoxForCulling();

Name: getBrightness

Return Type: float

ZenScript
Copy
// Entity.getBrightness() as float

myEntity.getBrightness();

Link to getCommandSenderWorld

Name: getCommandSenderWorld

Return Type: Level

ZenScript
Copy
// Entity.getCommandSenderWorld() as Level

myEntity.getCommandSenderWorld();

Link to getControllingPassenger

Name: getControllingPassenger

Return Type: Entity

ZenScript
Copy
// Entity.getControllingPassenger() as Entity

myEntity.getControllingPassenger();

Name: getCustomName

Return Type: Component

ZenScript
Copy
// Entity.getCustomName() as Component

myEntity.getCustomName();

Name: getData

Gets the NBT data of this Entity.

Returns: The NBT data of this Entity.
Return Type: MapData

ZenScript
Copy
// Entity.getData() as MapData

myEntity.getData();

Link to getDimensionChangingDelay

Name: getDimensionChangingDelay

Return Type: int

ZenScript
Copy
// Entity.getDimensionChangingDelay() as int

myEntity.getDimensionChangingDelay();

Name: getDirection

Return Type: Direction

ZenScript
Copy
// Entity.getDirection() as Direction

myEntity.getDirection();

Name: getDisplayName

Return Type: Component

ZenScript
Copy
// Entity.getDisplayName() as Component

myEntity.getDisplayName();

Name: getEyeHeight

Return Type: float

ZenScript
Copy
// Entity.getEyeHeight() as float

myEntity.getEyeHeight();

Name: getEyePosition

Return Type: Vec3

ZenScript
Copy
// Entity.getEyePosition() as Vec3

myEntity.getEyePosition();

Name: getEyePosition

Return Type: Vec3

ZenScript
Copy
Entity.getEyePosition(partialTicks as float) as Vec3
参数类型描述
参数
partialTicks
类型
float
描述
No Description Provided

Name: getEyeY

Return Type: double

ZenScript
Copy
// Entity.getEyeY() as double

myEntity.getEyeY();

Link to getFeetBlockState

Name: getFeetBlockState

Return Type: BlockState

ZenScript
Copy
// Entity.getFeetBlockState() as BlockState

myEntity.getFeetBlockState();

Link to getFirstPassenger

Name: getFirstPassenger

Return Type: Entity

ZenScript
Copy
// Entity.getFirstPassenger() as Entity

myEntity.getFirstPassenger();

Link to getFluidJumpThreshold

Name: getFluidJumpThreshold

Return Type: double

ZenScript
Copy
// Entity.getFluidJumpThreshold() as double

myEntity.getFluidJumpThreshold();

Name: getForward

Return Type: Vec3

ZenScript
Copy
// Entity.getForward() as Vec3

myEntity.getForward();

Name: getHandSlots

Return Type: stdlib.Iterable<ItemStack>

ZenScript
Copy
// Entity.getHandSlots() as stdlib.Iterable<ItemStack>

myEntity.getHandSlots();

Name: getLevel

Return Type: Level

ZenScript
Copy
// Entity.getLevel() as Level

myEntity.getLevel();

Name: getLookAngle

Return Type: Vec3

ZenScript
Copy
// Entity.getLookAngle() as Vec3

myEntity.getLookAngle();

Name: getMaxAirSupply

Return Type: int

ZenScript
Copy
// Entity.getMaxAirSupply() as int

myEntity.getMaxAirSupply();

Link to getMaxFallDistance

Name: getMaxFallDistance

Return Type: int

ZenScript
Copy
// Entity.getMaxFallDistance() as int

myEntity.getMaxFallDistance();

Link to getMotionDirection

Name: getMotionDirection

Return Type: Direction

ZenScript
Copy
// Entity.getMotionDirection() as Direction

myEntity.getMotionDirection();

Name: getName

Return Type: Component

ZenScript
Copy
// Entity.getName() as Component

myEntity.getName();

Name: getOnPos

Return Type: BlockPos

ZenScript
Copy
// Entity.getOnPos() as BlockPos

myEntity.getOnPos();

Name: getPassengers

Return Type: stdlib.List<Entity>

ZenScript
Copy
// Entity.getPassengers() as stdlib.List<Entity>

myEntity.getPassengers();

Link to getPercentFrozen

Name: getPercentFrozen

Return Type: float

ZenScript
Copy
// Entity.getPercentFrozen() as float

myEntity.getPercentFrozen();

Link to getPistonPushReaction

Name: getPistonPushReaction

Return Type: PushReaction

ZenScript
Copy
// Entity.getPistonPushReaction() as PushReaction

myEntity.getPistonPushReaction();

Link to getPortalWaitTime

Name: getPortalWaitTime

Return Type: int

ZenScript
Copy
// Entity.getPortalWaitTime() as int

myEntity.getPortalWaitTime();

Name: getPosition

Return Type: Vec3

ZenScript
Copy
Entity.getPosition(partialTicks as float) as Vec3
参数类型描述
参数
partialTicks
类型
float
描述
No Description Provided

Link to getRemainingFireTicks

Name: getRemainingFireTicks

Return Type: int

ZenScript
Copy
// Entity.getRemainingFireTicks() as int

myEntity.getRemainingFireTicks();

Name: getRootVehicle

Return Type: Entity

ZenScript
Copy
// Entity.getRootVehicle() as Entity

myEntity.getRootVehicle();

Name: getSoundSource

Return Type: SoundSource

ZenScript
Copy
// Entity.getSoundSource() as SoundSource

myEntity.getSoundSource();

Name: getStringUUID

Return Type: string

ZenScript
Copy
// Entity.getStringUUID() as string

myEntity.getStringUUID();

Name: getTags

Return Type: Set<string>

ZenScript
Copy
// Entity.getTags() as Set<string>

myEntity.getTags();

Name: getTeamColor

Return Type: int

ZenScript
Copy
// Entity.getTeamColor() as int

myEntity.getTeamColor();

Name: getTicksFrozen

Return Type: int

ZenScript
Copy
// Entity.getTicksFrozen() as int

myEntity.getTicksFrozen();

Link to getTicksRequiredToFreeze

Name: getTicksRequiredToFreeze

Return Type: int

ZenScript
Copy
// Entity.getTicksRequiredToFreeze() as int

myEntity.getTicksRequiredToFreeze();

Name: getType

Return Type: EntityType

ZenScript
Copy
// Entity.getType() as EntityType

myEntity.getType();

Name: getUpVector

Return Type: Vec3

ZenScript
Copy
Entity.getUpVector(partialTicks as float) as Vec3
参数类型描述
参数
partialTicks
类型
float
描述
No Description Provided

Name: getVehicle

Return Type: Entity

ZenScript
Copy
// Entity.getVehicle() as Entity

myEntity.getVehicle();

Name: getViewVector

Return Type: Vec3

ZenScript
Copy
Entity.getViewVector(partialTicks as float) as Vec3
参数类型描述
参数
partialTicks
类型
float
描述
No Description Provided

Name: getX

Return Type: double

ZenScript
Copy
// Entity.getX() as double

myEntity.getX();

Name: getX

Return Type: double

ZenScript
Copy
Entity.getX(scale as double) as double
参数类型描述
参数
scale
类型
double
描述
No Description Provided

Name: getY

Return Type: double

ZenScript
Copy
// Entity.getY() as double

myEntity.getY();

Name: getY

Return Type: double

ZenScript
Copy
Entity.getY(scale as double) as double
参数类型描述
参数
scale
类型
double
描述
No Description Provided

Name: getZ

Return Type: double

ZenScript
Copy
// Entity.getZ() as double

myEntity.getZ();

Name: getZ

Return Type: double

ZenScript
Copy
Entity.getZ(scale as double) as double
参数类型描述
参数
scale
类型
double
描述
No Description Provided

Name: hasCustomName

Return Type: boolean

ZenScript
Copy
// Entity.hasCustomName() as boolean

myEntity.hasCustomName();

Link to hasExactlyOnePlayerPassenger

Name: hasExactlyOnePlayerPassenger

Return Type: boolean

ZenScript
Copy
// Entity.hasExactlyOnePlayerPassenger() as boolean

myEntity.hasExactlyOnePlayerPassenger();

Name: hasGlowingTag

Return Type: boolean

ZenScript
Copy
// Entity.hasGlowingTag() as boolean

myEntity.hasGlowingTag();

Link to hasIndirectPassenger

Name: hasIndirectPassenger

Return Type: boolean

ZenScript
Copy
Entity.hasIndirectPassenger(entity as Entity) as boolean
参数类型描述
参数
entity
类型
Entity
描述
No Description Provided

Name: hasPassenger

Return Type: boolean

ZenScript
Copy
Entity.hasPassenger(entity as Entity) as boolean
参数类型描述
参数
entity
类型
Entity
描述
No Description Provided

Name: hasPassenger

Return Type: boolean

ZenScript
Copy
Entity.hasPassenger(predicate as Predicate<Entity>) as boolean
参数类型描述
参数
predicate
类型
Predicate<Entity>
描述
No Description Provided

Name: hurt

Return Type: boolean

ZenScript
Copy
Entity.hurt(source as DamageSource, amount as float) as boolean
参数类型描述
参数
来源
类型
DamageSource
描述
No Description Provided
参数
amount
类型
float
描述
No Description Provided

Name: isAlive

Return Type: boolean

ZenScript
Copy
// Entity.isAlive() as boolean

myEntity.isAlive();

Name: isAttackable

Return Type: boolean

ZenScript
Copy
// Entity.isAttackable() as boolean

myEntity.isAttackable();

Name: isColliding

Return Type: boolean

ZenScript
Copy
Entity.isColliding(pos as BlockPos, state as BlockState) as boolean
参数类型描述
参数
类型
BlockPos
描述
No Description Provided
参数
state
类型
BlockState
描述
No Description Provided

Name: isCrouching

Return Type: boolean

ZenScript
Copy
// Entity.isCrouching() as boolean

myEntity.isCrouching();

Link to isCurrentlyGlowing

Name: isCurrentlyGlowing

Return Type: boolean

ZenScript
Copy
// Entity.isCurrentlyGlowing() as boolean

myEntity.isCurrentlyGlowing();

Link to isCustomNameVisible

Name: isCustomNameVisible

Return Type: boolean

ZenScript
Copy
// Entity.isCustomNameVisible() as boolean

myEntity.isCustomNameVisible();

Name: isDescending

Return Type: boolean

ZenScript
Copy
// Entity.isDescending() as boolean

myEntity.isDescending();

Name: isDiscrete

Return Type: boolean

ZenScript
Copy
// Entity.isDiscrete() as boolean

myEntity.isDiscrete();

Name: isFree

Return Type: boolean

ZenScript
Copy
Entity.isFree(x as double, y as double, z as double) as boolean
参数类型描述
参数
x
类型
double
描述
No Description Provided
参数
y
类型
double
描述
No Description Provided
参数
z
类型
double
描述
No Description Provided

Name: isFullyFrozen

Return Type: boolean

ZenScript
Copy
// Entity.isFullyFrozen() as boolean

myEntity.isFullyFrozen();

Name: isInLava

Return Type: boolean

ZenScript
Copy
// Entity.isInLava() as boolean

myEntity.isInLava();

Name: isInWall

Return Type: boolean

ZenScript
Copy
// Entity.isInWall() as boolean

myEntity.isInWall();

Name: isInWater

Return Type: boolean

ZenScript
Copy
// Entity.isInWater() as boolean

myEntity.isInWater();

Link to isInWaterOrBubble

Name: isInWaterOrBubble

Return Type: boolean

ZenScript
Copy
// Entity.isInWaterOrBubble() as boolean

myEntity.isInWaterOrBubble();

Name: isInWaterOrRain

Return Type: boolean

ZenScript
Copy
// Entity.isInWaterOrRain() as boolean

myEntity.isInWaterOrRain();

Link to isInWaterRainOrBubble

Name: isInWaterRainOrBubble

Return Type: boolean

ZenScript
Copy
// Entity.isInWaterRainOrBubble() as boolean

myEntity.isInWaterRainOrBubble();

Name: isInvisible

Return Type: boolean

ZenScript
Copy
// Entity.isInvisible() as boolean

myEntity.isInvisible();

Name: isInvisibleTo

Return Type: boolean

ZenScript
Copy
Entity.isInvisibleTo(player as Player) as boolean
参数类型描述
参数
player
类型
Player
描述
No Description Provided

Name: isInvulnerable

Return Type: boolean

ZenScript
Copy
// Entity.isInvulnerable() as boolean

myEntity.isInvulnerable();

Link to isInvulnerableTo

Name: isInvulnerableTo

Return Type: boolean

ZenScript
Copy
Entity.isInvulnerableTo(source as DamageSource) as boolean
参数类型描述
参数
来源
类型
DamageSource
描述
No Description Provided

Name: isNoGravity

Return Type: boolean

ZenScript
Copy
// Entity.isNoGravity() as boolean

myEntity.isNoGravity();

Name: isOnFire

Return Type: boolean

ZenScript
Copy
// Entity.isOnFire() as boolean

myEntity.isOnFire();

Name: isOnGround

Return Type: boolean

ZenScript
Copy
// Entity.isOnGround() as boolean

myEntity.isOnGround();

Link to isOnPortalCooldown

Name: isOnPortalCooldown

Return Type: boolean

ZenScript
Copy
// Entity.isOnPortalCooldown() as boolean

myEntity.isOnPortalCooldown();

Name: isPassenger

Return Type: boolean

ZenScript
Copy
// Entity.isPassenger() as boolean

myEntity.isPassenger();

Link to isPassengerOfSameVehicle

Name: isPassengerOfSameVehicle

Return Type: boolean

ZenScript
Copy
Entity.isPassengerOfSameVehicle(entity as Entity) as boolean
参数类型描述
参数
entity
类型
Entity
描述
No Description Provided

Name: isPickable

Return Type: boolean

ZenScript
Copy
// Entity.isPickable() as boolean

myEntity.isPickable();

Name: isPushable

Return Type: boolean

ZenScript
Copy
// Entity.isPushable() as boolean

myEntity.isPushable();

Name: isPushedByFluid

Return Type: boolean

ZenScript
Copy
// Entity.isPushedByFluid() as boolean

myEntity.isPushedByFluid();

Name: isRemoved

Return Type: boolean

ZenScript
Copy
// Entity.isRemoved() as boolean

myEntity.isRemoved();

Name: isShiftKeyDown

Return Type: boolean

ZenScript
Copy
// Entity.isShiftKeyDown() as boolean

myEntity.isShiftKeyDown();

Name: isSilent

Return Type: boolean

ZenScript
Copy
// Entity.isSilent() as boolean

myEntity.isSilent();

Name: isSpectator

Return Type: boolean

ZenScript
Copy
// Entity.isSpectator() as boolean

myEntity.isSpectator();

Name: isSprinting

Return Type: boolean

ZenScript
Copy
// Entity.isSprinting() as boolean

myEntity.isSprinting();

Link to isSteppingCarefully

Name: isSteppingCarefully

Return Type: boolean

ZenScript
Copy
// Entity.isSteppingCarefully() as boolean

myEntity.isSteppingCarefully();

Link to isSuppressingBounce

Name: isSuppressingBounce

Return Type: boolean

ZenScript
Copy
// Entity.isSuppressingBounce() as boolean

myEntity.isSuppressingBounce();

Name: isSwimming

Return Type: boolean

ZenScript
Copy
// Entity.isSwimming() as boolean

myEntity.isSwimming();

Name: isUnderWater

Return Type: boolean

ZenScript
Copy
// Entity.isUnderWater() as boolean

myEntity.isUnderWater();

Name: isVehicle

Return Type: boolean

ZenScript
Copy
// Entity.isVehicle() as boolean

myEntity.isVehicle();

Link to isVisuallyCrawling

Name: isVisuallyCrawling

Return Type: boolean

ZenScript
Copy
// Entity.isVisuallyCrawling() as boolean

myEntity.isVisuallyCrawling();

Link to isVisuallySwimming

Name: isVisuallySwimming

Return Type: boolean

ZenScript
Copy
// Entity.isVisuallySwimming() as boolean

myEntity.isVisuallySwimming();

Name: kill

Return Type: void

ZenScript
Copy
// Entity.kill() as void

myEntity.kill();

Name: lavaHurt

Return Type: void

ZenScript
Copy
// Entity.lavaHurt() as void

myEntity.lavaHurt();

Name: moveRelative

Return Type: void

ZenScript
Copy
Entity.moveRelative(amount as float, relative as Vec3) as void
参数类型描述
参数
amount
类型
float
描述
No Description Provided
参数
relative
类型
Vec3
描述
No Description Provided

Name: moveTo

Return Type: void

ZenScript
Copy
Entity.moveTo(vec as Vec3) as void
参数类型描述
参数
vec
类型
Vec3
描述
No Description Provided

Name: moveTo

Return Type: void

ZenScript
Copy
Entity.moveTo(pos as BlockPos, yaw as float, pitch as float) as void
参数类型描述
参数
类型
BlockPos
描述
No Description Provided
参数
yaw
类型
float
描述
No Description Provided
参数
pitch
类型
float
描述
No Description Provided

Name: moveTo

Return Type: void

ZenScript
Copy
Entity.moveTo(x as double, y as double, z as double) as void
参数类型描述
参数
x
类型
double
描述
No Description Provided
参数
y
类型
double
描述
No Description Provided
参数
z
类型
double
描述
No Description Provided

Name: moveTo

Return Type: void

ZenScript
Copy
Entity.moveTo(x as double, y as double, z as double, yaw as float, pitch as float) as void
参数类型描述
参数
x
类型
double
描述
No Description Provided
参数
y
类型
double
描述
No Description Provided
参数
z
类型
double
描述
No Description Provided
参数
yaw
类型
float
描述
No Description Provided
参数
pitch
类型
float
描述
No Description Provided

Link to occludesVibrations

Name: occludesVibrations

Return Type: boolean

ZenScript
Copy
// Entity.occludesVibrations() as boolean

myEntity.occludesVibrations();

Name: playSound

Return Type: void

ZenScript
Copy
Entity.playSound(sound as SoundEvent, volume as float, pitch as float) as void
参数类型描述
参数
sound
类型
SoundEvent
描述
No Description Provided
参数
volume
类型
float
描述
No Description Provided
参数
pitch
类型
float
描述
No Description Provided

Name: position

Return Type: Vec3

ZenScript
Copy
// Entity.position() as Vec3

myEntity.position();

Name: positionRider

Return Type: void

ZenScript
Copy
Entity.positionRider(entity as Entity) as void
参数类型描述
参数
entity
类型
Entity
描述
No Description Provided

Name: removeTag

Return Type: boolean

ZenScript
Copy
Entity.removeTag(tagName as string) as boolean
参数类型描述
参数
tagName
类型
string
描述
No Description Provided

Name: removeVehicle

Return Type: void

ZenScript
Copy
// Entity.removeVehicle() as void

myEntity.removeVehicle();

Link to rideableUnderWater

Name: rideableUnderWater

Return Type: boolean

ZenScript
Copy
// Entity.rideableUnderWater() as boolean

myEntity.rideableUnderWater();

Name: sendMessage

Return Type: void

ZenScript
Copy
Entity.sendMessage(message as Component) as void
参数类型描述
参数
message
类型
Component
描述
No Description Provided

Name: setAirSupply

Return Type: void

ZenScript
Copy
Entity.setAirSupply(air as int) as void
参数类型描述
参数
air
类型
int
描述
No Description Provided

Name: setCustomName

Return Type: void

ZenScript
Copy
Entity.setCustomName(name as Component) as void
参数类型描述
参数
name(名称)
类型
Component
描述
No Description Provided

Link to setCustomNameVisible

Name: setCustomNameVisible

Return Type: void

ZenScript
Copy
Entity.setCustomNameVisible(visible as boolean) as void
参数类型描述
参数
visible
类型
布尔值
描述
No Description Provided

Name: setGlowingTag

Return Type: void

ZenScript
Copy
Entity.setGlowingTag(glowing as boolean) as void
参数类型描述
参数
glowing
类型
布尔值
描述
No Description Provided

Name: setInvisible

Return Type: void

ZenScript
Copy
Entity.setInvisible(invisible as boolean) as void
参数类型描述
参数
invisible
类型
布尔值
描述
No Description Provided

Name: setInvulnerable

Return Type: void

ZenScript
Copy
Entity.setInvulnerable(invulnerable as boolean) as void
参数类型描述
参数
invulnerable
类型
布尔值
描述
No Description Provided

Link to setIsInPowderSnow

Name: setIsInPowderSnow

Return Type: void

ZenScript
Copy
Entity.setIsInPowderSnow(inPowderSnow as boolean) as void
参数类型描述
参数
inPowderSnow
类型
布尔值
描述
No Description Provided

Name: setItemSlot

Return Type: void

ZenScript
Copy
Entity.setItemSlot(slot as EquipmentSlot, stack as ItemStack) as void
参数类型描述
参数
slot
类型
EquipmentSlot
描述
No Description Provided
参数
堆叠
类型
物品应用
描述
No Description Provided

Name: setNoGravity

Return Type: void

ZenScript
Copy
Entity.setNoGravity(noGravity as boolean) as void
参数类型描述
参数
noGravity
类型
布尔值
描述
No Description Provided

Name: setOldPosAndRot

Return Type: void

ZenScript
Copy
// Entity.setOldPosAndRot() as void

myEntity.setOldPosAndRot();

Name: setOnGround

Return Type: void

ZenScript
Copy
Entity.setOnGround(onGround as boolean) as void
参数类型描述
参数
onGround
类型
布尔值
描述
No Description Provided

Link to setPortalCooldown

Name: setPortalCooldown

Return Type: void

ZenScript
Copy
// Entity.setPortalCooldown() as void

myEntity.setPortalCooldown();

Name: setPos

Return Type: void

ZenScript
Copy
Entity.setPos(position as Vec3) as void
参数类型描述
参数
position
类型
Vec3
描述
No Description Provided

Name: setPos

Return Type: void

ZenScript
Copy
Entity.setPos(x as double, y as double, z as double) as void
参数类型描述
参数
x
类型
double
描述
No Description Provided
参数
y
类型
double
描述
No Description Provided
参数
z
类型
double
描述
No Description Provided

Name: setPosRaw

Return Type: void

ZenScript
Copy
Entity.setPosRaw(x as double, y as double, z as double) as void
参数类型描述
参数
x
类型
double
描述
No Description Provided
参数
y
类型
double
描述
No Description Provided
参数
z
类型
double
描述
No Description Provided

Link to setRemainingFireTicks

Name: setRemainingFireTicks

Return Type: void

ZenScript
Copy
Entity.setRemainingFireTicks(ticks as int) as void
参数类型描述
参数
ticks
类型
int
描述
No Description Provided

Link to setSecondsOnFire

Name: setSecondsOnFire

Return Type: void

ZenScript
Copy
Entity.setSecondsOnFire(seconds as int) as void
参数类型描述
参数
seconds
类型
int
描述
No Description Provided

Name: setShiftKeyDown

Return Type: void

ZenScript
Copy
Entity.setShiftKeyDown(keyDown as boolean) as void
参数类型描述
参数
keyDown
类型
布尔值
描述
No Description Provided

Name: setSilent

Return Type: void

ZenScript
Copy
Entity.setSilent(silent as boolean) as void
参数类型描述
参数
silent
类型
布尔值
描述
No Description Provided

Name: setSprinting

Return Type: void

ZenScript
Copy
Entity.setSprinting(sprinting as boolean) as void
参数类型描述
参数
sprinting
类型
布尔值
描述
No Description Provided

Name: setSwimming

Return Type: void

ZenScript
Copy
Entity.setSwimming(swimming as boolean) as void
参数类型描述
参数
swimming
类型
布尔值
描述
No Description Provided

Name: setTicksFrozen

Return Type: void

ZenScript
Copy
Entity.setTicksFrozen(ticks as int) as void
参数类型描述
参数
ticks
类型
int
描述
No Description Provided

Name: shouldShowName

Return Type: boolean

ZenScript
Copy
// Entity.shouldShowName() as boolean

myEntity.shouldShowName();

Link to showVehicleHealth

Name: showVehicleHealth

Return Type: boolean

ZenScript
Copy
// Entity.showVehicleHealth() as boolean

myEntity.showVehicleHealth();

Name: startRiding

Return Type: boolean

ZenScript
Copy
Entity.startRiding(entity as Entity) as boolean
参数类型描述
参数
entity
类型
Entity
描述
No Description Provided

Name: startRiding

Return Type: boolean

ZenScript
Copy
Entity.startRiding(entity as Entity, force as boolean) as boolean
参数类型描述
参数
entity
类型
Entity
描述
No Description Provided
参数
force
类型
布尔值
描述
No Description Provided

Name: stopRiding

Return Type: void

ZenScript
Copy
// Entity.stopRiding() as void

myEntity.stopRiding();

Name: teleportTo

Return Type: void

ZenScript
Copy
Entity.teleportTo(x as double, y as double, z as double) as void
参数类型描述
参数
x
类型
double
描述
No Description Provided
参数
y
类型
double
描述
No Description Provided
参数
z
类型
double
描述
No Description Provided

Name: turn

Return Type: void

ZenScript
Copy
Entity.turn(yaw as double, pitch as double) as void
参数类型描述
参数
yaw
类型
double
描述
No Description Provided
参数
pitch
类型
double
描述
No Description Provided

Name: unRide

Return Type: void

ZenScript
Copy
// Entity.unRide() as void

myEntity.unRide();
名称类型可获得可设置描述
名称
airSupply
类型
int
可获得
true
可设置
false
描述
No Description Provided
名称
allSlots
类型
stdlib.Iterable<ItemStack>
可获得
true
可设置
false
描述
No Description Provided
名称
armorSlots
类型
stdlib.Iterable<ItemStack>
可获得
true
可设置
false
描述
No Description Provided
名称
bbHeight
类型
float
可获得
true
可设置
false
描述
No Description Provided
名称
bbWidth
类型
float
可获得
true
可设置
false
描述
No Description Provided
名称
blockPosition
类型
BlockPos
可获得
true
可设置
false
描述
No Description Provided
名称
blockX
类型
int
可获得
true
可设置
false
描述
No Description Provided
名称
blockY
类型
int
可获得
true
可设置
false
描述
No Description Provided
名称
blockZ
类型
int
可获得
true
可设置
false
描述
No Description Provided
名称
boundingBoxForCulling
类型
AABB
可获得
true
可设置
false
描述
No Description Provided
名称
brightness
类型
float
可获得
true
可设置
false
描述
No Description Provided
名称
canBeCollidedWith #具有碰撞箱
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
canFreeze
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
commandSenderWorld
类型
Level
可获得
true
可设置
false
描述
No Description Provided
名称
controllingPassenger
类型
Entity
可获得
true
可设置
false
描述
No Description Provided
名称
customName
类型
Component
可获得
true
可设置
false
描述
No Description Provided
名称
data
类型
MapData #地图数据
可获得
true
可设置
false
描述
Gets the NBT data of this Entity.
名称
dimensionChangingDelay
类型
int
可获得
true
可设置
false
描述
No Description Provided
名称
direction
类型
Direction
可获得
true
可设置
false
描述
No Description Provided
名称
displayName
类型
Component
可获得
true
可设置
false
描述
No Description Provided
名称
eyeBlockPosition
类型
BlockPos
可获得
true
可设置
false
描述
No Description Provided
名称
eyeHeight
类型
float
可获得
true
可设置
false
描述
No Description Provided
名称
eyePosition
类型
Vec3
可获得
true
可设置
false
描述
No Description Provided
名称
eyeY
类型
double
可获得
true
可设置
false
描述
No Description Provided
名称
feetBlockState
类型
BlockState
可获得
true
可设置
false
描述
No Description Provided
名称
fireImmune
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
firstPassenger
类型
Entity
可获得
true
可设置
false
描述
No Description Provided
名称
fluidJumpThreshold
类型
double
可获得
true
可设置
false
描述
No Description Provided
名称
forward
类型
Vec3
可获得
true
可设置
false
描述
No Description Provided
名称
handSlots
类型
stdlib.Iterable<ItemStack>
可获得
true
可设置
false
描述
No Description Provided
名称
hasCustomName
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
hasExactlyOnePlayerPassenger
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
hasGlowingTag
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
isAlive
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
isAttackable
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
isCrouching
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
isCurrentlyGlowing
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
isCustomNameVisible
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
isDescending
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
isDiscrete
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
isFullyFrozen
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
isInLava
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
isInWall
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
isInWater
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
isInWaterOrBubble
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
isInWaterOrRain
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
isInWaterRainOrBubble
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
isInvisible
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
isInvulnerable
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
isNoGravity
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
isOnFire
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
isOnGround
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
isOnPortalCooldown
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
isPassenger
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
isPickable
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
isPushable
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
isPushedByFluid
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
isRemoved
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
isShiftKeyDown
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
isSilent
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
isSpectator
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
isSprinting
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
isSteppingCarefully
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
isSuppressingBounce
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
isSwimming
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
isUnderWater
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
isVehicle
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
isVisuallyCrawling
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
isVisuallySwimming
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
level
类型
Level
可获得
true
可设置
false
描述
No Description Provided
名称
lookAngle
类型
Vec3
可获得
true
可设置
false
描述
No Description Provided
名称
maxAirSupply
类型
int
可获得
true
可设置
false
描述
No Description Provided
名称
maxFallDistance
类型
int
可获得
true
可设置
false
描述
No Description Provided
名称
motionDirection
类型
Direction
可获得
true
可设置
false
描述
No Description Provided
名称
name(名称)
类型
Component
可获得
true
可设置
false
描述
No Description Provided
名称
occludesVibrations
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
onPos
类型
BlockPos
可获得
true
可设置
false
描述
No Description Provided
名称
passengers
类型
stdlib.List<Entity>
可获得
true
可设置
false
描述
No Description Provided
名称
percentFrozen
类型
float
可获得
true
可设置
false
描述
No Description Provided
名称
pistonPushReaction
类型
PushReaction
可获得
true
可设置
false
描述
No Description Provided
名称
portalWaitTime
类型
int
可获得
true
可设置
false
描述
No Description Provided
名称
position
类型
Vec3
可获得
true
可设置
false
描述
No Description Provided
名称
remainingFireTicks
类型
int
可获得
true
可设置
false
描述
No Description Provided
名称
rideableUnderWater
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
rootVehicle
类型
Entity
可获得
true
可设置
false
描述
No Description Provided
名称
shouldShowName
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
showVehicleHealth
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
soundSource
类型
SoundSource
可获得
true
可设置
false
描述
No Description Provided
名称
stringUUID
类型
string
可获得
true
可设置
false
描述
No Description Provided
名称
tags
类型
Set<string>
可获得
true
可设置
false
描述
No Description Provided
名称
teamColor
类型
int
可获得
true
可设置
false
描述
No Description Provided
名称
ticksFrozen
类型
int
可获得
true
可设置
false
描述
No Description Provided
名称
ticksRequiredToFreeze
类型
int
可获得
true
可设置
false
描述
No Description Provided
名称
类型
类型
EntityType
可获得
true
可设置
false
描述
No Description Provided
名称
vehicle
类型
Entity
可获得
true
可设置
false
描述
No Description Provided
名称
x
类型
double
可获得
true
可设置
false
描述
No Description Provided
名称
y
类型
double
可获得
true
可设置
false
描述
No Description Provided
名称
z
类型
double
可获得
true
可设置
false
描述
No Description Provided