LiteLDev / LegacyScriptEngine

A plugin engine for running LLSE plugins on LeviLamina
GNU General Public License v3.0
49 stars 8 forks source link

[Bug]: 玩家对象API:reduceExperience现在只能清除当前经验条 #145

Closed luckyoldboy closed 5 months ago

luckyoldboy commented 5 months ago

Describe the bug

使用reduceExperience,无论设置多少,只会在当前经验进度条进行减少,不会越过当前等级

To Reproduce

mc.listen( / event / "onDropItem", / callback / function (player, item) { let xpall = player.getTotalExperience(); log(xpall); player.reduceExperience(10000); log(player.getTotalExperience()); } ); mc.listen( / event / "onTakeItem", / callback / function (player, entity, item) { player.addExperience(100); } );

Expected behavior

正确减少经验值

Screenshots

No response

Platform

win11

BDS Version

1.21.1

LeviLamina Version

LeviLamina-0.13.1+e58ed41f2

LegacyScriptEngine Version

0.8.0

Additional context

No response

luckyoldboy commented 5 months ago

用前image 用后 image