mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-10-25 20:22:23 +00:00
Fix overflow with XP container machines (#64)
This commit is contained in:
1 parent
88d7baef0a
commit
edc8786d79
1 file changed
+2
-1
@@ -29,7 +29,8 @@ public class ExperienceContainer extends FluidTank {
|
||||
|
||||
public ExperienceContainer(int maxStored) {
|
||||
super(null, 0);
|
||||
maxXp = maxStored;
|
||||
// enforce overflow-safe value
|
||||
maxXp = Math.min(maxStored, XpUtil.liquidToExperience(Integer.MAX_VALUE));
|
||||
}
|
||||
|
||||
public int getMaximumExperiance() {
|
||||
|
||||
Reference in new issue
Block a user