LiteLDev / LegacyScriptEngine

A plugin engine for running LLSE plugins on LeviLamina
https://lse.liteldev.com/
GNU General Public License v3.0
43 stars 8 forks source link

[Bug]: onDropItem事件异常 #110

Closed Siori51 closed 4 months ago

Siori51 commented 4 months ago

Describe the bug

拦截此事件时, 若玩家透过快捷键(如键盘的Q)丢出物品,该物品数量会减少,并无掉落物 但若是以拖出物品栏方式丢出,则无法丢出并且数量不减少(LL2当时的运作方式)

https://github.com/LiteLDev/LegacyScriptEngine/assets/36000900/629d6844-2bb8-4f9e-9c86-f80c3051b8fb

To Reproduce

监听 onDropItem 事件并拦截

mc.listen("onDropItem", () => {
    return false
})

以不同方式丢出物品即可复现

Expected behavior

无论如何丢出物品,拦截此事件后皆无法丢出,并且数量不减少

Screenshots

No response

Platform

Windows 10

BDS Version

1.20.73.01

LeviLamina Version

0.11.1

LegacyScriptEngine Version

0.6.4

Additional context

No response

ShrBox commented 4 months ago

有没有一种可能,是客户端没刷新,你拿着物品右键下方块

Siori51 commented 4 months ago

应该不是没刷新,右键任意方块也不会校正回物品 除重生锚这种可以交互的,右键都不会使物品数量变动

https://github.com/LiteLDev/LegacyScriptEngine/assets/36000900/b421a3dc-d316-4891-9f63-f455360a8192