Skip to content

Commit

Permalink
v0.4.1
Browse files Browse the repository at this point in the history
Small hotfix to fix Altar Ingredients and Bounty Rewards in VH u16
  • Loading branch information
Attack8 committed Nov 22, 2024
1 parent ef5bbb6 commit ff61f6f
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 9 deletions.
11 changes: 8 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,11 @@ repositories {
dependencies {
minecraft "net.minecraftforge:forge:${mc_version}-${forge_version}"

compileOnly(annotationProcessor("io.github.llamalad7:mixinextras-common:0.4.1"))
implementation(jarJar("io.github.llamalad7:mixinextras-forge:0.4.1")) {
jarJar.ranged(it, "[0.4.1,)")
}

annotationProcessor "org.spongepowered:mixin:0.8.5:processor"

// Real mod deobf dependency examples - these get remapped to your current mappings
Expand All @@ -172,7 +177,7 @@ dependencies {
runtimeOnly(fg.deobf("top.theillusivec4.curios:curios-forge:${mc_version}-${curios_version}"))
implementation fg.deobf("curse.maven:geckolib-388172:4181370")

implementation fg.deobf("curse.maven:vault-hunters-official-mod-458203:5631250")
implementation fg.deobf("curse.maven:vault-hunters-official-mod-458203:5925633")

runtimeOnly fg.deobf("curse.maven:refined-storage-243076:4217424")
runtimeOnly fg.deobf("curse.maven:mekanism-268560:3875976")
Expand Down Expand Up @@ -200,9 +205,9 @@ dependencies {
runtimeOnly fg.deobf("curse.maven:modular-routers-250294:4984984")
// runtimeOnly fg.deobf("curse.maven:attackeight-quest-addon-946682:5401585")

compileOnly fg.deobf("curse.maven:wolds-vaults-official-mod-958799:5854693")
// compileOnly fg.deobf("curse.maven:wolds-vaults-official-mod-958799:5854693")
if (wolds_enable) {
runtimeOnly fg.deobf("curse.maven:wolds-vaults-official-mod-958799:5854693")
// runtimeOnly fg.deobf("curse.maven:wolds-vaults-official-mod-958799:5854693")
}
}

Expand Down
5 changes: 4 additions & 1 deletion changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,7 @@ Combined recipe categories for items crafted in the same block (Tools and Jewels
Backend code cleanup

Vault Hunters JEI Integration v0.4
Added integration for vault altar ingredients
Added integration for vault altar ingredients

Vault Hunters JEI Integration v0.4.1
Small hotfix to fix Altar Ingredients and Bounty Rewards in VH u16
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ mapping_version=1.18.2
mod_id = the_vault_jei
mod_name=TheVaultJEI
mod_license=GNU GPLv3
mod_version=0.4
mod_version=0.4.1
mod_group_id=dev.attackeight
mod_authors=attackeight
mod_description=Adds JEI Compatibility for Vault Hunters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ protected static List<LabeledLootInfo> getBountyRewards() {
});
lootInfo.put(minLevel, new LabeledLootInfo(results,
new TextComponent("Reward Pool: " + id + " Level: " + minLevel + "+"),
new TextComponent("Vault Exp Reward: " + vaultExp.min + "-" + vaultExp.max)));
new TextComponent("Vault Exp Reward: " + vaultExp.getMin() + "-" + vaultExp.getMax())));
});
}
lootInfo.forEach((n,i) -> toReturn.add(i));
Expand All @@ -232,17 +232,17 @@ protected static List<LabeledIngredientPool> getAltarIngredients() {
rewards.forEach(stack -> totalWeight.addAndGet(stack.weight));
rewards.forEach(stack -> {
IntRangeEntry amounts = ((IngredientAmountAccessor) stack.value).getAmount();
ItemStack result = new ItemStack(stack.value.getItems().get(0).getItem(), amounts.max);
ItemStack result = new ItemStack(stack.value.getItems().get(0).getItem(), amounts.getMax());
double chance = ((double) stack.weight / totalWeight.get()) * 100;
CompoundTag nbt = result.getOrCreateTagElement("display");
ListTag list = nbt.getList("Lore", 8);
MutableComponent chanceLabel = new TextComponent("Chance: ");
chanceLabel.append(String.format("%.2f", chance));
chanceLabel.append("%");
list.add(StringTag.valueOf(Component.Serializer.toJson(chanceLabel.withStyle(ChatFormatting.YELLOW))));
if (amounts.min != amounts.max) {
if (amounts.getMin() != amounts.getMax()) {
MutableComponent countLabel = new TextComponent("Count: ");
countLabel.append(amounts.min + " - " + amounts.max);
countLabel.append(amounts.getMin() + " - " + amounts.getMax());
list.add(StringTag.valueOf(Component.Serializer.toJson(countLabel)));
}
nbt.put("Lore", list);
Expand Down

0 comments on commit ff61f6f

Please sign in to comment.