Fixed infinite loop when gaining mana from experience levelling

This commit is contained in:
Sollace 2022-10-13 01:06:41 +02:00
parent 3fa9f68bd8
commit c84d938a8b

View file

@ -118,10 +118,6 @@ public class ManaContainer implements MagicReserves, Tickable, NbtSerialisable {
if (diff > 0) { if (diff > 0) {
if (pony.getLevel().canLevelUp()) { if (pony.getLevel().canLevelUp()) {
xp.add(0.001F / pony.getLevel().get()); xp.add(0.001F / pony.getLevel().get());
if (xp.getPercentFill() >= 1) {
xp.set(0);
pony.getLevel().add(1);
}
} }
value = get() + diff / (1 + pony.getLevel().get()); value = get() + diff / (1 + pony.getLevel().get());