feat: begin porting research and recipes

This commit is contained in:
Timo Ley 2022-12-17 16:11:41 +01:00
parent 8a99e292ac
commit 517a6945c8
6 changed files with 70 additions and 2 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.2.0:deobf"
implementation "dev.tilera:auracore:1.3.0:deobf"
implementation "com.github.tox1cozZ:mixin-booter-legacy:1.1.2"
}

View file

@ -3,6 +3,7 @@ package net.anvilcraft.classiccasting;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.EntityRegistry;
@ -45,6 +46,13 @@ public class ClassicCasting {
EntityFrostShard.class, "frostShard", entId++, this, 64, 20, true
);
Recipes.init();
proxy.init();
}
@Mod.EventHandler
public void postInit(FMLPostInitializationEvent ev) {
Research.init();
}
}

View file

@ -0,0 +1,14 @@
package net.anvilcraft.classiccasting;
import dev.tilera.auracore.api.Aspects;
import net.minecraft.item.ItemStack;
import thaumcraft.api.ThaumcraftApi;
import thaumcraft.api.aspects.AspectList;
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"));
}
}

View file

@ -0,0 +1,39 @@
package net.anvilcraft.classiccasting;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import dev.tilera.auracore.api.Aspects;
import net.minecraft.item.ItemStack;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.api.aspects.AspectList;
import thaumcraft.api.crafting.IArcaneRecipe;
import thaumcraft.api.research.ResearchItem;
import thaumcraft.api.research.ResearchPage;
import thaumcraft.common.config.ConfigBlocks;
public class Research {
public static List<Object> infusionStructure;
public static List<Object> magnetStructure;
public static Map<String, IArcaneRecipe> arcaneRecipes = new HashMap<>();
public static ItemStack empty = new ItemStack(ConfigBlocks.blockHole, 1, 15);
public static void init() {
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(
new ResearchPage("classiccasting.research_page.MAGBLOCKS.1"),
new ResearchPage(arcaneRecipes.get("ArcaneStone")),
new ResearchPage("classiccasting.research_page.MAGBLOCKS.2"),
new ResearchPage(infusionStructure),
new ResearchPage("classiccasting.research_page.MAGBLOCKS.3")
).setParents("THAUMIUM").registerResearchItem();
}
}

View file

@ -316,7 +316,7 @@ public abstract class ItemWandCasting extends Item implements IWand {
}
if (bi == CCBlocks.infusionWorkbench
/*&& ResearchManager.isResearchComplete(player.getDisplayName(), "MAGBLOCK")*/) {
&& ResearchManager.isResearchComplete(player.getDisplayName(), "MAGBLOCKS")) {
result
= WandManager.createInfusionWorkbench(itemstack, player, world, x, y, z);
}

View file

@ -22,3 +22,10 @@ tile.classiccasting:alembic.name=Arcane Alembic
tile.classiccasting:crystal.0.name=Crystal Core
tile.classiccasting:crystal.1.name=Crystal Capacitor
tile.classiccasting:infusionWorkbench.name=Arcane Stone
# ---- RESEARCH ----
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.)