diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/soulNetwork/SoulNetworkHandler.java b/src/main/java/WayofTime/alchemicalWizardry/api/soulNetwork/SoulNetworkHandler.java index c99a89581..638f7495f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/soulNetwork/SoulNetworkHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/soulNetwork/SoulNetworkHandler.java @@ -280,7 +280,7 @@ public static int addCurrentEssenceToMaximum(String ownerName, int addedEssence, return 0; } - int newEss = Math.min(event.maximum, currEss + event.addedAmount); + int newEss = (int) Math.min(Integer.MAX_VALUE, Math.min(event.maximum, (long) currEss + event.addedAmount)); if (event.getResult() != Event.Result.DENY) { data.currentEssence = newEss; }