LegacyScriptEngine icon indicating copy to clipboard operation
LegacyScriptEngine copied to clipboard

[Bug]: `onOpenContainerScreen` 事件无法拦截

Open reallyGoodBaker opened this issue 9 months ago • 2 comments

Describe the bug

即使在回调函数返回false, 背包也依然会打开 (使用场景是检测打开背包键)

To Reproduce

mc.listen('onOpenContainerScreen', pl => {
    return false
})

依然可以打开背包

Expected behavior

背包不应该打开

Screenshots

No response

Platform

Windows 10

BDS Version

1.21.60

LeviLamina Version

1.1.1

LegacyScriptEngine Version

0.10.2

Additional context

No response

reallyGoodBaker avatar Mar 17 '25 15:03 reallyGoodBaker

打开的背包依然可以移动物品

reallyGoodBaker avatar Mar 18 '25 03:03 reallyGoodBaker

Mojang开/Ob3导致大内联把原先的方法优化掉了,换了个不能拦截的方法,等我有空了再看看吧

ShrBox avatar Mar 20 '25 03:03 ShrBox