Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mc.runcmd在执行setblock时报错,直接执行正常 #309

Closed
dzx-dzx opened this issue Mar 17, 2022 · 4 comments
Closed

mc.runcmd在执行setblock时报错,直接执行正常 #309

dzx-dzx opened this issue Mar 17, 2022 · 4 comments
Labels
bug Related to software malfunction

Comments

@dzx-dzx
Copy link

dzx-dzx commented Mar 17, 2022

Exceptions module 异常模块

ScriptEngine 脚本引擎

Operating System 操作系统

Windows 11

LiteLoader version LiteLoader版本

2.1.3

BDS version BDS版本

1.18.12.01

What happened? 发生了什么问题?

图片
如图所示,从脚本执行命令得到区块未加载的报错,但直接执行可以成功.

Steps to reproduce? 复现此问题的步骤

No response

Relevant log output 有关的日志/输出

No response

Plugin list 插件列表

No response

@dzx-dzx dzx-dzx added the bug Related to software malfunction label Mar 17, 2022
@github-actions github-actions bot added the status: review needed Requires assessment or evaluation label Mar 17, 2022
@Jasonzyt Jasonzyt added LLSE and removed LLSE labels Mar 17, 2022
@Jasonzyt
Copy link
Member

应该和ll没有关系,你setblock的时候区块还没加载就会出现世界外问题

@github-actions github-actions bot added status: on hold Temporarily paused or delayed and removed status: review needed Requires assessment or evaluation labels Mar 17, 2022
@dzx-dzx
Copy link
Author

dzx-dzx commented Mar 17, 2022

应该和ll没有关系,你setblock的时候区块还没加载就会出现世界外问题

这两条命令执行的间隔很短。事实上它们都是在离玩家非常近的地方执行的。

@github-actions github-actions bot added status: review needed Requires assessment or evaluation and removed status: on hold Temporarily paused or delayed labels Mar 17, 2022
@dzx-dzx
Copy link
Author

dzx-dzx commented Mar 31, 2022

一个更加具体的实验:

mc.listen("onPlaceBlock", (player, block) => {
    player.runcmd("say 123")
    mc.runcmd("say 456")
    const {x,y,z}=block.pos
    player.runcmd(`setblock ${x} ${y+2} ${z} diamond_block`)
    mc.runcmd(`setblock ${x} ${y+4} ${z} diamond_block`)
    return true
})

放置方块时其正上方两格的钻石块始终可放置,但代表服务器命令的方块只有"第一次"触发时才能成功放置。
(这里的“第一次”似乎具体指的是进入新区块后的第一次。如果玩家tp到一个很远的地方,在这里的首次放置是可以成功的)

@xiaoqch
Copy link

xiaoqch commented Apr 2, 2022

已修复,如问题仍存在,请重新打开此issue

@xiaoqch xiaoqch closed this as completed Apr 2, 2022
@github-actions github-actions bot removed the status: review needed Requires assessment or evaluation label Apr 2, 2022
xiaoqch added a commit that referenced this issue Apr 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Related to software malfunction
Development

No branches or pull requests

3 participants