diff --git a/src/main/java/com/radimous/vhatcaniroll/Config.java b/src/main/java/com/radimous/vhatcaniroll/Config.java index 043a037..a40337d 100644 --- a/src/main/java/com/radimous/vhatcaniroll/Config.java +++ b/src/main/java/com/radimous/vhatcaniroll/Config.java @@ -1,7 +1,10 @@ package com.radimous.vhatcaniroll; +import iskallia.vault.config.gear.VaultGearTierConfig; import net.minecraftforge.common.ForgeConfigSpec; +import java.util.List; + public class Config { public static final ForgeConfigSpec SPEC; public static final ForgeConfigSpec.BooleanValue VAULT_SCREEN_BUTTON; @@ -12,6 +15,8 @@ public class Config { public static final ForgeConfigSpec.BooleanValue SHOW_WEIGHT; public static final ForgeConfigSpec.BooleanValue SHOW_CHANCE; public static final ForgeConfigSpec.BooleanValue QOL_HUNTERS_CONFLICT_RESOLUTION; + public static final ForgeConfigSpec.ConfigValue> + AFFIX_TAG_GROUP_CHANCE_BLACKLIST; static { @@ -51,6 +56,11 @@ public class Config { SHOW_CHANCE = builder .comment("show chance") .define("showChance", true); + + AFFIX_TAG_GROUP_CHANCE_BLACKLIST = builder + .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)); + SPEC = builder.build(); } } diff --git a/src/main/java/com/radimous/vhatcaniroll/logic/Modifiers.java b/src/main/java/com/radimous/vhatcaniroll/logic/Modifiers.java index 1f4085c..744f798 100644 --- a/src/main/java/com/radimous/vhatcaniroll/logic/Modifiers.java +++ b/src/main/java/com/radimous/vhatcaniroll/logic/Modifiers.java @@ -341,6 +341,6 @@ public class Modifiers { } private static boolean shouldShowWeight(ModifierCategory modifierCategory, VaultGearTierConfig.ModifierAffixTagGroup affixTagGroup) { - return modifierCategory == ModifierCategory.NORMAL && affixTagGroup != VaultGearTierConfig.ModifierAffixTagGroup.BASE_ATTRIBUTES; + return modifierCategory == ModifierCategory.NORMAL && !Config.AFFIX_TAG_GROUP_CHANCE_BLACKLIST.get().contains(affixTagGroup); } } diff --git a/src/main/java/com/radimous/vhatcaniroll/ui/GearModifierScreen.java b/src/main/java/com/radimous/vhatcaniroll/ui/GearModifierScreen.java index 28b5c6d..436e3ac 100644 --- a/src/main/java/com/radimous/vhatcaniroll/ui/GearModifierScreen.java +++ b/src/main/java/com/radimous/vhatcaniroll/ui/GearModifierScreen.java @@ -2,9 +2,11 @@ package com.radimous.vhatcaniroll.ui; import com.mojang.blaze3d.platform.InputConstants; import com.radimous.vhatcaniroll.Config; +import com.radimous.vhatcaniroll.VHatCanIRoll; import com.radimous.vhatcaniroll.logic.Items; import com.radimous.vhatcaniroll.logic.ModifierCategory; +import com.simibubi.create.foundation.config.ui.ConfigScreen; import com.simibubi.create.foundation.config.ui.SubMenuConfigScreen; import iskallia.vault.client.gui.framework.ScreenRenderers; import iskallia.vault.client.gui.framework.ScreenTextures; @@ -260,6 +262,7 @@ public class GearModifierScreen extends AbstractElementScreen { private void createConfigButton(){ this.addElement(new ButtonElement<>(Spatials.positionXY(-3, 3), ScreenTextures.BUTTON_HISTORY_TEXTURES, () -> { SubMenuConfigScreen screen = new SubMenuConfigScreen(this, "VHat Can I Roll? Configuration", ModConfig.Type.CLIENT, Config.SPEC, Config.SPEC.getValues()); + ConfigScreen.modID = VHatCanIRoll.MODID; Minecraft.getInstance().setScreen(screen); })).layout((screen, gui, parent, world) -> { diff --git a/src/main/java/com/radimous/vhatcaniroll/ui/HelpContainer.java b/src/main/java/com/radimous/vhatcaniroll/ui/HelpContainer.java index d77b99d..fff17b9 100644 --- a/src/main/java/com/radimous/vhatcaniroll/ui/HelpContainer.java +++ b/src/main/java/com/radimous/vhatcaniroll/ui/HelpContainer.java @@ -42,9 +42,9 @@ public class HelpContainer extends ContainerElement { var vimArrows = new LabelElement<>( Spatials.positionXY(410, 72).width(16).height(16), - new TextComponent("h ").withStyle(ChatFormatting.GOLD) - .append(new TextComponent("lvl").withStyle(ChatFormatting.BLUE)) - .append(new TextComponent(" l").withStyle(ChatFormatting.GOLD)), + new TextComponent("h ").withStyle(ChatFormatting.GOLD) + .append(new TextComponent("wheel").withStyle(ChatFormatting.BLUE)) + .append(new TextComponent(" l").withStyle(ChatFormatting.GOLD)), LabelTextStyle.shadow() ); this.addElement(vimArrows); @@ -96,12 +96,12 @@ public class HelpContainer extends ContainerElement { String text = """ Colored triangles represent groups - of attributes + of attributes. If 2 attributes are in the same group, they can't be - rolled together + rolled together. """; var array = text.split("\n");