feat: crystal core research & crafting

This commit is contained in:
Timo Ley 2023-01-11 18:45:53 +01:00
parent 4359cd977f
commit 1e3213799a
5 changed files with 36 additions and 6 deletions

View file

@ -42,7 +42,7 @@ repositories {
dependencies {
implementation "thaumcraft:Thaumcraft:1.7.10-4.2.3.5:deobf"
implementation "dev.tilera:auracore:1.4.1:deobf"
implementation "dev.tilera:auracore:1.5.0:deobf"
implementation "com.github.tox1cozZ:mixin-booter-legacy:1.1.2"
}

View file

@ -1,14 +1,20 @@
package net.anvilcraft.classiccasting;
import dev.tilera.auracore.api.Aspects;
import dev.tilera.auracore.api.AuracoreRecipes;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import thaumcraft.api.ThaumcraftApi;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.api.aspects.AspectList;
import thaumcraft.common.config.ConfigBlocks;
public class Recipes {
public static void init() {
Research.arcaneRecipes.put("ArcaneStone", ThaumcraftApi.addArcaneCraftingRecipe("MAGBLOCKS", new ItemStack(CCBlocks.infusionWorkbench, 8), new AspectList().add(Aspects.VIS, 20), "TST", "SSS", "TST", 'S', "stone", 'T', "ingotThaumium"));
Research.infusionRecipes.put("CrystalCore", AuracoreRecipes.addInfusionCraftingRecipe("CRYSTALCORE", "CRYSTALCORE", 50, new AspectList().add(Aspect.VOID, 8).add(Aspect.MAGIC, 8).add(Aspects.FLUX, 8).add(Aspect.ELDRITCH, 8), new ItemStack(CCBlocks.crystal, 1), new Object[]{" C ", "CNC", " C ", Character.valueOf('C'), new ItemStack(ConfigBlocks.blockCrystal, 1, 9), Character.valueOf('N'), Items.nether_star}));
}
}

View file

@ -6,10 +6,14 @@ import java.util.List;
import java.util.Map;
import dev.tilera.auracore.api.Aspects;
import dev.tilera.auracore.api.crafting.IInfusionRecipe;
import dev.tilera.auracore.api.research.ResearchPageInfusion;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.api.aspects.AspectList;
import thaumcraft.api.crafting.IArcaneRecipe;
import thaumcraft.api.research.ResearchCategories;
import thaumcraft.api.research.ResearchItem;
import thaumcraft.api.research.ResearchPage;
import thaumcraft.common.config.ConfigBlocks;
@ -19,6 +23,7 @@ public class Research {
public static List<Object> infusionStructure;
public static List<Object> magnetStructure;
public static Map<String, IArcaneRecipe> arcaneRecipes = new HashMap<>();
public static Map<String, IInfusionRecipe> infusionRecipes = new HashMap<>();
public static ItemStack empty = new ItemStack(ConfigBlocks.blockHole, 1, 15);
public static void init() {
@ -26,7 +31,10 @@ public class Research {
infusionStructure = Arrays.asList(new AspectList().add(Aspects.VIS, 20), 2, 1, 2, Arrays.asList(new ItemStack(CCBlocks.infusionWorkbench), new ItemStack(CCBlocks.infusionWorkbench), new ItemStack(CCBlocks.infusionWorkbench), new ItemStack(CCBlocks.infusionWorkbench)));
magnetStructure = Arrays.asList(new AspectList().add(Aspects.VIS, 300), 3, 3, 3, Arrays.asList(empty, empty, empty, empty, new ItemStack(CCBlocks.crystal), empty, empty, empty, empty, new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 0), empty, new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 0), empty, empty, empty, new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 0), empty, new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 0), new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 0), empty, new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 0), empty, empty, empty, new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 0), empty, new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 0)));
new ResearchItem("MAGBLOCKS", "ARTIFICE", new AspectList().add(Aspects.ROCK, 1).add(Aspect.METAL, 1).add(Aspect.MAGIC, 1).add(Aspect.TREE, 1).add(Aspect.CRAFT, 1), 9, -2, 2, new ItemStack(CCBlocks.infusionWorkbench)).setPages(
ResearchCategories.registerCategory("CLASSICCASTING", new ResourceLocation("classiccasting", "textures/items/wandapprentice.png"), new ResourceLocation("thaumcraft", "textures/gui/gui_researchback.png"));
// TODO: move research to right place
new ResearchItem("MAGBLOCKS", "CLASSICCASTING", new AspectList().add(Aspects.ROCK, 1).add(Aspect.METAL, 1).add(Aspect.MAGIC, 1).add(Aspect.TREE, 1).add(Aspect.CRAFT, 1), 0, 0, 2, new ItemStack(CCBlocks.infusionWorkbench)).setPages(
new ResearchPage("classiccasting.research_page.MAGBLOCKS.1"),
new ResearchPage(arcaneRecipes.get("ArcaneStone")),
new ResearchPage("classiccasting.research_page.MAGBLOCKS.2"),
@ -34,6 +42,13 @@ public class Research {
new ResearchPage("classiccasting.research_page.MAGBLOCKS.3")
).setParents("THAUMIUM").registerResearchItem();
new ResearchItem("CRYSTALCORE", "CLASSICCASTING", new AspectList(), 0, 2, 3, new ItemStack(CCBlocks.crystal)).setPages(
new ResearchPage("classiccasting.research_page.CRYSTALCORE.1"),
new ResearchPageInfusion(infusionRecipes.get("CrystalCore")),
new ResearchPage("classiccasting.research_page.CRYSTALCORE.2"),
new ResearchPage(magnetStructure)
).registerResearchItem();
}
}

View file

@ -307,10 +307,9 @@ public abstract class ItemWandCasting extends Item implements IWand {
result = WandManager.createArcaneFurnace(itemstack, player, world, x, y, z);
}
if ((bi == ConfigBlocks.blockCosmeticSolid || bi == CCBlocks.crystal)
// TODO: research
//&& ResearchManager.isResearchComplete(
// player.getDisplayName(), "CRYSTALCORE"
//)
&& ResearchManager.isResearchComplete(
player.getDisplayName(), "CRYSTALCORE"
)
) {
result = WandManager.createNodeMagnet(itemstack, player, world, x, y, z);
}

View file

@ -24,8 +24,18 @@ tile.classiccasting:crystal.1.name=Crystal Capacitor
tile.classiccasting:infusionWorkbench.name=Arcane Stone
# ---- RESEARCH ----
tc.research_category.CLASSICCASTING=Classic Casting
tc.research_name.MAGBLOCKS=Magical Building Blocks
tc.research_text.MAGBLOCKS=Putting it all together
classiccasting.research_page.MAGBLOCKS.1=You have found a way to merge the strength of stone with the resiliency of Thaumium. The result is a block quite resistant to daily wear and tear.<BR> More importantly, these arcane stone blocks are perfectly suited for the creation of magical constructs and structures (including Beacon bases).<BR> The lattice of Thaumium that forms the core of this block allows it to be easily transformed into a myriad of configurations.<BR> You have also discovered a technique of engraving and enchanting wood allowing it to be used for similar purposes.
classiccasting.research_page.MAGBLOCKS.2=By placing four Arcane Stone Blocks together (as shown on the right) and infusing them with vis with a wave of your wand, the stones will merge together into an Infusion Altar.<BR> The Infusion Altar can be used to perform any crafting a normal workbench and arcane worktable can. In addition it is able to infuse certain creations with mystical aspects allowing for the creation of objects of great magical power.<BR> To do this the Infusion Altar requires a source of aspects - a crucible is a good example of one such source. After placing the components in the Altar you should get an idea of what aspects are required to create the object.<BR> [continued]
classiccasting.research_page.MAGBLOCKS.3=If there is a source of those aspects nearby you should be able to craft the item. It should be noted that a single type of aspect can only come from a single source - the Infusion Altar cannot draw that aspect from multiple sources to reach the required amount. Different aspects can come from different sources though.<BR> If the source is a crucible you should note that once the aspects are drawn from it, any remaining aspects might be spilled into the aura as Flux.<BR> (Shift-clicking to create multiples of an item will only cause the spillage at the end of the creation process, allowing you to craft multiple items in one go.)
tc.research_name.CRYSTALCORE=Basic Aura Manipulation
tc.research_text.CRYSTALCORE=Magic at your beck and call
classiccasting.research_page.CRYSTALCORE.1=You have discovered the secret to moving aura nodes. Unfortunately it has proven to be quite difficult and expensive.<BR> You first need to create a Crystal Core. This fragile, but magicaly charged structure is capable of bending the aura around it. For now you will simply use it to draw nodes towards it.<BR> Crystal cores are very fragile and you must make sure to place them in the correct spot the first time. When broken they shatter into their component parts and need to be rebuilt.
classiccasting.research_page.CRYSTALCORE.2=Once you have constructed a crystal core, you need to place it amidst four Obsidian Totems. You have been unable to duplicate the construction of these arcane structures, but they can be found dotted across the countryside. It is unknown who (or what) placed them, but they are usually found near an aura node.<BR> Once the crystal core and totems have been placed a wave of your wand is all that is needed to activate the core. It will slowly draw the closest node within 24 blocks to itself with the end position of the node being the same as where you placed the crystal core.<BR> While the node is being moved it will slowly lose vis and flux will steadily build. The vis loss is not permanent.
tc.research_name.BASICFLUX=Basic Flux Research
tc.research_text.BASICFLUX=There must be ways to control it
classiccasting.research_page.BASICFLUX.1=You have taken your first steps towards understanding and managing Flux. Your research has led you to two practical applications: the Flux Filter and the Arcane Alembic.<BR> Flux Filters are crafted using gold and specially treated silverwood. It utilizes silverwood's natural ability to resist flux as a means of directing its flow and rendering it partially controllable.<BR> The flux filter serves no purpose by itself, but it forms a vital component of more complex machines, like the Arcane Alembic.
classiccasting.research_page.BASICFLUX.2=An Arcane Alembic needs to be attached to the side of a crucible. Any surplus mystical energy left over from working with the crucible would normally transform into flux and enter the aura, but the arcane alembic is capable of capturing some of the escaping energy and storing it.<BR> An arcane alembic can only store a single type of aspected energy at a time, and its storage capacity is severely limited. The energy trapped in the alembic can be siphoned off using glass phials. The resulting phials of aspected Essentia can then be reused for other tasks. The alembic can also directly act as a source of infusion crafting.<BR> [continued]
classiccasting.research_page.BASICFLUX.3=Using a wand on a filled alembic will also allow you to return its stored essentia to the crucible as long as its filled and boiling.<BR> Clicking with a wand while sneaking will spill the contents of the alembic into the aura.