From 8fe3e9ec626c51839933b48bd12732fd54498d2a Mon Sep 17 00:00:00 2001 From: Sollace Date: Fri, 2 Sep 2022 10:36:47 +0200 Subject: [PATCH] Fix crash when levelling up --- .../minelittlepony/unicopia/entity/player/ManaContainer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/minelittlepony/unicopia/entity/player/ManaContainer.java b/src/main/java/com/minelittlepony/unicopia/entity/player/ManaContainer.java index 5daf4278..af9725c7 100644 --- a/src/main/java/com/minelittlepony/unicopia/entity/player/ManaContainer.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/player/ManaContainer.java @@ -89,8 +89,8 @@ public class ManaContainer implements MagicReserves, Tickable { if (pony.getLevel().canLevelUp()) { xp.add(diff / (float)Math.pow(1000, 1 + pony.getLevel().get())); if (xp.getPercentFill() >= 1) { - pony.getLevel().add(1); xp.set(0); + pony.getLevel().add(1); } }