-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
在实体或玩家死亡很短一段时间内(例如50毫秒),使用mob.setHealth()或player.setHealth()修改血量导致异常。
生物或玩家显示死亡状态但没有被清理,玩家重生会一直卡在转圈界面。
其他开发者不一定能注意到这个问题,希望在引擎层面就阻止对刚刚死亡(血量为0)的实体或玩家血量的修改。
To Reproduce
复现代码:
mc.listen("onPlayerDie", (player, source) => {
setTimeout(() => { player.setHealth(20) }, 50);
});
mc.listen("onMobDie", (mob, source, cause) => {
setTimeout(() => { mob.setHealth(20) }, 50);
});
玩家或生物死亡都会触发异常。
Expected behavior
在引擎层面忽略对刚刚死亡(血量为0)的实体或玩家血量的修改
Screenshots
Platform
No response
BDS Version
1.21.124
LeviLamina Version
1.7.7
LegacyScriptEngine Version
0.16.1
Additional context
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
