enum -> string
This commit is contained in:
parent
011d2828a0
commit
bc80453df3
2 changed files with 7 additions and 6 deletions
|
|
@ -15,8 +15,9 @@ public class Config {
|
||||||
public static final ForgeConfigSpec.BooleanValue SHOW_WEIGHT;
|
public static final ForgeConfigSpec.BooleanValue SHOW_WEIGHT;
|
||||||
public static final ForgeConfigSpec.BooleanValue SHOW_CHANCE;
|
public static final ForgeConfigSpec.BooleanValue SHOW_CHANCE;
|
||||||
public static final ForgeConfigSpec.BooleanValue QOL_HUNTERS_CONFLICT_RESOLUTION;
|
public static final ForgeConfigSpec.BooleanValue QOL_HUNTERS_CONFLICT_RESOLUTION;
|
||||||
public static final ForgeConfigSpec.ConfigValue<List<VaultGearTierConfig.ModifierAffixTagGroup>>
|
// string instead of enum, because forge would remove enum values that are not present in the enum
|
||||||
AFFIX_TAG_GROUP_CHANCE_BLACKLIST;
|
// (this could cause problems if mods are extending the enum - like wold's)
|
||||||
|
public static final ForgeConfigSpec.ConfigValue<List<String>> AFFIX_TAG_GROUP_CHANCE_BLACKLIST;
|
||||||
|
|
||||||
|
|
||||||
static {
|
static {
|
||||||
|
|
@ -31,13 +32,13 @@ public class Config {
|
||||||
.defineInRange("buttonPositionX", 5, Integer.MIN_VALUE, Integer.MAX_VALUE);
|
.defineInRange("buttonPositionX", 5, Integer.MIN_VALUE, Integer.MAX_VALUE);
|
||||||
|
|
||||||
BUTTON_Y = builder
|
BUTTON_Y = builder
|
||||||
.comment("y position of the button")
|
.comment("y position of the button (109 default, 130 for QOL Hunters)")
|
||||||
.defineInRange("buttonPositionY", 109, Integer.MIN_VALUE, Integer.MAX_VALUE);
|
.defineInRange("buttonPositionY", 109, Integer.MIN_VALUE, Integer.MAX_VALUE);
|
||||||
builder.pop();
|
builder.pop();
|
||||||
|
|
||||||
builder.push("DEBUG");
|
builder.push("DEBUG");
|
||||||
QOL_HUNTERS_CONFLICT_RESOLUTION = builder
|
QOL_HUNTERS_CONFLICT_RESOLUTION = builder
|
||||||
.comment("QOL Hunters conflict resolution")
|
.comment("QOL Hunters conflict resolution (shouldn't be disabled unless it causes issues)")
|
||||||
.define("QOLHuntersConflictResolution", true);
|
.define("QOLHuntersConflictResolution", true);
|
||||||
builder.pop();
|
builder.pop();
|
||||||
|
|
||||||
|
|
@ -59,7 +60,7 @@ public class Config {
|
||||||
|
|
||||||
AFFIX_TAG_GROUP_CHANCE_BLACKLIST = builder
|
AFFIX_TAG_GROUP_CHANCE_BLACKLIST = builder
|
||||||
.comment("vhcir won't show chance/weight for affixes in these groups")
|
.comment("vhcir won't show chance/weight for affixes in these groups")
|
||||||
.define("affixTagGroupBlacklist", List.of(VaultGearTierConfig.ModifierAffixTagGroup.BASE_ATTRIBUTES, VaultGearTierConfig.ModifierAffixTagGroup.CRAFTED_PREFIX, VaultGearTierConfig.ModifierAffixTagGroup.CRAFTED_SUFFIX));
|
.define("affixTagGroupBlacklist", List.of(VaultGearTierConfig.ModifierAffixTagGroup.BASE_ATTRIBUTES.name(), VaultGearTierConfig.ModifierAffixTagGroup.CRAFTED_PREFIX.name(), VaultGearTierConfig.ModifierAffixTagGroup.CRAFTED_SUFFIX.name()));
|
||||||
|
|
||||||
SPEC = builder.build();
|
SPEC = builder.build();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -343,6 +343,6 @@ public class Modifiers {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean shouldShowWeight(ModifierCategory modifierCategory, VaultGearTierConfig.ModifierAffixTagGroup affixTagGroup) {
|
private static boolean shouldShowWeight(ModifierCategory modifierCategory, VaultGearTierConfig.ModifierAffixTagGroup affixTagGroup) {
|
||||||
return modifierCategory == ModifierCategory.NORMAL && !Config.AFFIX_TAG_GROUP_CHANCE_BLACKLIST.get().contains(affixTagGroup);
|
return modifierCategory == ModifierCategory.NORMAL && !Config.AFFIX_TAG_GROUP_CHANCE_BLACKLIST.get().contains(affixTagGroup.name());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue