feat: add researches for wands

This commit is contained in:
LordMZTE 2023-01-12 21:39:06 +01:00
parent a539810fe6
commit 2d2dc5cce5
Signed by: LordMZTE
GPG key ID: B64802DC33A64FF6
5 changed files with 317 additions and 3 deletions

View file

@ -2,12 +2,14 @@ package net.anvilcraft.classiccasting;
import dev.tilera.auracore.api.Aspects;
import dev.tilera.auracore.api.AuracoreRecipes;
import net.minecraft.init.Blocks;
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;
import thaumcraft.common.config.ConfigItems;
public class Recipes {
public static void init() {
@ -48,5 +50,138 @@ public class Recipes {
Items.nether_star }
)
);
Research.infusionRecipes.put(
"CrystalCapacitor",
AuracoreRecipes.addInfusionCraftingRecipe(
"CRYSTALCAPACITOR",
"CRYSTALCAPACITOR",
100,
new AspectList()
.add(Aspect.EXCHANGE, 16)
.add(Aspect.MAGIC, 16)
.add(Aspect.CRYSTAL, 16),
new ItemStack(CCBlocks.crystal, 1, 1),
"CCC",
"CWC",
"CCC",
'C',
new ItemStack(ConfigItems.itemShard, 1, 8),
'W',
// TODO: this is arcane wood, but that doesn't really exist yet.
// Just pretend the planks are magical
new ItemStack(Blocks.planks, 1, 0)
)
);
Research.infusionRecipes.put(
"AdeptWand",
AuracoreRecipes.addInfusionCraftingRecipe(
"ADEPTWAND",
"UNIFIEDTHAUMICFIELDTHEORY",
50,
new AspectList().add(Aspect.MAGIC, 16),
new ItemStack(CCItems.wandCastingAdept),
" A ",
"WSF",
" E ",
'S',
new ItemStack(CCItems.wandCastingApprentice, 1, 32767),
'A',
new ItemStack(ConfigItems.itemShard, 1, 0),
'F',
new ItemStack(ConfigItems.itemShard, 1, 1),
'W',
new ItemStack(ConfigItems.itemShard, 1, 2),
'E',
new ItemStack(ConfigItems.itemShard, 1, 3)
)
);
Research.infusionRecipes.put(
"WandFire",
AuracoreRecipes.addInfusionCraftingRecipe(
"WANDFIRE",
"WANDFIRE",
50,
new AspectList().add(Aspect.FIRE, 16).add(Aspect.WEAPON, 4),
new ItemStack(CCItems.wandFire),
"SS",
"WS",
'W',
new ItemStack(CCItems.wandCastingApprentice, 1, 32767),
'S',
new ItemStack(ConfigItems.itemShard, 1, 1)
)
);
Research.infusionRecipes.put(
"WandFrost",
AuracoreRecipes.addInfusionCraftingRecipe(
"WANDFROST",
"WANDFROST",
50,
new AspectList().add(Aspect.COLD, 16).add(Aspect.WEAPON, 4),
new ItemStack(CCItems.wandFrost),
"SS",
"WS",
'W',
new ItemStack(CCItems.wandCastingApprentice, 1, 32767),
'S',
new ItemStack(ConfigItems.itemShard, 1, 2)
)
);
Research.infusionRecipes.put(
"WandTrade",
AuracoreRecipes.addInfusionCraftingRecipe(
"WANDETRADE",
"WANDETRADE",
50,
new AspectList().add(Aspect.EXCHANGE, 16).add(Aspect.TOOL, 4),
new ItemStack(CCItems.wandTrade),
"SS",
"WS",
'W',
new ItemStack(CCItems.wandCastingApprentice, 1, 32767),
'S',
new ItemStack(ConfigItems.itemShard, 1, 4)
)
);
Research.infusionRecipes.put(
"WandExcavate",
AuracoreRecipes.addInfusionCraftingRecipe(
"WANDEXCAVATE",
"WANDEXCAVATE",
50,
new AspectList().add(Aspect.METAL, 16).add(Aspect.TOOL, 4),
new ItemStack(CCItems.wandExcavation),
"SS",
"WS",
'W',
new ItemStack(CCItems.wandCastingApprentice, 1, 32767),
'S',
new ItemStack(ConfigItems.itemShard, 1, 3)
)
);
Research.infusionRecipes.put(
"WandLightning",
AuracoreRecipes.addInfusionCraftingRecipe(
"WANDLIGHTNING",
"WANDLIGHTNING",
50,
// TODO: this used to be Aspect.POWER. is ENERGY correct?
new AspectList().add(Aspect.ENERGY, 16).add(Aspect.WEAPON, 4),
new ItemStack(CCItems.wandLightning),
"SS",
"WS",
'W',
new ItemStack(CCItems.wandCastingApprentice, 1, 32767),
'S',
new ItemStack(ConfigItems.itemShard, 1, 0)
)
);
}
}

View file

@ -108,7 +108,13 @@ public class Research {
new ResearchItem(
"CRYSTALCORE",
"CLASSICCASTING",
new AspectList(),
new AspectList()
.add(Aspect.MAGIC, 32)
.add(Aspects.CONTROL, 32)
.add(Aspect.EXCHANGE, 24)
.add(Aspects.FLUX, 16)
.add(Aspect.MOTION, 32)
.add(Aspect.VOID, 16),
0,
2,
3,
@ -121,5 +127,146 @@ public class Research {
new ResearchPage(magnetStructure)
)
.registerResearchItem();
new ResearchItem(
"CRYSTALCAPACITOR",
"CLASSICCASTING",
new AspectList()
.add(Aspect.CRYSTAL, 24)
.add(Aspect.MAGIC, 32)
.add(Aspect.EXCHANGE, 24),
-2,
2,
1,
new ItemStack(CCBlocks.crystal, 1, 1)
)
.setPages(
new ResearchPage("classiccasting.research_page.CRYSTALCORE"),
new ResearchPageInfusion(infusionRecipes.get("CrystalCapacitor"))
)
.setParents("CRYSTALCORE")
.registerResearchItem();
int utftCol = 3;
int utftRow = -2;
new ResearchItem(
"UNIFIEDTHAUMICFIELDTHEORY",
"CLASSICCASTING",
new AspectList()
.add(Aspect.MIND, 8)
.add(Aspects.FLUX, 8)
.add(Aspect.MAGIC, 8)
.add(Aspect.FIRE, 8)
.add(Aspect.AIR, 8)
.add(Aspect.EARTH, 8)
.add(Aspect.WATER, 8)
.add(Aspects.TIME, 4),
utftCol,
utftRow,
3,
new ResourceLocation(
"classiccasting", "textures/misc/unified_thaumic_field_theory.png"
)
)
.setPages(
new ResearchPage("classiccasting.research_page.UNIFIEDTHAUMICFIELDTHEORY"
),
new ResearchPageInfusion(infusionRecipes.get("AdeptWand"))
)
.setSpecial()
.registerResearchItem();
new ResearchItem(
"WANDFIRE",
"CLASSICCASTING",
new AspectList()
.add(Aspects.DESTRUCTION, 8)
.add(Aspect.MAGIC, 8)
.add(Aspect.WEAPON, 8)
.add(Aspect.FIRE, 8),
utftCol + 1,
utftRow + 2,
2,
new ItemStack(CCItems.wandFire)
)
.setPages(
new ResearchPage("classiccasting.research_page.WANDFIRE"),
new ResearchPageInfusion(infusionRecipes.get("WandFire"))
)
.setParents("UNIFIEDTHAUMICFIELDTHEORY")
.registerResearchItem();
new ResearchItem(
"WANDFROST",
"CLASSICCASTING",
new AspectList().add(Aspect.COLD, 16).add(Aspect.WEAPON, 4),
utftCol + 1,
utftRow + 3,
2,
new ItemStack(CCItems.wandFrost)
)
.setPages(
new ResearchPage("classiccasting.research_page.WANDFROST"),
new ResearchPageInfusion(infusionRecipes.get("WandFrost"))
)
.setParents("UNIFIEDTHAUMICFIELDTHEORY")
.registerResearchItem();
new ResearchItem(
"WANDTRADE",
"CLASSICCASTING",
new AspectList()
.add(Aspect.EXCHANGE, 16)
.add(Aspect.MAGIC, 8)
.add(Aspect.TOOL, 8),
utftCol - 1,
utftRow + 4,
2,
new ItemStack(CCItems.wandTrade)
)
.setPages(
new ResearchPage("classiccasting.research_page.WANDTRADE"),
new ResearchPageInfusion(infusionRecipes.get("WandTrade"))
)
.setParents("UNIFIEDTHAUMICFIELDTHEORY")
.registerResearchItem();
new ResearchItem(
"WANDEXCAVATE",
"CLASSICCASTING",
new AspectList().add(Aspect.METAL, 16).add(Aspect.TOOL, 4),
utftCol - 1,
utftRow + 3,
2,
new ItemStack(CCItems.wandExcavation)
)
.setPages(
new ResearchPage("classiccasting.research_page.WANDEXCAVATE"),
new ResearchPageInfusion(infusionRecipes.get("WandExcavate"))
)
.setParents("UNIFIEDTHAUMICFIELDTHEORY")
.registerResearchItem();
new ResearchItem(
"WANDLIGHTNING",
"CLASSICCASTING",
new AspectList()
.add(Aspects.DESTRUCTION, 8)
.add(Aspect.MAGIC, 8)
.add(Aspect.WEAPON, 8)
// TODO: this used to be Aspect.POWER. is ENERGY correct?
.add(Aspect.ENERGY, 8),
utftCol + 1,
utftRow + 4,
2,
new ItemStack(CCItems.wandLightning)
)
.setPages(
new ResearchPage("classiccasting.research_page.WANDLIGHTNING"),
new ResearchPageInfusion(infusionRecipes.get("wandLightning"))
)
.setParents("UNIFIEDTHAUMICFIELDTHEORY")
.registerResearchItem();
}
}
}

View file

@ -365,7 +365,8 @@ public abstract class ItemWandCasting extends Item implements IWand {
}
CrucibleRecipe recipe
= AuracoreRecipes.getCrucibleRecipe(tile2.aspects, tile2);
if (WandManager.spendCharge(
if (recipe != null
&& WandManager.spendCharge(
world,
itemstack,
player,

View file

@ -25,17 +25,48 @@ 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.
tc.research_name.CRYSTALCAPACITOR=Crystal Capacitor
tc.research_text.CRYSTALCAPACITOR=Storing vis for a rainy day.
classiccasting.research_page.CRYSTALCORE=You have found of a way of restoring the vis absorption properties to dull crystals. By combining eight of these crystals you can create a crystal capacitor that functions in much the same way as infused ore.<BR><BR>Each crystal capacitor can store up to 100 vis and will slowly absorb or release vis if nearby nodes are above or below their baseline levels. It can only absorb or release 1 vis every 5 seconds.<BR><BR>The capacitor can be safely moved without losing any stored vis.
tc.research_name.UNIFIEDTHAUMICFIELDTHEORY=Unified Thaumic Field Theory
tc.research_text.UNIFIEDTHAUMICFIELDTHEORY=All is becoming clear
classiccasting.research_page.UNIFIEDTHAUMICFIELDTHEORY=You have formulated a theory on how the natural and elemental world interacts with the mystical. You finally have a grasp on how the Aura saturates everything and everyone.<BR><BR>Not only is this knowledge enlightening, it has some practical applications. The first such practical application is an improvement to your casting wand. You now know how to create a Wand of the Adept. <BR><BR>It is similar to the Wand of the Apprentice, except it is able to store much more vis thus allowing for larger and more complex feats of magic. It also recharges faster.
tc.research_name.WANDFIRE=Wand of Fire
tc.research_text.WANDFIRE=Light them up
classiccasting.research_page.WANDFIRE=You have successfully adapted the enchantment on an apprentice wand. It is now capable of sending forth a cone of elemental fire, burning all in its wake.<BR><BR>However the wand has lost the ability to renew its charge and will eventually run out of energy and break.
tc.research_name.WANDFROST=Wand of Frost
tc.research_text.WANDFROST=Revenge is a dish best served cold
classiccasting.research_page.WANDFROST=You have successfully adapted the enchantment on an apprentice wand. It is now capable of hurling chunks of ice. <BR><BR>The wand isn't particularly accurate, and the loose chunks of ice tends to bounce all over the place so take care not to use it near anything fragile. The ice chunks will also freeze any water source blocks they come into contact with.<BR><BR>The wand has lost the ability to renew its charge and will eventually run out of energy and break.
tc.research_name.WANDTRADE=Wand of Equal Trade
tc.research_text.WANDTRADE=This for That
classiccasting.research_page.WANDTRADE=You have successfully adapted the enchantment on an apprentice wand. You can use it to trade dozens of blocks in the world with some you are carrying.<BR><BR>You must first choose the block you wish to change other blocks into by sneaking and right clicking on the desired block. When you then left-click on another block it will turn into the target block. Right clicking will transform a whole swathe of blocks.<BR><BR>You must be carrying enough target blocks, and the transformed blocks will replace them in your inventory. Only blocks with at least one face adjacent to open air or non-solid blocks will be transformed.
tc.research_name.WANDEXCAVATE=Wand of Excavation
tc.research_text.WANDEXCAVATE=Terra Terror
classiccasting.research_page.WANDEXCAVATE=You have successfully adapted the enchantment on an apprentice wand. You have turned it into a tool capable of moving vast amounts of earth and stone with little effort. <BR><BR>Simply point it at what you want to excavate and the magic does the rest. Tougher materials take longer to mine, and anything other than earth, stone or similar materials will take much longer to mine.
tc.research_name.WANDLIGHTNING=Wand of Lightning
tc.research_text.WANDLIGHTNING=...very, very frightening
classiccasting.research_page.WANDLIGHTNING=You have successfully adapted the enchantment on an apprentice wand. It is now capable of focusing elemental energy into bolts of lightning.<BR><BR>However the wand has lost the ability to renew its charge and will eventually run out of energy and break.

Binary file not shown.

After

Width:  |  Height:  |  Size: 550 B