add config to override max lvl
This commit is contained in:
parent
26ef291de4
commit
f1ff16506a
2 changed files with 9 additions and 1 deletions
|
|
@ -9,13 +9,14 @@ public class Config {
|
||||||
public static final ForgeConfigSpec.IntValue BUTTON_X;
|
public static final ForgeConfigSpec.IntValue BUTTON_X;
|
||||||
public static final ForgeConfigSpec.IntValue BUTTON_Y;
|
public static final ForgeConfigSpec.IntValue BUTTON_Y;
|
||||||
public static final ForgeConfigSpec.BooleanValue COMBINE_LVL_TO_ABILITIES;
|
public static final ForgeConfigSpec.BooleanValue COMBINE_LVL_TO_ABILITIES;
|
||||||
|
public static final ForgeConfigSpec.IntValue MAX_LEVEL_OVERRIDE;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
ForgeConfigSpec.Builder builder = new ForgeConfigSpec.Builder();
|
ForgeConfigSpec.Builder builder = new ForgeConfigSpec.Builder();
|
||||||
|
|
||||||
COMBINE_LVL_TO_ABILITIES = builder
|
COMBINE_LVL_TO_ABILITIES = builder
|
||||||
.comment("combine +lvl to abilities into one row")
|
.comment("combine +lvl to abilities into one row")
|
||||||
.define("combineLvlToAbilities", true);
|
.define("combineAddedLvlToAbilities", true);
|
||||||
|
|
||||||
builder.push("BUTTON");
|
builder.push("BUTTON");
|
||||||
VAULT_SCREEN_BUTTON = builder
|
VAULT_SCREEN_BUTTON = builder
|
||||||
|
|
@ -33,6 +34,9 @@ public class Config {
|
||||||
ALLOW_DUPE = builder
|
ALLOW_DUPE = builder
|
||||||
.comment("allow duplicate modifiers")
|
.comment("allow duplicate modifiers")
|
||||||
.define("allowDupe", false);
|
.define("allowDupe", false);
|
||||||
|
MAX_LEVEL_OVERRIDE = builder
|
||||||
|
.comment("override max level")
|
||||||
|
.defineInRange("maxLevelOverride", -1, -1, Integer.MAX_VALUE);
|
||||||
builder.pop();
|
builder.pop();
|
||||||
|
|
||||||
SPEC = builder.build();
|
SPEC = builder.build();
|
||||||
|
|
|
||||||
|
|
@ -188,6 +188,10 @@ public class GearModifierScreen extends AbstractElementScreen {
|
||||||
ScreenLayout.requestLayout();
|
ScreenLayout.requestLayout();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (lvl <= Config.MAX_LEVEL_OVERRIDE.get() && lvl >= 0) {
|
||||||
|
ScreenLayout.requestLayout();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue