diff --git a/src/main/java/WayofTime/bloodmagic/compat/jei/CompatibilityThaumcraft.java b/src/main/java/WayofTime/bloodmagic/compat/thaumcraft/CompatibilityThaumcraft.java similarity index 82% rename from src/main/java/WayofTime/bloodmagic/compat/jei/CompatibilityThaumcraft.java rename to src/main/java/WayofTime/bloodmagic/compat/thaumcraft/CompatibilityThaumcraft.java index 1ac41213..1fd11714 100644 --- a/src/main/java/WayofTime/bloodmagic/compat/jei/CompatibilityThaumcraft.java +++ b/src/main/java/WayofTime/bloodmagic/compat/thaumcraft/CompatibilityThaumcraft.java @@ -1,9 +1,10 @@ -package WayofTime.bloodmagic.compat.jei; +package WayofTime.bloodmagic.compat.thaumcraft; import WayofTime.bloodmagic.api.livingArmour.LivingArmourHandler; import WayofTime.bloodmagic.compat.ICompatibility; import WayofTime.bloodmagic.compat.thaumcraft.LivingArmourUpgradeThaumRunicShielding; import WayofTime.bloodmagic.compat.thaumcraft.StatTrackerThaumRunicShielding; +import WayofTime.bloodmagic.compat.thaumcraft.research.BloodMagicResearch; public class CompatibilityThaumcraft implements ICompatibility { @@ -12,6 +13,8 @@ public class CompatibilityThaumcraft implements ICompatibility { if (phase == InitializationPhase.POST_INIT) { + BloodMagicResearch.addResearch(); + LivingArmourHandler.registerStatTracker(StatTrackerThaumRunicShielding.class); LivingArmourHandler.registerArmourUpgrade(new LivingArmourUpgradeThaumRunicShielding(0)); diff --git a/src/main/java/WayofTime/bloodmagic/compat/thaumcraft/research/BloodMagicResearch.java b/src/main/java/WayofTime/bloodmagic/compat/thaumcraft/research/BloodMagicResearch.java new file mode 100644 index 00000000..aaa92aa2 --- /dev/null +++ b/src/main/java/WayofTime/bloodmagic/compat/thaumcraft/research/BloodMagicResearch.java @@ -0,0 +1,31 @@ +package WayofTime.bloodmagic.compat.thaumcraft.research; + +import WayofTime.bloodmagic.api.BloodMagicAPI; +import WayofTime.bloodmagic.api.Constants; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; +import thaumcraft.api.aspects.AspectList; +import thaumcraft.api.research.ResearchCategories; +import thaumcraft.api.research.ResearchPage; + +public class BloodMagicResearch +{ + public static void addResearch() + { + final String BLOOD_MAGIC = "BLOODMAGIC"; + + ResearchCategories.registerCategory(BLOOD_MAGIC, null, new ResourceLocation("bloodmagic", "textures/items/WeakBloodOrb.png"), new ResourceLocation("bloodmagic", "textures/gui/thaumcraft/gui_research_back.jpg"), new ResourceLocation("bloodmagic", "textures/gui/thaumcraft/gui_research_back_over.png")); + + (new SanguineResearchItem("BLOODMAGIC", BLOOD_MAGIC, new AspectList(), 0, 0, 0, new ItemStack(BloodMagicAPI.getItem(Constants.BloodMagicItem.BLOOD_ORB), 1, 0))).setPages(new ResearchPage[]{new ResearchPage(researchPage("BLOODMAGIC"))}).setAutoUnlock().setStub().setRound().registerResearchItem(); + } + + private static String researchPage(String researchName) + { + return researchPage(researchName, 1); + } + + private static String researchPage(String researchName, int pageNumber) + { + return "bloodmagic.research_page." + researchName + "." + pageNumber; + } +} diff --git a/src/main/java/WayofTime/bloodmagic/compat/thaumcraft/research/SanguineResearchItem.java b/src/main/java/WayofTime/bloodmagic/compat/thaumcraft/research/SanguineResearchItem.java new file mode 100644 index 00000000..d7bd2cc4 --- /dev/null +++ b/src/main/java/WayofTime/bloodmagic/compat/thaumcraft/research/SanguineResearchItem.java @@ -0,0 +1,32 @@ +package WayofTime.bloodmagic.compat.thaumcraft.research; + +import net.minecraft.util.StatCollector; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; +import thaumcraft.api.aspects.AspectList; +import thaumcraft.api.research.ResearchItem; + +public class SanguineResearchItem extends ResearchItem +{ + public SanguineResearchItem(String key, String category) + { + super(key, category); + } + + public SanguineResearchItem(String key, String category, AspectList tags, int col, int row, int complex, Object... icon) + { + super(key, category, tags, col, row, complex, icon); + } + + @Override + @SideOnly(Side.CLIENT) + public String getName() { + return StatCollector.translateToLocal("bloodmagic.research_name." + this.key); + } + + @Override + @SideOnly(Side.CLIENT) + public String getText() { + return StatCollector.translateToLocal("bloodmagic.research_text." + this.key); + } +} diff --git a/src/main/java/WayofTime/bloodmagic/registry/ModCompatibility.java b/src/main/java/WayofTime/bloodmagic/registry/ModCompatibility.java index 74646507..b2df2549 100644 --- a/src/main/java/WayofTime/bloodmagic/registry/ModCompatibility.java +++ b/src/main/java/WayofTime/bloodmagic/registry/ModCompatibility.java @@ -5,7 +5,7 @@ import java.util.ArrayList; import net.minecraftforge.fml.common.Loader; import WayofTime.bloodmagic.compat.ICompatibility; import WayofTime.bloodmagic.compat.jei.CompatibilityJustEnoughItems; -import WayofTime.bloodmagic.compat.jei.CompatibilityThaumcraft; +import WayofTime.bloodmagic.compat.thaumcraft.CompatibilityThaumcraft; import WayofTime.bloodmagic.compat.waila.CompatibilityWaila; public class ModCompatibility diff --git a/src/main/resources/assets/bloodmagic/lang/en_US.lang b/src/main/resources/assets/bloodmagic/lang/en_US.lang index 269e4ec0..2b9240d0 100644 --- a/src/main/resources/assets/bloodmagic/lang/en_US.lang +++ b/src/main/resources/assets/bloodmagic/lang/en_US.lang @@ -175,7 +175,7 @@ tile.BloodMagic.crystal.large.name=Crystal Cluster tile.BloodMagic.crystal.brick.name=Crystal Cluster Brick tile.BloodMagic.bloodLight.name=Blood Light tile.BloodMagic.spectralBlock.name=Spectral Block -tile.BloodMagic.phantomBlock.name=Phantom Block +tile.BloodMagic.phantom.name=Phantom Block tile.BloodMagic.incenseAltar.name=Incense Altar tile.BloodMagic.teleposer.name=Teleposer @@ -348,7 +348,7 @@ chat.BloodMagic.livingArmour.newUpgrade=&4Upgrade acquired! # JustEnoughItems jei.BloodMagic.recipe.altar=Blood Altar -jei.BloodMagic.recipe.binding=Binding Ritual +jei.BloodMagic.recipe.binding=Alchemy Array (Binding) jei.BloodMagic.recipe.alchemyArrayCrafting=Alchemy Array jei.BloodMagic.recipe.soulForge=Hellfire Forge jei.BloodMagic.recipe.requiredLP=LP: %,d @@ -370,3 +370,11 @@ option.BloodMagic.bloodAltar=Blood Altar option.BloodMagic.ritualController=Ritual Stones option.BloodMagic.teleposer=Teleposer option.BloodMagic.array=Alchemy Array + +# Thaumcraft +tc.research_category.BLOODMAGIC=Sanguine Arcana + +# Thaumcraft Research +bloodmagic.research_name.BLOODMAGIC=Blood Magic +bloodmagic.research_text.BLOODMAGIC=Sanguine Arcana +bloodmagic.research_page.BLOODMAGIC.1=The realm of the Blood Magics has always appeared to be a more solitary and "individual" art with blood mages being notoriously reclusive and a bit insane at times. However, the powers of self-sacrifice and life essence have uses even beyond a normal blood mage's sight, in fact, it is quite apparent that it may have some uses in thaumaturgy after all! \ No newline at end of file diff --git a/src/main/resources/assets/bloodmagic/textures/gui/thaumcraft/gui_research_back.jpg b/src/main/resources/assets/bloodmagic/textures/gui/thaumcraft/gui_research_back.jpg new file mode 100644 index 00000000..ec52a850 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/gui/thaumcraft/gui_research_back.jpg differ diff --git a/src/main/resources/assets/bloodmagic/textures/gui/thaumcraft/gui_research_back_over.png b/src/main/resources/assets/bloodmagic/textures/gui/thaumcraft/gui_research_back_over.png new file mode 100644 index 00000000..b03af3fe Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/gui/thaumcraft/gui_research_back_over.png differ