From f770f4e44d15a5f7b8392ec3f6768be94942e261 Mon Sep 17 00:00:00 2001 From: attack8 Date: Fri, 22 Nov 2024 09:54:00 -0500 Subject: [PATCH] v0.4.1 Small hotfix to fix Altar Ingredients and Bounty Rewards in VH u16 --- build.gradle | 11 ++++++++--- changelog.txt | 5 ++++- gradle.properties | 2 +- .../the_vault_jei/jei/JEIRecipeProvider.java | 8 ++++---- 4 files changed, 17 insertions(+), 9 deletions(-) diff --git a/build.gradle b/build.gradle index 47a3a21..e14fdcd 100644 --- a/build.gradle +++ b/build.gradle @@ -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 @@ -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") @@ -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") } } diff --git a/changelog.txt b/changelog.txt index 5c4f52b..066ed2c 100644 --- a/changelog.txt +++ b/changelog.txt @@ -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 \ No newline at end of file +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 \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 224e39f..467e564 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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.5 mod_group_id=dev.attackeight mod_authors=attackeight mod_description=Adds JEI Compatibility for Vault Hunters diff --git a/src/main/java/dev/attackeight/the_vault_jei/jei/JEIRecipeProvider.java b/src/main/java/dev/attackeight/the_vault_jei/jei/JEIRecipeProvider.java index 480cf7f..24aa0ca 100644 --- a/src/main/java/dev/attackeight/the_vault_jei/jei/JEIRecipeProvider.java +++ b/src/main/java/dev/attackeight/the_vault_jei/jei/JEIRecipeProvider.java @@ -212,7 +212,7 @@ protected static List 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)); @@ -232,7 +232,7 @@ protected static List 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); @@ -240,9 +240,9 @@ protected static List getAltarIngredients() { 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);