From c2180e1ee9692803e343f81a08409a63f546f4f9 Mon Sep 17 00:00:00 2001 From: KnightMiner Date: Mon, 1 Apr 2024 07:23:56 -0400 Subject: [PATCH] Change default int loadable to use int max instead of short max Since we tend to use var int for min ranges, its not really an optimization, and it made fluid values more effort --- .../mantle/data/loadable/primitive/IntLoadable.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/slimeknights/mantle/data/loadable/primitive/IntLoadable.java b/src/main/java/slimeknights/mantle/data/loadable/primitive/IntLoadable.java index badf3bc4..de56842e 100644 --- a/src/main/java/slimeknights/mantle/data/loadable/primitive/IntLoadable.java +++ b/src/main/java/slimeknights/mantle/data/loadable/primitive/IntLoadable.java @@ -18,11 +18,11 @@ public class IntLoadable implements Loadable { public static final IntLoadable ANY_FULL = range(Integer.MIN_VALUE, Integer.MAX_VALUE); /** Loadable ranging from short min to short max */ public static final IntLoadable ANY_SHORT = range(Short.MIN_VALUE, Short.MAX_VALUE); - /** Loadable ranging from -1 to short max */ - public static final IntLoadable FROM_MINUS_ONE = min(-1); - /** Loadable ranging from zero to short max */ + /** Loadable ranging from -1 to integer max */ + public static final IntLoadable FROM_MINUS_ONE = range(-1, Short.MAX_VALUE); + /** Loadable ranging from zero to integer max */ public static final IntLoadable FROM_ZERO = min(0); - /** Loadable ranging from one to short max */ + /** Loadable ranging from one to integer max */ public static final IntLoadable FROM_ONE = min(1); /** Minimum allowed value */ @@ -39,7 +39,7 @@ public static IntLoadable range(int min, int max) { /** Creates a loadable ranging from the parameter to short max */ public static IntLoadable min(int min) { - return range(min, Short.MAX_VALUE); + return range(min, Integer.MAX_VALUE); } /** ensures the int is within valid ranges */