SimulatedPlayer
¶
文档版本:1.21.60.21
SimulatedPlayer
类,扩展自Player
。script_api.minecraft/server-gametest.simulatedplayer.description
属性¶
headRotation
headRotation
:Vector2
- script_api.minecraft/server-gametest.simulatedplayer.headrotation.description
isSprinting
isSprinting
:boolean
- script_api.minecraft/server-gametest.simulatedplayer.issprinting.description
方法¶
attack
script_api.minecraft/server-gametest.simulatedplayer.attack.description
- 返回值:
boolean
- script_api.minecraft/server-gametest.simulatedplayer.attack.return
attackEntity
script_api.minecraft/server-gametest.simulatedplayer.attackentity.description
- 返回值:
boolean
- script_api.minecraft/server-gametest.simulatedplayer.attackentity.return
breakBlock
script_api.minecraft/server-gametest.simulatedplayer.breakblock.description
blockLocation
:Vector3
- script_api.minecraft/server-gametest.simulatedplayer.breakblock.blocklocation.description
direction
:Direction
=1
- script_api.minecraft/server-gametest.simulatedplayer.breakblock.direction.description
- 返回值:
boolean
- script_api.minecraft/server-gametest.simulatedplayer.breakblock.return
chat
script_api.minecraft/server-gametest.simulatedplayer.chat.description
message
:string
- script_api.minecraft/server-gametest.simulatedplayer.chat.message.description
- 返回值:
void
- script_api.minecraft/server-gametest.simulatedplayer.chat.return
disconnect
script_api.minecraft/server-gametest.simulatedplayer.disconnect.description
- 返回值:
void
- script_api.minecraft/server-gametest.simulatedplayer.disconnect.return
dropSelectedItem
script_api.minecraft/server-gametest.simulatedplayer.dropselecteditem.description
- 返回值:
boolean
- script_api.minecraft/server-gametest.simulatedplayer.dropselecteditem.return
fly
script_api.minecraft/server-gametest.simulatedplayer.fly.description
- 返回值:
void
- script_api.minecraft/server-gametest.simulatedplayer.fly.return
giveItem
script_api.minecraft/server-gametest.simulatedplayer.giveitem.description
itemStack
:ItemStack
- script_api.minecraft/server-gametest.simulatedplayer.giveitem.itemstack.description
selectSlot
:boolean
=False
- script_api.minecraft/server-gametest.simulatedplayer.giveitem.selectslot.description
- 返回值:
boolean
- script_api.minecraft/server-gametest.simulatedplayer.giveitem.return
glide
script_api.minecraft/server-gametest.simulatedplayer.glide.description
- 返回值:
boolean
- script_api.minecraft/server-gametest.simulatedplayer.glide.return
interact
script_api.minecraft/server-gametest.simulatedplayer.interact.description
- 返回值:
boolean
- script_api.minecraft/server-gametest.simulatedplayer.interact.return
interactWithBlock
script_api.minecraft/server-gametest.simulatedplayer.interactwithblock.description
blockLocation
:Vector3
- script_api.minecraft/server-gametest.simulatedplayer.interactwithblock.blocklocation.description
direction
:Direction
=1
- script_api.minecraft/server-gametest.simulatedplayer.interactwithblock.direction.description
- 返回值:
boolean
- script_api.minecraft/server-gametest.simulatedplayer.interactwithblock.return
interactWithEntity
script_api.minecraft/server-gametest.simulatedplayer.interactwithentity.description
entity
:Entity
- script_api.minecraft/server-gametest.simulatedplayer.interactwithentity.entity.description
- 返回值:
boolean
- script_api.minecraft/server-gametest.simulatedplayer.interactwithentity.return
jump
script_api.minecraft/server-gametest.simulatedplayer.jump.description
- 返回值:
boolean
- script_api.minecraft/server-gametest.simulatedplayer.jump.return
lookAtBlock
script_api.minecraft/server-gametest.simulatedplayer.lookatblock.description
blockLocation
:Vector3
- script_api.minecraft/server-gametest.simulatedplayer.lookatblock.blocklocation.description
duration
:LookDuration
=2
- script_api.minecraft/server-gametest.simulatedplayer.lookatblock.duration.description
- 返回值:
void
- script_api.minecraft/server-gametest.simulatedplayer.lookatblock.return
lookAtEntity
script_api.minecraft/server-gametest.simulatedplayer.lookatentity.description
duration
:LookDuration
=2
- script_api.minecraft/server-gametest.simulatedplayer.lookatentity.duration.description
- 返回值:
void
- script_api.minecraft/server-gametest.simulatedplayer.lookatentity.return
lookAtLocation
script_api.minecraft/server-gametest.simulatedplayer.lookatlocation.description
location
:Vector3
- script_api.minecraft/server-gametest.simulatedplayer.lookatlocation.location.description
duration
:LookDuration
=2
- script_api.minecraft/server-gametest.simulatedplayer.lookatlocation.duration.description
- 返回值:
void
- script_api.minecraft/server-gametest.simulatedplayer.lookatlocation.return
move
script_api.minecraft/server-gametest.simulatedplayer.move.description
westEast
:float
- script_api.minecraft/server-gametest.simulatedplayer.move.westeast.description
northSouth
:float
- script_api.minecraft/server-gametest.simulatedplayer.move.northsouth.description
speed
:float
=1.0
∈[0.0
,1.0
]- script_api.minecraft/server-gametest.simulatedplayer.move.speed.description
- 返回值:
void
- script_api.minecraft/server-gametest.simulatedplayer.move.return
moveRelative
script_api.minecraft/server-gametest.simulatedplayer.moverelative.description
leftRight
:float
- script_api.minecraft/server-gametest.simulatedplayer.moverelative.leftright.description
backwardForward
:float
- script_api.minecraft/server-gametest.simulatedplayer.moverelative.backwardforward.description
speed
:float
=1.0
∈[0.0
,1.0
]- script_api.minecraft/server-gametest.simulatedplayer.moverelative.speed.description
- 返回值:
void
- script_api.minecraft/server-gametest.simulatedplayer.moverelative.return
moveToBlock
script_api.minecraft/server-gametest.simulatedplayer.movetoblock.description
blockLocation
:Vector3
- script_api.minecraft/server-gametest.simulatedplayer.movetoblock.blocklocation.description
options
?:MoveToOptions
=null
- script_api.minecraft/server-gametest.simulatedplayer.movetoblock.options.description
- 返回值:
void
- script_api.minecraft/server-gametest.simulatedplayer.movetoblock.return
moveToLocation
script_api.minecraft/server-gametest.simulatedplayer.movetolocation.description
location
:Vector3
- script_api.minecraft/server-gametest.simulatedplayer.movetolocation.location.description
options
?:MoveToOptions
=null
- script_api.minecraft/server-gametest.simulatedplayer.movetolocation.options.description
- 返回值:
void
- script_api.minecraft/server-gametest.simulatedplayer.movetolocation.return
navigateToBlock
script_api.minecraft/server-gametest.simulatedplayer.navigatetoblock.description
blockLocation
:Vector3
- script_api.minecraft/server-gametest.simulatedplayer.navigatetoblock.blocklocation.description
speed
:float
=1.0
∈[0.0
,1.0
]- script_api.minecraft/server-gametest.simulatedplayer.navigatetoblock.speed.description
navigateToEntity
script_api.minecraft/server-gametest.simulatedplayer.navigatetoentity.description
entity
:Entity
- script_api.minecraft/server-gametest.simulatedplayer.navigatetoentity.entity.description
speed
:float
=1.0
∈[0.0
,1.0
]- script_api.minecraft/server-gametest.simulatedplayer.navigatetoentity.speed.description
navigateToLocation
script_api.minecraft/server-gametest.simulatedplayer.navigatetolocation.description
location
:Vector3
- script_api.minecraft/server-gametest.simulatedplayer.navigatetolocation.location.description
speed
:float
=1.0
∈[0.0
,1.0
]- script_api.minecraft/server-gametest.simulatedplayer.navigatetolocation.speed.description
navigateToLocations
script_api.minecraft/server-gametest.simulatedplayer.navigatetolocations.description
locations
:Vector3[]
- script_api.minecraft/server-gametest.simulatedplayer.navigatetolocations.locations.description
speed
:float
=1.0
∈[0.0
,1.0
]- script_api.minecraft/server-gametest.simulatedplayer.navigatetolocations.speed.description
- 返回值:
void
- script_api.minecraft/server-gametest.simulatedplayer.navigatetolocations.return
respawn
script_api.minecraft/server-gametest.simulatedplayer.respawn.description
- 返回值:
boolean
- script_api.minecraft/server-gametest.simulatedplayer.respawn.return
rotateBody
script_api.minecraft/server-gametest.simulatedplayer.rotatebody.description
angleInDegrees
:float
- script_api.minecraft/server-gametest.simulatedplayer.rotatebody.angleindegrees.description
- 返回值:
void
- script_api.minecraft/server-gametest.simulatedplayer.rotatebody.return
setBodyRotation
script_api.minecraft/server-gametest.simulatedplayer.setbodyrotation.description
angleInDegrees
:float
- script_api.minecraft/server-gametest.simulatedplayer.setbodyrotation.angleindegrees.description
- 返回值:
void
- script_api.minecraft/server-gametest.simulatedplayer.setbodyrotation.return
setItem
script_api.minecraft/server-gametest.simulatedplayer.setitem.description
itemStack
:ItemStack
- script_api.minecraft/server-gametest.simulatedplayer.setitem.itemstack.description
slot
:int32
- script_api.minecraft/server-gametest.simulatedplayer.setitem.slot.description
selectSlot
:boolean
=False
- script_api.minecraft/server-gametest.simulatedplayer.setitem.selectslot.description
- 返回值:
boolean
- script_api.minecraft/server-gametest.simulatedplayer.setitem.return
startBuild
script_api.minecraft/server-gametest.simulatedplayer.startbuild.description
slot
:int32
=0
- script_api.minecraft/server-gametest.simulatedplayer.startbuild.slot.description
- 返回值:
void
- script_api.minecraft/server-gametest.simulatedplayer.startbuild.return
stopBreakingBlock
script_api.minecraft/server-gametest.simulatedplayer.stopbreakingblock.description
- 返回值:
void
- script_api.minecraft/server-gametest.simulatedplayer.stopbreakingblock.return
stopBuild
script_api.minecraft/server-gametest.simulatedplayer.stopbuild.description
- 返回值:
void
- script_api.minecraft/server-gametest.simulatedplayer.stopbuild.return
stopFlying
script_api.minecraft/server-gametest.simulatedplayer.stopflying.description
- 返回值:
void
- script_api.minecraft/server-gametest.simulatedplayer.stopflying.return
stopGliding
script_api.minecraft/server-gametest.simulatedplayer.stopgliding.description
- 返回值:
void
- script_api.minecraft/server-gametest.simulatedplayer.stopgliding.return
stopInteracting
script_api.minecraft/server-gametest.simulatedplayer.stopinteracting.description
- 返回值:
void
- script_api.minecraft/server-gametest.simulatedplayer.stopinteracting.return
stopMoving
script_api.minecraft/server-gametest.simulatedplayer.stopmoving.description
- 返回值:
void
- script_api.minecraft/server-gametest.simulatedplayer.stopmoving.return
stopSwimming
script_api.minecraft/server-gametest.simulatedplayer.stopswimming.description
- 返回值:
void
- script_api.minecraft/server-gametest.simulatedplayer.stopswimming.return
stopUsingItem
script_api.minecraft/server-gametest.simulatedplayer.stopusingitem.description
- 返回值:
ItemStack
|undefined
- script_api.minecraft/server-gametest.simulatedplayer.stopusingitem.return
swim
script_api.minecraft/server-gametest.simulatedplayer.swim.description
- 返回值:
void
- script_api.minecraft/server-gametest.simulatedplayer.swim.return
useItem
script_api.minecraft/server-gametest.simulatedplayer.useitem.description
itemStack
:ItemStack
- script_api.minecraft/server-gametest.simulatedplayer.useitem.itemstack.description
- 返回值:
boolean
- script_api.minecraft/server-gametest.simulatedplayer.useitem.return
useItemInSlot
script_api.minecraft/server-gametest.simulatedplayer.useiteminslot.description
slot
:int32
- script_api.minecraft/server-gametest.simulatedplayer.useiteminslot.slot.description
- 返回值:
boolean
- script_api.minecraft/server-gametest.simulatedplayer.useiteminslot.return
useItemInSlotOnBlock
script_api.minecraft/server-gametest.simulatedplayer.useiteminslotonblock.description
useItemInSlotOnBlock(slot: int32, blockLocation: Vector3, direction: Direction, faceLocation?: Vector3): boolean
slot
:int32
- script_api.minecraft/server-gametest.simulatedplayer.useiteminslotonblock.slot.description
blockLocation
:Vector3
- script_api.minecraft/server-gametest.simulatedplayer.useiteminslotonblock.blocklocation.description
direction
:Direction
=1
- script_api.minecraft/server-gametest.simulatedplayer.useiteminslotonblock.direction.description
faceLocation
?:Vector3
=null
- script_api.minecraft/server-gametest.simulatedplayer.useiteminslotonblock.facelocation.description
- 返回值:
boolean
- script_api.minecraft/server-gametest.simulatedplayer.useiteminslotonblock.return
useItemOnBlock
script_api.minecraft/server-gametest.simulatedplayer.useitemonblock.description
useItemOnBlock(itemStack: ItemStack, blockLocation: Vector3, direction: Direction, faceLocation?: Vector3): boolean
itemStack
:ItemStack
- script_api.minecraft/server-gametest.simulatedplayer.useitemonblock.itemstack.description
blockLocation
:Vector3
- script_api.minecraft/server-gametest.simulatedplayer.useitemonblock.blocklocation.description
direction
:Direction
=1
- script_api.minecraft/server-gametest.simulatedplayer.useitemonblock.direction.description
faceLocation
?:Vector3
=null
- script_api.minecraft/server-gametest.simulatedplayer.useitemonblock.facelocation.description
- 返回值:
boolean
- script_api.minecraft/server-gametest.simulatedplayer.useitemonblock.return