blacklist chance display for crafted modifiers
This commit is contained in:
parent
e758d2b787
commit
5bfc6c83ba
4 changed files with 19 additions and 6 deletions
|
|
@ -1,7 +1,10 @@
|
||||||
package com.radimous.vhatcaniroll;
|
package com.radimous.vhatcaniroll;
|
||||||
|
|
||||||
|
import iskallia.vault.config.gear.VaultGearTierConfig;
|
||||||
import net.minecraftforge.common.ForgeConfigSpec;
|
import net.minecraftforge.common.ForgeConfigSpec;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class Config {
|
public class Config {
|
||||||
public static final ForgeConfigSpec SPEC;
|
public static final ForgeConfigSpec SPEC;
|
||||||
public static final ForgeConfigSpec.BooleanValue VAULT_SCREEN_BUTTON;
|
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_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>>
|
||||||
|
AFFIX_TAG_GROUP_CHANCE_BLACKLIST;
|
||||||
|
|
||||||
|
|
||||||
static {
|
static {
|
||||||
|
|
@ -51,6 +56,11 @@ public class Config {
|
||||||
SHOW_CHANCE = builder
|
SHOW_CHANCE = builder
|
||||||
.comment("show chance")
|
.comment("show chance")
|
||||||
.define("showChance", true);
|
.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();
|
SPEC = builder.build();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -341,6 +341,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 && affixTagGroup != VaultGearTierConfig.ModifierAffixTagGroup.BASE_ATTRIBUTES;
|
return modifierCategory == ModifierCategory.NORMAL && !Config.AFFIX_TAG_GROUP_CHANCE_BLACKLIST.get().contains(affixTagGroup);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,11 @@ package com.radimous.vhatcaniroll.ui;
|
||||||
|
|
||||||
import com.mojang.blaze3d.platform.InputConstants;
|
import com.mojang.blaze3d.platform.InputConstants;
|
||||||
import com.radimous.vhatcaniroll.Config;
|
import com.radimous.vhatcaniroll.Config;
|
||||||
|
import com.radimous.vhatcaniroll.VHatCanIRoll;
|
||||||
import com.radimous.vhatcaniroll.logic.Items;
|
import com.radimous.vhatcaniroll.logic.Items;
|
||||||
|
|
||||||
import com.radimous.vhatcaniroll.logic.ModifierCategory;
|
import com.radimous.vhatcaniroll.logic.ModifierCategory;
|
||||||
|
import com.simibubi.create.foundation.config.ui.ConfigScreen;
|
||||||
import com.simibubi.create.foundation.config.ui.SubMenuConfigScreen;
|
import com.simibubi.create.foundation.config.ui.SubMenuConfigScreen;
|
||||||
import iskallia.vault.client.gui.framework.ScreenRenderers;
|
import iskallia.vault.client.gui.framework.ScreenRenderers;
|
||||||
import iskallia.vault.client.gui.framework.ScreenTextures;
|
import iskallia.vault.client.gui.framework.ScreenTextures;
|
||||||
|
|
@ -260,6 +262,7 @@ public class GearModifierScreen extends AbstractElementScreen {
|
||||||
private void createConfigButton(){
|
private void createConfigButton(){
|
||||||
this.addElement(new ButtonElement<>(Spatials.positionXY(-3, 3), ScreenTextures.BUTTON_HISTORY_TEXTURES, () -> {
|
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());
|
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);
|
Minecraft.getInstance().setScreen(screen);
|
||||||
|
|
||||||
})).layout((screen, gui, parent, world) -> {
|
})).layout((screen, gui, parent, world) -> {
|
||||||
|
|
|
||||||
|
|
@ -42,9 +42,9 @@ public class HelpContainer extends ContainerElement<HelpContainer> {
|
||||||
|
|
||||||
var vimArrows = new LabelElement<>(
|
var vimArrows = new LabelElement<>(
|
||||||
Spatials.positionXY(410, 72).width(16).height(16),
|
Spatials.positionXY(410, 72).width(16).height(16),
|
||||||
new TextComponent("h ").withStyle(ChatFormatting.GOLD)
|
new TextComponent("h ").withStyle(ChatFormatting.GOLD)
|
||||||
.append(new TextComponent("lvl").withStyle(ChatFormatting.BLUE))
|
.append(new TextComponent("wheel").withStyle(ChatFormatting.BLUE))
|
||||||
.append(new TextComponent(" l").withStyle(ChatFormatting.GOLD)),
|
.append(new TextComponent(" l").withStyle(ChatFormatting.GOLD)),
|
||||||
LabelTextStyle.shadow()
|
LabelTextStyle.shadow()
|
||||||
);
|
);
|
||||||
this.addElement(vimArrows);
|
this.addElement(vimArrows);
|
||||||
|
|
@ -96,12 +96,12 @@ public class HelpContainer extends ContainerElement<HelpContainer> {
|
||||||
String text = """
|
String text = """
|
||||||
Colored triangles
|
Colored triangles
|
||||||
represent groups
|
represent groups
|
||||||
of attributes
|
of attributes.
|
||||||
|
|
||||||
If 2 attributes are
|
If 2 attributes are
|
||||||
in the same group,
|
in the same group,
|
||||||
they can't be
|
they can't be
|
||||||
rolled together
|
rolled together.
|
||||||
""";
|
""";
|
||||||
|
|
||||||
var array = text.split("\n");
|
var array = text.split("\n");
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue