generated from tilera/1710mod
feat: crystal cluster research
This commit is contained in:
parent
500643719f
commit
9ab5bd1406
5 changed files with 103 additions and 4 deletions
|
@ -23,7 +23,7 @@ apply plugin: 'maven-publish'
|
|||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
|
||||
version = "1.2.0"
|
||||
version = "1.3.0"
|
||||
group = "net.anvilcraft"
|
||||
archivesBaseName = "classic-casting"
|
||||
|
||||
|
@ -42,7 +42,7 @@ repositories {
|
|||
|
||||
dependencies {
|
||||
implementation "thaumcraft:Thaumcraft:1.7.10-4.2.3.5:deobf"
|
||||
implementation "dev.tilera:auracore:1.7.4:deobf"
|
||||
implementation "dev.tilera:auracore:1.8.5:deobf"
|
||||
implementation "com.github.tox1cozZ:mixin-booter-legacy:1.1.2"
|
||||
}
|
||||
|
||||
|
|
|
@ -62,5 +62,6 @@ public class ClassicCasting {
|
|||
@Mod.EventHandler
|
||||
public void postInit(FMLPostInitializationEvent ev) {
|
||||
Research.init();
|
||||
Recipes.removeClusters();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,10 +2,13 @@ package net.anvilcraft.classiccasting;
|
|||
|
||||
import dev.tilera.auracore.api.Aspects;
|
||||
import dev.tilera.auracore.api.AuracoreRecipes;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.CraftingManager;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
|
@ -343,5 +346,74 @@ public class Recipes {
|
|||
Items.ender_pearl
|
||||
)
|
||||
);
|
||||
addClusters();
|
||||
}
|
||||
|
||||
public static void addClusters() {
|
||||
for (int i = 0; i <= 10; i++) {
|
||||
if (i == 6 || i == 7 || i == 9) continue;
|
||||
int k = i > 6 ? i - 1 : i;
|
||||
Research.clusters[k] = AuracoreRecipes.addShapelessInfusionCraftingRecipe(
|
||||
"CRYSTALCLUSTER" + i,
|
||||
"CRYSTALCLUSTER",
|
||||
100,
|
||||
new AspectList()
|
||||
.add(Aspect.CRYSTAL, 8)
|
||||
.add(Aspect.MAGIC, 8)
|
||||
.add(Aspect.EXCHANGE, 8),
|
||||
new ItemStack(ConfigBlocks.blockCrystal, 1, i),
|
||||
new ItemStack(ConfigItems.itemShard, 1, k),
|
||||
new ItemStack(ConfigItems.itemShard, 1, k),
|
||||
new ItemStack(ConfigItems.itemShard, 1, k),
|
||||
new ItemStack(ConfigItems.itemShard, 1, k),
|
||||
new ItemStack(ConfigItems.itemShard, 1, k),
|
||||
new ItemStack(ConfigItems.itemShard, 1, k)
|
||||
);
|
||||
}
|
||||
Research.clusters[6] = AuracoreRecipes.addShapelessInfusionCraftingRecipe(
|
||||
"CRYSTALCLUSTER6",
|
||||
"CRYSTALCLUSTER",
|
||||
100,
|
||||
new AspectList()
|
||||
.add(Aspect.CRYSTAL, 8)
|
||||
.add(Aspect.MAGIC, 8)
|
||||
.add(Aspect.EXCHANGE, 8),
|
||||
new ItemStack(ConfigBlocks.blockCrystal, 1, 6),
|
||||
new ItemStack(ConfigItems.itemShard, 1, 0),
|
||||
new ItemStack(ConfigItems.itemShard, 1, 1),
|
||||
new ItemStack(ConfigItems.itemShard, 1, 2),
|
||||
new ItemStack(ConfigItems.itemShard, 1, 3),
|
||||
new ItemStack(ConfigItems.itemShard, 1, 4),
|
||||
new ItemStack(ConfigItems.itemShard, 1, 5)
|
||||
);
|
||||
Research.clusters[8] = AuracoreRecipes.addShapelessInfusionCraftingRecipe(
|
||||
"CRYSTALCLUSTER9",
|
||||
"CRYSTALCLUSTER",
|
||||
100,
|
||||
new AspectList()
|
||||
.add(Aspect.CRYSTAL, 8)
|
||||
.add(Aspect.MAGIC, 8)
|
||||
.add(Aspect.EXCHANGE, 8),
|
||||
new ItemStack(ConfigBlocks.blockCrystal, 1, 9),
|
||||
new ItemStack(ConfigItems.itemShard, 1, 0),
|
||||
new ItemStack(ConfigItems.itemShard, 1, 1),
|
||||
new ItemStack(ConfigItems.itemShard, 1, 2),
|
||||
new ItemStack(ConfigItems.itemShard, 1, 3),
|
||||
new ItemStack(ConfigItems.itemShard, 1, 7)
|
||||
);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static void removeClusters() {
|
||||
CraftingManager.getInstance().getRecipeList().removeIf((r) -> isCrystalCluster(r));
|
||||
}
|
||||
|
||||
public static boolean isCrystalCluster(Object recipe) {
|
||||
if (!(recipe instanceof IRecipe)) return false;
|
||||
IRecipe r = (IRecipe) recipe;
|
||||
ItemStack output = r.getRecipeOutput();
|
||||
if (output == null) return false;
|
||||
Item item = output.getItem();
|
||||
return Block.getBlockFromItem(item) == ConfigBlocks.blockCrystal;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,6 +24,7 @@ public class Research {
|
|||
public static List<Object> magnetStructure;
|
||||
public static Map<String, IArcaneRecipe> arcaneRecipes = new HashMap<>();
|
||||
public static Map<String, IInfusionRecipe> infusionRecipes = new HashMap<>();
|
||||
public static IInfusionRecipe[] clusters = new IInfusionRecipe[10];
|
||||
public static ItemStack empty = new ItemStack(ConfigBlocks.blockHole, 1, 15);
|
||||
|
||||
public static void init() {
|
||||
|
@ -164,7 +165,7 @@ public class Research {
|
|||
new ResearchPage("classiccasting.research_page.CRYSTALCORE.2"),
|
||||
new ResearchPage(magnetStructure)
|
||||
)
|
||||
.setParents("THETHEORYOFEVERYTHING")
|
||||
.setParents("THETHEORYOFEVERYTHING", "CRYSTALCLUSTER")
|
||||
.registerResearchItem();
|
||||
|
||||
new ResearchItem(
|
||||
|
@ -408,5 +409,26 @@ public class Research {
|
|||
)
|
||||
.setParents("UNIFIEDTHAUMICFIELDTHEORY", "ENCHFABRIC")
|
||||
.registerResearchItem();
|
||||
|
||||
ResearchPage crystalPage = new ResearchPageInfusion(clusters);
|
||||
crystalPage.recipeOutput = new ItemStack(ConfigBlocks.blockCrystal, 1, 9);
|
||||
new ResearchItem(
|
||||
"CRYSTALCLUSTER",
|
||||
"CLASSICCASTING",
|
||||
new AspectList()
|
||||
.add(Aspect.CRYSTAL, 24)
|
||||
.add(Aspect.MAGIC, 32)
|
||||
.add(Aspect.EXCHANGE, 24),
|
||||
-2,
|
||||
6,
|
||||
1,
|
||||
new ItemStack(ConfigBlocks.blockCrystal, 1, 9)
|
||||
)
|
||||
.setPages(
|
||||
new ResearchPage("classiccasting.research_page.CRYSTALCLUSTER"),
|
||||
crystalPage
|
||||
)
|
||||
.setParents("BASICFLUX")
|
||||
.registerResearchItem();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -96,4 +96,8 @@ classiccasting.research_page.CCAURA.2=or by being recharged by infused ore nearb
|
|||
tc.research_name.CCFLUX=Flux
|
||||
tc.research_text.CCFLUX=When magic goes wrong
|
||||
classiccasting.research_page.CCFLUX.1=Using magic is never without risks and nothing proves this as much as Flux. If the magical aura can be described as a still pool, Flux is the ripples and eddies caused by a rock dropped into it. It is not a corruption of the magic, but a disturbance – order turning to chaos and the natural laws being turned on their head. <BR>Luckily auras almost always strive for order and balance, and this usually means that Flux is purged from them in some way. The exact form this takes can vary vastly and depends on the type of flux present in the aura. The simplest and most common is the spontaneous generation
|
||||
classiccasting.research_page.CCFLUX.2=of the magical creatures known as Wisps. Lightning strikes, storms or mysterious illnesses or boons can all be held as examples of Flux being purged from an aura. <BR>Only the brave or foolish practices magic without keeping an eye on how much Flux they are letting loose into the environment.
|
||||
classiccasting.research_page.CCFLUX.2=of the magical creatures known as Wisps. Lightning strikes, storms or mysterious illnesses or boons can all be held as examples of Flux being purged from an aura. <BR>Only the brave or foolish practices magic without keeping an eye on how much Flux they are letting loose into the environment.
|
||||
|
||||
tc.research_name.CRYSTALCLUSTER=Crystal Clusters
|
||||
tc.research_text.CRYSTALCLUSTER=Oooh, pretty!
|
||||
classiccasting.research_page.CRYSTALCLUSTER=You have found a way to fuse the crystal shards into larger, more stable, crystalline clusters. These crystals thrum with magical energy and are quite pleasing to the eye. <BR>These crystals seem to be able to slowly replenish nearby aura nodes and even boost their vis levels above their normal baseline levels to a limited degree. Of course that will probably lead to Flux build-up, but the benefits may outweigh the negative side-effects.
|
Loading…
Reference in a new issue