Entity
¶
文档版本:1.21.60.21
Entity
类。script_api.mojang-minecraft.entity.description
属性¶
dimension
dimension
:Dimension
- script_api.mojang-minecraft.entity.dimension.description
headLocation
headLocation
:Location
- script_api.mojang-minecraft.entity.headlocation.description
id
id
:string
- script_api.mojang-minecraft.entity.id.description
isSneaking
isSneaking
:boolean
- script_api.mojang-minecraft.entity.issneaking.description
location
location
:Location
- script_api.mojang-minecraft.entity.location.description
nameTag
nameTag
:string
- script_api.mojang-minecraft.entity.nametag.description
rotation
rotation
:XYRotation
- script_api.mojang-minecraft.entity.rotation.description
target
target
:Entity
- script_api.mojang-minecraft.entity.target.description
velocity
velocity
:Vector
- script_api.mojang-minecraft.entity.velocity.description
viewVector
viewVector
:Vector
- script_api.mojang-minecraft.entity.viewvector.description
方法¶
addEffect
script_api.mojang-minecraft.entity.addeffect.description
effectType
:EffectType
- script_api.mojang-minecraft.entity.addeffect.effecttype.description
duration
:int32
- script_api.mojang-minecraft.entity.addeffect.duration.description
amplifier
:int32
=0
∈[0
,255
]- script_api.mojang-minecraft.entity.addeffect.amplifier.description
showParticles
:boolean
=True
- script_api.mojang-minecraft.entity.addeffect.showparticles.description
- 返回值:
void
- script_api.mojang-minecraft.entity.addeffect.return
addTag
script_api.mojang-minecraft.entity.addtag.description
tag
:string
- script_api.mojang-minecraft.entity.addtag.tag.description
- 返回值:
boolean
- script_api.mojang-minecraft.entity.addtag.return
getBlockFromViewVector
script_api.mojang-minecraft.entity.getblockfromviewvector.description
options
?:BlockRaycastOptions
=null
- script_api.mojang-minecraft.entity.getblockfromviewvector.options.description
- 返回值:
Block
|undefined
- script_api.mojang-minecraft.entity.getblockfromviewvector.return
getComponent
script_api.mojang-minecraft.entity.getcomponent.description
componentId
:string
- script_api.mojang-minecraft.entity.getcomponent.componentid.description
- 返回值:
IEntityComponent
|undefined
- script_api.mojang-minecraft.entity.getcomponent.return
getComponents
script_api.mojang-minecraft.entity.getcomponents.description
- 返回值:
IEntityComponent[]
- script_api.mojang-minecraft.entity.getcomponents.return
getDynamicProperty
script_api.mojang-minecraft.entity.getdynamicproperty.description
identifier
:string
- script_api.mojang-minecraft.entity.getdynamicproperty.identifier.description
- 返回值:
boolean
|double
|float
|Location
|string
|undefined
- script_api.mojang-minecraft.entity.getdynamicproperty.return
getEffect
script_api.mojang-minecraft.entity.geteffect.description
effectType
:EffectType
- script_api.mojang-minecraft.entity.geteffect.effecttype.description
- 返回值:
Effect
|undefined
- script_api.mojang-minecraft.entity.geteffect.return
getEntitiesFromViewVector
script_api.mojang-minecraft.entity.getentitiesfromviewvector.description
options
?:EntityRaycastOptions
=null
- script_api.mojang-minecraft.entity.getentitiesfromviewvector.options.description
- 返回值:
Entity[]
- script_api.mojang-minecraft.entity.getentitiesfromviewvector.return
getTags
script_api.mojang-minecraft.entity.gettags.description
- 返回值:
string[]
- script_api.mojang-minecraft.entity.gettags.return
hasComponent
script_api.mojang-minecraft.entity.hascomponent.description
componentId
:string
- script_api.mojang-minecraft.entity.hascomponent.componentid.description
- 返回值:
boolean
- script_api.mojang-minecraft.entity.hascomponent.return
hasTag
script_api.mojang-minecraft.entity.hastag.description
tag
:string
- script_api.mojang-minecraft.entity.hastag.tag.description
- 返回值:
boolean
- script_api.mojang-minecraft.entity.hastag.return
kill
script_api.mojang-minecraft.entity.kill.description
- 返回值:
void
- script_api.mojang-minecraft.entity.kill.return
removeDynamicProperty
script_api.mojang-minecraft.entity.removedynamicproperty.description
identifier
:string
- script_api.mojang-minecraft.entity.removedynamicproperty.identifier.description
- 返回值:
boolean
- script_api.mojang-minecraft.entity.removedynamicproperty.return
removeTag
script_api.mojang-minecraft.entity.removetag.description
tag
:string
- script_api.mojang-minecraft.entity.removetag.tag.description
- 返回值:
boolean
- script_api.mojang-minecraft.entity.removetag.return
runCommand
script_api.mojang-minecraft.entity.runcommand.description
commandString
:string
- script_api.mojang-minecraft.entity.runcommand.commandstring.description
- 返回值:
any
- script_api.mojang-minecraft.entity.runcommand.return
setDynamicProperty
script_api.mojang-minecraft.entity.setdynamicproperty.description
identifier
:string
- script_api.mojang-minecraft.entity.setdynamicproperty.identifier.description
value
:boolean
|double
|float
|Location
|string
- script_api.mojang-minecraft.entity.setdynamicproperty.value.description
- 返回值:
void
- script_api.mojang-minecraft.entity.setdynamicproperty.return
setRotation
script_api.mojang-minecraft.entity.setrotation.description
degreesX
:float
- script_api.mojang-minecraft.entity.setrotation.degreesx.description
degreesY
:float
- script_api.mojang-minecraft.entity.setrotation.degreesy.description
- 返回值:
void
- script_api.mojang-minecraft.entity.setrotation.return
setVelocity
script_api.mojang-minecraft.entity.setvelocity.description
velocity
:Vector
- script_api.mojang-minecraft.entity.setvelocity.velocity.description
- 返回值:
void
- script_api.mojang-minecraft.entity.setvelocity.return
teleport
script_api.mojang-minecraft.entity.teleport.description
teleport(location: Location, dimension: Dimension, xRotation: float, yRotation: float, keepVelocity: boolean): void
location
:Location
- script_api.mojang-minecraft.entity.teleport.location.description
dimension
:Dimension
- script_api.mojang-minecraft.entity.teleport.dimension.description
xRotation
:float
- script_api.mojang-minecraft.entity.teleport.xrotation.description
yRotation
:float
- script_api.mojang-minecraft.entity.teleport.yrotation.description
keepVelocity
:boolean
=False
- script_api.mojang-minecraft.entity.teleport.keepvelocity.description
- 返回值:
void
- script_api.mojang-minecraft.entity.teleport.return
teleportFacing
script_api.mojang-minecraft.entity.teleportfacing.description
teleportFacing(location: Location, dimension: Dimension, facingLocation: Location, keepVelocity: boolean): void
location
:Location
- script_api.mojang-minecraft.entity.teleportfacing.location.description
dimension
:Dimension
- script_api.mojang-minecraft.entity.teleportfacing.dimension.description
facingLocation
:Location
- script_api.mojang-minecraft.entity.teleportfacing.facinglocation.description
keepVelocity
:boolean
=False
- script_api.mojang-minecraft.entity.teleportfacing.keepvelocity.description
- 返回值:
void
- script_api.mojang-minecraft.entity.teleportfacing.return
triggerEvent
script_api.mojang-minecraft.entity.triggerevent.description
eventName
:string
- script_api.mojang-minecraft.entity.triggerevent.eventname.description
- 返回值:
void
- script_api.mojang-minecraft.entity.triggerevent.return