-
Notifications
You must be signed in to change notification settings - Fork 1
Home
orange233 edited this page Dec 8, 2022
·
10 revisions
文档持续改进中
数组数据,使用循环 loop-index
[co] perform lookup " +
"[in %-timespan%] " +
"[with restrict user[s] %-strings%] " +
"[with exclude user[s] %-strings%] " +
"[with restrict block[s] %-objects%] " +
"[with exclude block[s] %-objects%] " +
"[with action[s] %-integers%] " +
"in %integer% " +
"of %location%"
示例:
set {_log::*} to co block lookup in 1 day of command sender's target block # 必须有数组变量来接收结果
提醒:此方法获取的结果不存在world name
[co] log %player%('[s] chat| chat[ted]) %string%
例子:
set {_r} to co log player's chat r8r8r8 # 必须有数组变量来接收结果
返回值:boolean
[co] log %string%('[s] placement| place[d]) %material% with %blockdata% (of|at) %location%")
例子:
set {_r} to co log
从lookpup中获得的数组不能直接被读取,需要通过下面的表达式获得结果
[the] action[ ]id of %coresult%"
结果:1 结果:0
[the] action[ ]string of %coresult%
结果:place 结果:break
[the] block[ ]data of %coresult%
示例
if block data of {_log::%loop-index%} exist: #不能使用is set <-这是一个错误,已在新版本中修复
set {_blockdata} to block data of {_log::%loop-index%}
else:
set {_blockdata} to "null"