diff --git a/dependencies.gradle b/dependencies.gradle index ad4fe6c..27ac351 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -7,6 +7,7 @@ dependencies { compileOnly('com.github.GTNewHorizons:BloodMagic:1.8.5:dev') compileOnly('com.github.GTNewHorizons:Botania:1.13.4-GTNH:api') compileOnly("com.github.GTNewHorizons:AppleCore:3.3.7:dev") + compileOnly("com.github.GTNewHorizons:GTNHLib:0.9.13:dev") compileOnly('curse.maven:ee3-65509:2305023') diff --git a/src/main/java/fox/spiteful/forbidden/Forbidden.java b/src/main/java/fox/spiteful/forbidden/Forbidden.java index 0f1e482..2403d38 100644 --- a/src/main/java/fox/spiteful/forbidden/Forbidden.java +++ b/src/main/java/fox/spiteful/forbidden/Forbidden.java @@ -91,12 +91,5 @@ public class Forbidden { wandLord = new WandOverlord(); WandTriggerRegistry.registerWandBlockTrigger(wandLord, 1, Blocks.obsidian, 0); WandTriggerRegistry.registerWandBlockTrigger(wandLord, 1, Blocks.netherrack, 0); - - if (Minecraft.getMinecraft().getResourceManager() instanceof IReloadableResourceManager manager) { - manager.registerReloadListener( - (IResourceManager manager2) -> { - ForbiddenResearch.addResearch(); - }); - } } } diff --git a/src/main/java/fox/spiteful/forbidden/ForbiddenResearch.java b/src/main/java/fox/spiteful/forbidden/ForbiddenResearch.java index db27349..4e2f290 100644 --- a/src/main/java/fox/spiteful/forbidden/ForbiddenResearch.java +++ b/src/main/java/fox/spiteful/forbidden/ForbiddenResearch.java @@ -7,10 +7,11 @@ import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.IRecipe; import net.minecraft.util.ResourceLocation; +import com.gtnewhorizon.gtnhlib.api.thaumcraft.FormattedResearchPage; + import fox.spiteful.forbidden.blocks.ForbiddenBlocks; import fox.spiteful.forbidden.compat.Compat; import fox.spiteful.forbidden.items.ForbiddenItems; -import net.minecraft.util.StatCollector; import thaumcraft.api.ThaumcraftApi; import thaumcraft.api.aspects.Aspect; import thaumcraft.api.aspects.AspectList; @@ -297,7 +298,10 @@ public class ForbiddenResearch { 3, new ItemStack(ForbiddenItems.wandCore, 1, 1))) .setPages( - new ResearchPage[] { new ResearchPage("forbidden.research_page.ROD_infernal.1"), + new ResearchPage[] { + new FormattedResearchPage( + "forbidden.research_page.ROD_infernal.1", + new Integer[] { Config.infernalCoreCap }), new ResearchPage((InfusionRecipe) recipes.get("WandRodInfernal")), new ResearchPage("forbidden.research_page.ROD_infernal.2") }) .setParents(new String[] { "ROD_silverwood", "INFUSION", "NETHERSHARDS" }).setConcealed() @@ -479,7 +483,10 @@ public class ForbiddenResearch { 3, new ItemStack(ForbiddenItems.wandCore, 1, 0))) .setPages( - new ResearchPage[] { new ResearchPage(StatCollector.translateToLocalFormatted("forbidden.research_page.ROD_tainted.1", Config.taintedCoreCap)), + new ResearchPage[] { + new FormattedResearchPage( + "forbidden.research_page.ROD_tainted.1", + new Integer[] { Config.taintedCoreCap }), new ResearchPage((InfusionRecipe) recipes.get("WandRodTainted")) }) .setParents(new String[] { "ROD_silverwood", "TAINTSHOVEL", "INFUSION" }).setConcealed() .registerResearchItem(); diff --git a/src/main/java/fox/spiteful/forbidden/compat/BloodMagic.java b/src/main/java/fox/spiteful/forbidden/compat/BloodMagic.java index 5fada20..ad18204 100644 --- a/src/main/java/fox/spiteful/forbidden/compat/BloodMagic.java +++ b/src/main/java/fox/spiteful/forbidden/compat/BloodMagic.java @@ -8,6 +8,8 @@ import net.minecraftforge.oredict.OreDictionary; import org.apache.logging.log4j.Level; +import com.gtnewhorizon.gtnhlib.api.thaumcraft.FormattedResearchPage; + import WayofTime.alchemicalWizardry.api.alchemy.AlchemicalPotionCreationHandler; import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipeRegistry; import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRegistry; @@ -91,11 +93,13 @@ public class BloodMagic { -1, -3, 3, - new ItemStack(ForbiddenItems.wandCore, 1, 3))) - .setPages( - new ResearchPage[] { new ResearchPage("forbidden.research_page.ROD_blood.1"), - new ResearchPage(blood_recipe), - new ResearchPage("forbidden.research_page.ROD_blood.2") }) + new ItemStack(ForbiddenItems.wandCore, 1, 3))).setPages( + new ResearchPage[] { + new FormattedResearchPage( + "forbidden.research_page.ROD_blood.1", + new Integer[] { Config.bloodCoreCap }), + new ResearchPage(blood_recipe), + new ResearchPage("forbidden.research_page.ROD_blood.2") }) .setParents(new String[] { "ROD_silverwood", "INFUSION", "BLOODMAGIC" }).setConcealed() .registerResearchItem(); ThaumcraftApi.addWarpToResearch("ROD_blood", 2); @@ -116,9 +120,13 @@ public class BloodMagic { -3, -2, 2, - new ItemStack(ForbiddenItems.wandCore, 1, 9))).setPages( - new ResearchPage[] { new ResearchPage("forbidden.research_page.ROD_blood_staff.1"), - new ResearchPage(blood_staff) }) + new ItemStack(ForbiddenItems.wandCore, 1, 9))) + .setPages( + new ResearchPage[] { + new FormattedResearchPage( + "forbidden.research_page.ROD_blood_staff.1", + new Integer[] { Config.bloodStaffCap }), + new ResearchPage(blood_staff) }) .setParents(new String[] { "ROD_silverwood_staff", "ROD_blood" }).setSpecial() .setConcealed().registerResearchItem(); @@ -138,9 +146,14 @@ public class BloodMagic { -3, -3, 2, - new ItemStack(ForbiddenItems.wandCap, 1, 0))).setPages( - new ResearchPage[] { new ResearchPage("forbidden.research_page.CAP_alchemical.1"), - new ResearchPage(alchemical_recipe) }) + new ItemStack(ForbiddenItems.wandCap, 1, 0))) + .setPages( + new ResearchPage[] { + new FormattedResearchPage( + "forbidden.research_page.CAP_alchemical.1", + new Double[] { Config.alchemicalDiscount * 100 - 10, + Config.alchemicalDiscount * 100 }), + new ResearchPage(alchemical_recipe) }) .setParents(new String[] { "ROD_blood", "CAP_gold" }).setSecondary().setConcealed() .registerResearchItem(); } diff --git a/src/main/java/fox/spiteful/forbidden/compat/Compat.java b/src/main/java/fox/spiteful/forbidden/compat/Compat.java index b20ed38..a93a471 100644 --- a/src/main/java/fox/spiteful/forbidden/compat/Compat.java +++ b/src/main/java/fox/spiteful/forbidden/compat/Compat.java @@ -7,6 +7,7 @@ import net.minecraftforge.oredict.OreDictionary; import org.apache.logging.log4j.Level; +import com.gtnewhorizon.gtnhlib.api.thaumcraft.FormattedResearchPage; import com.pahimar.ee3.api.exchange.EnergyValueRegistryProxy; import cpw.mods.fml.common.Loader; @@ -166,9 +167,13 @@ public class Compat { -3, 1, 3, - new ItemStack(ForbiddenItems.wandCore, 1, 4))).setPages( - new ResearchPage[] { new ResearchPage("forbidden.research_page.ROD_witchwood.1"), - new ResearchPage(witchwood_recipe) }) + new ItemStack(ForbiddenItems.wandCore, 1, 4))) + .setPages( + new ResearchPage[] { + new FormattedResearchPage( + "forbidden.research_page.ROD_witchwood.1", + new Integer[] { Config.witchwoodCoreCap }), + new ResearchPage(witchwood_recipe) }) .setParents(new String[] { "SCHOOLS", "ROD_silverwood", "INFUSION" }).setConcealed() .registerResearchItem(); ThaumcraftApi.addWarpToResearch("ROD_witchwood", 2); @@ -191,7 +196,11 @@ public class Compat { 1, new ItemStack(ForbiddenItems.wandCap, 1, 1))) .setPages( - new ResearchPage[] { new ResearchPage("forbidden.research_page.CAP_vinteum.1"), + new ResearchPage[] { + new FormattedResearchPage( + "forbidden.research_page.CAP_vinteum.1", + new Double[] { Config.vinteumDiscount * 100 - 10, + Config.vinteumDiscount * 100 }), new ResearchPage(vinteum_recipe) }) .setParents(new String[] { "ROD_witchwood", "CAP_thaumium" }).setSecondary() .setConcealed().registerResearchItem(); @@ -212,9 +221,13 @@ public class Compat { -3, -1, 2, - new ItemStack(ForbiddenItems.wandCore, 1, 10))).setPages( - new ResearchPage[] { new ResearchPage("forbidden.research_page.ROD_witchwood_staff.1"), - new ResearchPage(witchwood_staff) }) + new ItemStack(ForbiddenItems.wandCore, 1, 10))) + .setPages( + new ResearchPage[] { + new FormattedResearchPage( + "forbidden.research_page.ROD_witchwood_staff.1", + new Integer[] { Config.witchwoodStaffCap }), + new ResearchPage(witchwood_staff) }) .setParents(new String[] { "ROD_silverwood_staff", "ROD_witchwood" }).setSpecial() .setConcealed().registerResearchItem(); } catch (Exception e) { diff --git a/src/main/java/fox/spiteful/forbidden/compat/ForbiddenBotany.java b/src/main/java/fox/spiteful/forbidden/compat/ForbiddenBotany.java index 97ef9b2..f779116 100644 --- a/src/main/java/fox/spiteful/forbidden/compat/ForbiddenBotany.java +++ b/src/main/java/fox/spiteful/forbidden/compat/ForbiddenBotany.java @@ -14,6 +14,8 @@ import net.minecraftforge.oredict.ShapedOreRecipe; import org.apache.logging.log4j.Level; +import com.gtnewhorizon.gtnhlib.api.thaumcraft.FormattedResearchPage; + import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipeRegistry; import cpw.mods.fml.common.registry.GameRegistry; import fox.spiteful.forbidden.Config; @@ -123,9 +125,13 @@ public class ForbiddenBotany { 1, 2, 2, - new ItemStack(ForbiddenItems.wandCap, 1, 3))).setPages( - new ResearchPage[] { new ResearchPage("forbidden.research_page.CAP_manasteel.1"), - new ResearchPage(manasteel_cap) }) + new ItemStack(ForbiddenItems.wandCap, 1, 3))) + .setPages( + new ResearchPage[] { + new FormattedResearchPage( + "forbidden.research_page.CAP_manasteel.1", + new Double[] { Config.manasteelDiscount * 100 }), + new ResearchPage(manasteel_cap) }) .setParents(new String[] { "ROD_livingwood" }).setSecondary().setConcealed() .registerResearchItem(); BotaniaAPI.registerManaInfusionRecipe( diff --git a/src/main/resources/assets/forbidden/lang/en_US.lang b/src/main/resources/assets/forbidden/lang/en_US.lang index 2d9d972..18d9ae3 100644 --- a/src/main/resources/assets/forbidden/lang/en_US.lang +++ b/src/main/resources/assets/forbidden/lang/en_US.lang @@ -211,7 +211,7 @@ forbidden.research_page.TAINTSTONE.1=Tainted Lands aren't very safe places to be # forbidden.research_name.ROD_infernal=Infernal Wand Core forbidden.research_text.ROD_infernal=Devilish vis storage -forbidden.research_page.ROD_infernal.1=A great and powerful thaumaturge like you deserves a powerful and imposing wand befitting your station. Some hippy silverwood wand just won't cut it. You need a wand that will serve as your scepter of authority.

You've discovered a way to create a wand infused with the power of the Nether. The Infernal Wand Core can hold up to 150 vis and will slowly replenish its supply of Ignis up to 20%. While within the Nether, the wand will also replenish its other aspects to 10%. +forbidden.research_page.ROD_infernal.1=A great and powerful thaumaturge like you deserves a powerful and imposing wand befitting your station. Some hippy silverwood wand just won't cut it. You need a wand that will serve as your scepter of authority.

You've discovered a way to create a wand infused with the power of the Nether. The Infernal Wand Core can hold up to %s vis and will slowly replenish its supply of Ignis up to 20%. While within the Nether, the wand will also replenish its other aspects to 10%. forbidden.research_page.ROD_infernal.2=The wand also imbues you with some protection from the Nether's hazards, extinguishing you if you are on fire or protecting you from the effects of Withering as long as it is in your inventory. While the wand is held in your hand, it will completely protect you from all fire damage. # forbidden.research_name.ROD_profane=Profane Wand @@ -224,20 +224,20 @@ forbidden.research_page.ROD_soul.1=You've discovered a way to tap the energy flo # forbidden.research_name.ROD_blood=Blood Wand Core forbidden.research_text.ROD_blood=Alchemical vis storage -forbidden.research_page.ROD_blood.1=You've created a bridge between Thaumaturgy and Alchemical Wizardry. The Blood Wand can store up to 100 vis and will gradually fill itself using Life Points.

The wand will bind itself to the first person to pick it up. As long as the rod is empty, it will try to fill itself using LP from its owner's network. If there are not enough Life Points to fuel it, it will resort to drawing health from whoever is carrying it, but this conversion is less efficient. If it has no LP to draw from and its holder falls below three hearts, the wand stops charging itself. +forbidden.research_page.ROD_blood.1=You've created a bridge between Thaumaturgy and Alchemical Wizardry. The Blood Wand can store up to %s vis and will gradually fill itself using Life Points.

The wand will bind itself to the first person to pick it up. As long as the rod is empty, it will try to fill itself using LP from its owner's network. If there are not enough Life Points to fuel it, it will resort to drawing health from whoever is carrying it, but this conversion is less efficient. If it has no LP to draw from and its holder falls below three hearts, the wand stops charging itself. forbidden.research_page.ROD_blood.2=The infusion process alone isn't enough to complete a Blood Wand. Once the Inert Blood Rod has been infused, it must be imbued with life essence in a Blood Altar to be completed. # forbidden.research_name.ROD_blood_staff=Blood Staff Core forbidden.research_text.ROD_blood_staff=Staff of the Blood Magus -forbidden.research_page.ROD_blood_staff.1=The Blood Wand is useful, but it just charges so slowly. It's time to create a magical implement that can hold up in sustained combat.

Unlike most staves, the Blood Staff holds only 50 vis instead of the 100 its wand form can. Where it truly shines is its ability to recharge vis at a rapid rate. As long as the Blood Staff is held in your hotbar, it will recharge its vis from its owner's LP network four times as quickly as a normal Blood Wand. This voraciousness comes at a price, however. Unlike the wand, the Blood Staff can and will kill whoever's holding it if it doesn't recieve enough LP. +forbidden.research_page.ROD_blood_staff.1=The Blood Wand is useful, but it just charges so slowly. It's time to create a magical implement that can hold up in sustained combat.

Unlike most staves, the Blood Staff holds only %s vis instead of the 100 its wand form can. Where it truly shines is its ability to recharge vis at a rapid rate. As long as the Blood Staff is held in your hotbar, it will recharge its vis from its owner's LP network four times as quickly as a normal Blood Wand. This voraciousness comes at a price, however. Unlike the wand, the Blood Staff can and will kill whoever's holding it if it doesn't recieve enough LP. # forbidden.research_name.ROD_witchwood=Witchwood Wand Core forbidden.research_text.ROD_witchwood=Mana converter -forbidden.research_page.ROD_witchwood.1=By creating a wand core out of Witchwood, you've discovered a way to convert mana into Vis. The Witchwood Wand Core holds up to 100 vis and will gradually charge itself at the cost of 140 mana per point of vis.

Further research may reveal ways to lower this price. +forbidden.research_page.ROD_witchwood.1=By creating a wand core out of Witchwood, you've discovered a way to convert mana into Vis. The Witchwood Wand Core holds up to %s vis and will gradually charge itself at the cost of 140 mana per point of vis.

Further research may reveal ways to lower this price. # forbidden.research_name.ROD_witchwood_staff=Witchwood Staff Core forbidden.research_text.ROD_witchwood_staff=Staff of the Arcanist -forbidden.research_page.ROD_witchwood_staff.1=The Witchwood Wand eats far too much magical power and charges far too slowly to stand up in sustained combat. It's time for something a little more efficient at channeling arcane power.

Unlike most staves, the Witchwood Staff can only hold 50 vis. Its true strength lies in how quickly it recharges itself. The staff regains vis at over twice the rate of the Witchwood Wand. Furthermore, the staff uses considerably less magical power than the Witchwood Wand, only needing 100 mana per point of vis, if used without the appropriate cap. +forbidden.research_page.ROD_witchwood_staff.1=The Witchwood Wand eats far too much magical power and charges far too slowly to stand up in sustained combat. It's time for something a little more efficient at channeling arcane power.

Unlike most staves, the Witchwood Staff can only hold %s vis. Its true strength lies in how quickly it recharges itself. The staff regains vis at over twice the rate of the Witchwood Wand. Furthermore, the staff uses considerably less magical power than the Witchwood Wand, only needing 100 mana per point of vis, if used without the appropriate cap. # forbidden.research_name.ROD_livingwood=Livingwood Wand Core forbidden.research_text.ROD_livingwood=Botanical vis storage @@ -249,11 +249,11 @@ forbidden.research_page.ROD_dreamwood_staff.1=Livingwood is a useful material, b # forbidden.research_name.CAP_alchemical=Alchemical Caps forbidden.research_text.CAP_alchemical=When Thaumium isn't bloody enough -forbidden.research_page.CAP_alchemical.1=You've developed a wand cap that merges Thaumaturgy and Alchemical Wizardry. Alchemical Caps are very effective at channeling Aqua, only using 80% of the normal vis cost. For everything else, they offer only a 90% rate.

If combined with a Bloody Wand Core, Alchemical Caps discount the amount of LP consumed by the wand, costing only 900 LP per vis. The caps also cause all attacks from a blood wand to inflict Weakness. +forbidden.research_page.CAP_alchemical.1=You've developed a wand cap that merges Thaumaturgy and Alchemical Wizardry. Alchemical Caps are very effective at channeling Aqua, only using %s% of the normal vis cost. For everything else, they offer only a %s% rate.

If combined with a Bloody Wand Core, Alchemical Caps discount the amount of LP consumed by the wand, costing only 900 LP per vis. The caps also cause all attacks from a blood wand to inflict Weakness. # forbidden.research_name.CAP_vinteum=Vinteum Caps forbidden.research_text.CAP_vinteum=Magical wand caps -forbidden.research_page.CAP_vinteum.1=By infusing a Thaumium cap with Vinteum, you create a cap that, when combined with a Witchwood Wand Core, lowers its mana cost to only 80 per point of vis.

The Thaumium cap seems to meld well with Vinteum, offering the same 90% vis rate. +forbidden.research_page.CAP_vinteum.1=By infusing a Thaumium cap with Vinteum, you create a cap that, when combined with a Witchwood Wand Core, lowers its mana cost to only %s% per point of vis.

The Thaumium cap seems to meld well with Vinteum, offering the same %s% vis rate. # forbidden.research_name.CAP_soul=Ender Caps forbidden.research_text.CAP_soul=Protection for your soul @@ -261,7 +261,7 @@ forbidden.research_page.CAP_soul.1=You've created a wand cap that can safely cha # forbidden.research_name.CAP_manasteel=Manasteel Caps forbidden.research_text.CAP_manasteel=The secret of mana -forbidden.research_page.CAP_manasteel.1=Manasteel has very useful properties when it comes to mana manipulation. When crafted into a wand cap, it offers a 90% vis rate. If combined with a wand that can consume mana, it also makes the mana conversion process more efficient.

In order to be used in the creation of a wand, the Inert Manasteel Caps must be infused in a Mana Pool. +forbidden.research_page.CAP_manasteel.1=Manasteel has very useful properties when it comes to mana manipulation. When crafted into a wand cap, it offers a %s% vis rate. If combined with a wand that can consume mana, it also makes the mana conversion process more efficient.

In order to be used in the creation of a wand, the Inert Manasteel Caps must be infused in a Mana Pool. # forbidden.research_name.CAP_elementium=Elementium Caps forbidden.research_text.CAP_elementium=Eco Friendly Wand Caps