Closed luckyoldboy closed 5 months ago
使用reduceExperience,无论设置多少,只会在当前经验进度条进行减少,不会越过当前等级
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); } );
正确减少经验值
No response
win11
1.21.1
LeviLamina-0.13.1+e58ed41f2
0.8.0
用前 用后
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