U16
This commit is contained in:
parent
9f7c3df47e
commit
87f94725dd
4 changed files with 27 additions and 17 deletions
|
|
@ -173,8 +173,8 @@ dependencies {
|
||||||
annotationProcessor 'org.spongepowered:mixin:0.8.5:processor'
|
annotationProcessor 'org.spongepowered:mixin:0.8.5:processor'
|
||||||
|
|
||||||
//VH
|
//VH
|
||||||
implementation fg.deobf("curse.maven:vault-hunters-official-mod-458203:5631250")
|
implementation fg.deobf("curse.maven:vault-hunters-official-mod-458203:5925633")
|
||||||
// implementation fg.deobf("curse.maven:wolds-vaults-official-mod-958799:5622985")
|
|
||||||
//deps
|
//deps
|
||||||
implementation fg.deobf("curse.maven:curios-309927:4418032")
|
implementation fg.deobf("curse.maven:curios-309927:4418032")
|
||||||
implementation fg.deobf("curse.maven:sophisticated-backpacks-vault-hunters-edition-696425:4287544")
|
implementation fg.deobf("curse.maven:sophisticated-backpacks-vault-hunters-edition-696425:4287544")
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ mod_name=VHat Can I Roll?
|
||||||
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
|
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
|
||||||
mod_license=GNU LGPL 3.0
|
mod_license=GNU LGPL 3.0
|
||||||
# The mod version. See https://semver.org/
|
# The mod version. See https://semver.org/
|
||||||
mod_version=1.1
|
mod_version=1.2
|
||||||
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
|
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
|
||||||
# This should match the base package used for the mod sources.
|
# This should match the base package used for the mod sources.
|
||||||
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html
|
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||||
|
|
|
||||||
|
|
@ -6,15 +6,15 @@ import iskallia.vault.config.gear.VaultGearTierConfig;
|
||||||
import iskallia.vault.gear.attribute.VaultGearAttribute;
|
import iskallia.vault.gear.attribute.VaultGearAttribute;
|
||||||
import iskallia.vault.gear.attribute.VaultGearAttributeRegistry;
|
import iskallia.vault.gear.attribute.VaultGearAttributeRegistry;
|
||||||
import iskallia.vault.gear.attribute.ability.AbilityLevelAttribute;
|
import iskallia.vault.gear.attribute.ability.AbilityLevelAttribute;
|
||||||
import iskallia.vault.gear.attribute.ability.special.base.SpecialAbilityModification;
|
|
||||||
import iskallia.vault.gear.attribute.config.BooleanFlagGenerator;
|
import iskallia.vault.gear.attribute.config.BooleanFlagGenerator;
|
||||||
import iskallia.vault.gear.attribute.config.ConfigurableAttributeGenerator;
|
import iskallia.vault.gear.attribute.config.ConfigurableAttributeGenerator;
|
||||||
import iskallia.vault.gear.attribute.custom.EffectGearAttribute;
|
import iskallia.vault.gear.attribute.custom.effect.EffectGearAttribute;
|
||||||
import iskallia.vault.init.ModConfigs;
|
import iskallia.vault.init.ModConfigs;
|
||||||
import iskallia.vault.util.TextComponentUtils;
|
import iskallia.vault.util.TextComponentUtils;
|
||||||
import net.minecraft.ChatFormatting;
|
import net.minecraft.ChatFormatting;
|
||||||
import net.minecraft.network.chat.Component;
|
import net.minecraft.network.chat.Component;
|
||||||
import net.minecraft.network.chat.MutableComponent;
|
import net.minecraft.network.chat.MutableComponent;
|
||||||
|
import net.minecraft.network.chat.Style;
|
||||||
import net.minecraft.network.chat.TextComponent;
|
import net.minecraft.network.chat.TextComponent;
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraftforge.fml.LogicalSide;
|
import net.minecraftforge.fml.LogicalSide;
|
||||||
|
|
@ -55,7 +55,7 @@ public class Helper {
|
||||||
|
|
||||||
Map<String, Integer> groupCounts = countGroups(lvl, affixTagGroup, modifierGroup, legendary);
|
Map<String, Integer> groupCounts = countGroups(lvl, affixTagGroup, modifierGroup, legendary);
|
||||||
|
|
||||||
List<String> grList = new ArrayList<>();
|
Map<String, List<Component>> groupedModifiers = new HashMap<>();
|
||||||
for (VaultGearTierConfig.ModifierTierGroup modifierTierGroup : modifierGroup.get(affixTagGroup)) {
|
for (VaultGearTierConfig.ModifierTierGroup modifierTierGroup : modifierGroup.get(affixTagGroup)) {
|
||||||
ArrayList<VaultGearTierConfig.ModifierTier<?>> mTierList;
|
ArrayList<VaultGearTierConfig.ModifierTier<?>> mTierList;
|
||||||
if (legendary) {
|
if (legendary) {
|
||||||
|
|
@ -71,22 +71,32 @@ public class Helper {
|
||||||
Component newMod = getVal(
|
Component newMod = getVal(
|
||||||
Objects.requireNonNull(VaultGearAttributeRegistry.getAttribute(modifierTierGroup.getAttribute())),
|
Objects.requireNonNull(VaultGearAttributeRegistry.getAttribute(modifierTierGroup.getAttribute())),
|
||||||
mTierList);
|
mTierList);
|
||||||
if (groupCounts.get(modGr) > 1 && !grList.contains(modGr)) {
|
if (groupCounts.get(modGr) > 1) {
|
||||||
grList.add(modGr);
|
groupedModifiers.computeIfAbsent(modGr, k -> new ArrayList<>()).add(newMod);
|
||||||
}
|
continue;
|
||||||
int index = grList.indexOf(modGr); // index used to determine color
|
|
||||||
MutableComponent full;
|
|
||||||
if (index == -1) {
|
|
||||||
full = new TextComponent(" ");
|
|
||||||
} else {
|
|
||||||
full = new TextComponent("► ").withStyle(COLORS[index % COLORS.length]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MutableComponent full = new TextComponent(" ");
|
||||||
|
|
||||||
full.append(newMod);
|
full.append(newMod);
|
||||||
if (Config.ALLOW_DUPE.get() || !(modList.get(modList.size() - 1).getString()).equals(full.getString())) { //dumb way to fix ability lvl+ duplication
|
if (Config.ALLOW_DUPE.get() || !(modList.get(modList.size() - 1).getString()).equals(full.getString())) { //dumb way to fix ability lvl+ duplication
|
||||||
modList.add(full);
|
modList.add(full);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
boolean useNums = false;
|
||||||
|
if (groupedModifiers.size() > COLORS.length) {
|
||||||
|
// more than 7 groups is a bit crazy, but just in case
|
||||||
|
useNums = true;
|
||||||
|
}
|
||||||
|
int i = 0;
|
||||||
|
for (var modGr: groupedModifiers.values()) {
|
||||||
|
for (var mod: modGr) {
|
||||||
|
MutableComponent full = new TextComponent(useNums ? i + " " : "► ").withStyle(COLORS[i % COLORS.length]);
|
||||||
|
full.append(mod);
|
||||||
|
modList.add(full);
|
||||||
|
}
|
||||||
|
i++;
|
||||||
|
}
|
||||||
modList.add(TextComponent.EMPTY);
|
modList.add(TextComponent.EMPTY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -226,7 +236,7 @@ public class Helper {
|
||||||
var abName = optSkill.get().getName();
|
var abName = optSkill.get().getName();
|
||||||
abComp.append(res);
|
abComp.append(res);
|
||||||
abComp.append(" to level of ");
|
abComp.append(" to level of ");
|
||||||
abComp.append(new TextComponent(abName).withStyle(SpecialAbilityModification.getAbilityStyle()));
|
abComp.append(new TextComponent(abName).withStyle(Style.EMPTY.withColor(14076214)));
|
||||||
return abComp;
|
return abComp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
package com.radimous.vhatcaniroll.mixin;
|
package com.radimous.vhatcaniroll.mixin;
|
||||||
|
|
||||||
import iskallia.vault.gear.attribute.custom.EffectGearAttribute;
|
import iskallia.vault.gear.attribute.custom.effect.EffectGearAttribute;
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.gen.Accessor;
|
import org.spongepowered.asm.mixin.gen.Accessor;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue