Played around a bit more with the guide. Added a simple recipe getter for the recipe pages.
This commit is contained in:
parent
7c1cbb2503
commit
9e7517459e
|
@ -17,7 +17,6 @@ import java.awt.Color;
|
|||
|
||||
public class GuideBloodMagic
|
||||
{
|
||||
|
||||
public static Book guideBook;
|
||||
|
||||
public static void initBook()
|
||||
|
|
|
@ -1,31 +1,47 @@
|
|||
package WayofTime.bloodmagic.compat.guideapi.book;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.compat.guideapi.entry.EntryText;
|
||||
import WayofTime.bloodmagic.registry.ModItems;
|
||||
import WayofTime.bloodmagic.util.helper.RecipeHelper;
|
||||
import WayofTime.bloodmagic.util.helper.TextHelper;
|
||||
import amerifrance.guideapi.api.IPage;
|
||||
import amerifrance.guideapi.api.impl.abstraction.EntryAbstract;
|
||||
import amerifrance.guideapi.api.util.PageHelper;
|
||||
import amerifrance.guideapi.page.PageIRecipe;
|
||||
|
||||
public class CategoryDemon
|
||||
{
|
||||
|
||||
public static Map<ResourceLocation, EntryAbstract> buildCategory()
|
||||
{
|
||||
Map<ResourceLocation, EntryAbstract> entries = new HashMap<ResourceLocation, EntryAbstract>();
|
||||
Map<ResourceLocation, EntryAbstract> entries = new LinkedHashMap<ResourceLocation, EntryAbstract>();
|
||||
String keyBase = "guide." + Constants.Mod.MODID + ".entry.demon.";
|
||||
|
||||
List<IPage> ritualPages = new ArrayList<IPage>();
|
||||
ritualPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "intro" + ".info"), 270));
|
||||
// ritualPages.add(new PageImage(new ResourceLocation("bloodmagicguide", "textures/guide/" + ritual.getName() + ".png")));
|
||||
List<IPage> introPages = new ArrayList<IPage>();
|
||||
introPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "intro" + ".info"), 270));
|
||||
// introPages.add(new PageImage(new ResourceLocation("bloodmagicguide", "textures/guide/" + ritual.getName() + ".png")));
|
||||
entries.put(new ResourceLocation(keyBase + "intro"), new EntryText(introPages, TextHelper.localize(keyBase + "intro"), false));
|
||||
// CraftingManager.getInstance().g
|
||||
|
||||
entries.put(new ResourceLocation(keyBase + "intro"), new EntryText(ritualPages, TextHelper.localize("Test"), true));
|
||||
List<IPage> snarePages = new ArrayList<IPage>();
|
||||
snarePages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "snare" + ".info.1"), 270));
|
||||
|
||||
IRecipe snareRecipe = RecipeHelper.getRecipeForOutput(new ItemStack(ModItems.soulSnare));
|
||||
if (snareRecipe != null)
|
||||
{
|
||||
snarePages.add(new PageIRecipe(snareRecipe));
|
||||
}
|
||||
|
||||
snarePages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "snare" + ".info.2"), 270));
|
||||
entries.put(new ResourceLocation(keyBase + "snare"), new EntryText(snarePages, TextHelper.localize(keyBase + "snare"), false));
|
||||
|
||||
return entries;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
package WayofTime.bloodmagic.util.helper;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.CraftingManager;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
|
||||
public class RecipeHelper
|
||||
{
|
||||
public static IRecipe getRecipeForOutput(ItemStack stack)
|
||||
{
|
||||
for (IRecipe recipe : CraftingManager.getInstance().getRecipeList())
|
||||
{
|
||||
if (recipe != null)
|
||||
{
|
||||
ItemStack resultStack = recipe.getRecipeOutput();
|
||||
if (resultStack != null && resultStack.getItem() != null)
|
||||
{
|
||||
if (resultStack.getItem() == stack.getItem() && resultStack.getItemDamage() == stack.getItemDamage())
|
||||
{
|
||||
return recipe;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -25,5 +25,13 @@ guide.BloodMagic.entry.architect.intro.1=My name is Tiberius. I was a kid when t
|
|||
guide.BloodMagic.entry.architect.bloodAltar.1=To start any form of transmutation involving blood, you would need to construct a blood altar and a sacrificial knife, as well as have a solitary diamond in your possession. After placing the blood altar down, Magus advised me to be careful as I filled it slowly with my blood, and said that I would need to be really close to the altar (about a metre) for the knife to work. With about 2 buckets of blood in the altar, which Master Magus reminds me is about 10 hearts worth, I placed the diamond inside of the altar by activating it with the diamond in hand.
|
||||
guide.BloodMagic.entry.architect.bloodAltar.2=The blood dissipated in a cloud of red swirls as I waited for the atoms of the diamond to shift and reform. There were a few moments where the particles turned gray, which meant that the altar was empty and I had to hurry to fill it. After the diamond burst in a shower of red particles, what finally sat in the altar was a Weak Blood Orb.
|
||||
|
||||
# Demon Kin Entries
|
||||
guide.BloodMagic.entry.demon.intro=Bella Highborn
|
||||
guide.BloodMagic.entry.demon.snare=Demon Will and Snares
|
||||
|
||||
# Demon Kin Entry Texts
|
||||
guide.BloodMagic.entry.demon.intro.info=My name is Bella Highborn, and I am known as the Demon Kin. Several months ago my village was attacked by a wave of demons, killing all other people while destroying every single building. I don't remember much from the attack, other than the screams of pain as each and every person I knew left this world for a happier one. Thankfully the demons did not hear me as I cowered underneath the fruit baskets in the basement of the church of Intactilis, trying desperately to keep my screams from joining the chorus of other voices. \nThere was one horrible moment when I accidentally knocked down the incense altar of the church and a demon came bounding into the sanctuary, unperturbed by what we assumed was a sacred place. It was a huge four-legged monster, with curved tusks hanging past a jutting mouth, saliva dripping onto serrated swords taking the place of his claws. It took a look around the room and I swear it locked eyes with me for a solid second, but then it just simply left as if it neither heard nor saw anything. Everything afterwards was a blur. \nIt was a full day before anyone came to see what happened. A trading caravan saw the smoke in the distance and decided to take the long way around past the demons. Many of the traders didn't even want to look at me, fearing that because I alone managed to survive unscathed it was a bad omen. But two brothers decided to take pity on me and try to convince the rest of the caravan to consider having me ride along. It took me selling the priestess's wand and locket, but I managed to buy safe passage to a village far enough away from the demons' path of destruction.
|
||||
guide.BloodMagic.entry.demon.snare.info.1=Magus was telling me one day that every living being has a soul: humans, chicken, sheep, and even creepers have this life force that would give the body the will to live. It seems that Magus has done a lot of experiments in his time, and has even heard of a powerful mage that could take these souls and transfuse them into empty vessels such as zombies. But that made me wonder: if zombies and skeletons did not have souls, how is it that they had a will to live? What animated them so that they would try to hunt down any living creature and try to kill them? \n\tIt all came back to will, each and every single time. Anything "living" had to have a will in order to survive, but it didn't mean that it had to be their own. When I brought this up to Magus he pondered a little, and then brought out a blackboard and chalk (from where, who knows) and started to sketch some notes about other forms of magic. "In Thaumaturgy," he said while sketching out the form of a straw man, "golems are animated beings that are tasked to perform many mundane operations. They live, breathe, and can even die if they fall out of favour with their masters. In the current iteration of Thaumaturgy, and yes there have been several versions of this art over the centuries, the magician would imbue their will into their inanimate creation and bring them to life.\n\t"That, Bella, is how golems operate: by an imbuement of will."\n\tSo if a golem could live by another entity imbuing its will into an empty shell, maybe some other entity is imbuing its will into the bodies of the dead, bringing zombies and skeletons into existence. At this point I shivered, remembering briefly what happened in my old village. Only a demon could do something so cruel. But to test this hypothesis, I needed more proof.
|
||||
guide.BloodMagic.entry.demon.snare.info.2=With some direction from Magus, and Tiberius when he could lend a hand from his own work, I made myself a rudimentary snare out of some iron, string, and a bit of redstone. Tiberius, who studied Thaumaturgy in-depth as his cross-discipline magic of choice, said that the snare should be able to disrupt the will of an entity that is controlling an animated object. "I was messing around with this when playing around with golems," he said with a smile. We all knew how well that turned out. "Redstone seemed to disrupt the connection between my golems and my will for them to move. In theory, if something is controlling the zombies or skeletons, you should be able to cut off the will."\n\tHe said that all I needed to do was to throw it – if it worked, some white dust should stream off of the entity for a period of time. "So you have to kill it after this happens in order for anything to really happen. But the snare might only work 25%% of the time, so be slightly liberal with them!"\n\tAfter crafting sixteen of them, I went out with my sword during the night. It was quite tricky, actually: I had to track down several zombies, ducking and dodging their lumbering swipes while chucking a few snares at them. Once the white particles came off of them, I killed them swiftly and picked up what was left of their bodies. A small amount of a blue viscous fluid seemed to lay in the gritty dust, beckoning to me. I picked it up, and it seemed like there was some otherworldly "presence" coming from the fluid. Quickly stowing the samples away, I elected to look at them more deeply when I got back home. \n\tIt seemed that the size and shape of each "Demonic Will" varied, as if the quality of the will depended on the source. Using a completely arbitrary unit of measurement, the Will that I got from the snares seem to range from zero to five "Will Quality". I am not sure what I can use this substance for yet, but it is very intriguing none the less. I can't tell if this is the imprint of the will of some sort of demon, or just a random crystal found in their bodies. More research is needed.
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue