mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-13 16:54:06 +00:00
Force remap potion IDs if they go out of bounds. Closes #525
This commit is contained in:
1 parent
4f7c05e3b6
commit
affaf1cd68
1 file changed
+12
-6
@@ -59,11 +59,11 @@ public final class ConfigHandler {
|
||||
public static int flowerQuantity = 2;
|
||||
public static int flowerDensity = 16;
|
||||
|
||||
public static int potionIDSoulCross = 191;
|
||||
public static int potionIDFeatherfeet = 192;
|
||||
public static int potionIDEmptiness = 193;
|
||||
public static int potionIDBloodthirst = 194;
|
||||
public static int potionIDAllure = 195;
|
||||
public static int potionIDSoulCross = 91;
|
||||
public static int potionIDFeatherfeet = 92;
|
||||
public static int potionIDEmptiness = 93;
|
||||
public static int potionIDBloodthirst = 94;
|
||||
public static int potionIDAllure = 95;
|
||||
|
||||
public static void loadConfig(File configFile) {
|
||||
config = new Configuration(configFile);
|
||||
@@ -198,7 +198,13 @@ public final class ConfigHandler {
|
||||
|
||||
public static int loadPropPotionId(String propName, int default_) {
|
||||
Property prop = config.get(CATEGORY_POTIONS, propName, default_);
|
||||
return prop.getInt(default_);
|
||||
int val = prop.getInt(default_);
|
||||
if(val > 127) {
|
||||
val = default_;
|
||||
prop.set(default_);
|
||||
}
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
public static class ChangeListener {
|
||||
|
||||
Reference in new issue
Block a user