Book Updates (#1740)

* Remove Living Armor Extra Recipe Mappings

They don't work, likely due to data on the JEI item.  They were also putting errors in the log due to pointing at nonexistant page 4 (starts counting from 0).

* Added more Setup info to Resonance of the Faceted Crystal Ritual.

* Updated "Use Ritual Diviner" Message on Each Ritual.

Let's correctly spell "conStruction" and add links to the Ritual Diviner's page.

I also added a link Anchor to the Ritual Diviner's Dusk version page, and linked each ritual to the appropriate one (Dusk to the Dusk page, and the normal one to the start of the entry)

* Added Error Handling to Patchouli Processors

If a recipe doesn't exist at all, this should log an error and move past it.

* Patchouli Processor Improvements

As recommended by TehNut over Discord.

* Resonance of the Faceted Crystal only needs 5 spires on the Raw Crystal Cluster

* Removed No Longer Needed Examples, Renamed Tome of Peritia Entry

The Double-Array Examles aren't needed anymore since they are actually being used now.

Renaming the Tome of Peritia entry to not end in book.json means the dev environment doesn't try to use it when setting up the book.

* Removed Duplicated Assets

These two folders were renamed to use snake_case when we initially updated the book.  I forgot to properly replace the originals and ended up just duplicating them.

* Removed a Few More Unused Assets

These are from before we put all of the Guide's Crafting GUI elements on one texture (located in the textures/gui/patchouli_book folder) to save space.

* Expanded Aspected Will Entry

Note that Sentient Tools will use the largest will type in the player's inventory.

Co-Authored-By: wrincewind <1457878+wrincewind@users.noreply.github.com>

Co-authored-by: wrincewind <1457878+wrincewind@users.noreply.github.com>
This commit is contained in:
VT-14 2021-01-05 17:34:22 -05:00 committed by GitHub
parent 48ef87303a
commit 8e6f36d2a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
33 changed files with 85 additions and 99 deletions

View file

@ -1,6 +1,7 @@
package wayoftime.bloodmagic.compat.patchouli.processors;
import java.util.Arrays;
import java.util.Optional;
import java.util.stream.Collectors;
import org.apache.logging.log4j.LogManager;
@ -23,14 +24,18 @@ public class ARCProcessor implements IComponentProcessor
public void setup(IVariableProvider variables)
{
ResourceLocation id = new ResourceLocation(variables.get("recipe").asString());
IRecipe<?> recipe = Minecraft.getInstance().world.getRecipeManager().getRecipe(id).get();
if (recipe.getType().equals(BloodMagicRecipeType.ARC))
Optional<? extends IRecipe<?>> recipeHandler = Minecraft.getInstance().world.getRecipeManager().getRecipe(id);
if (recipeHandler.isPresent())
{
this.recipe = (RecipeARC) recipe;
IRecipe<?> recipe = recipeHandler.get();
if (recipe.getType().equals(BloodMagicRecipeType.ARC))
{
this.recipe = (RecipeARC) recipe;
}
}
if (this.recipe == null)
{
LogManager.getLogger().warn("Guidebook missing Alchemical Reaction Chamber recipe " + id);
LogManager.getLogger().warn("Guidebook missing Alchemical Reaction Chamber recipe {}", id);
}
}
@ -42,7 +47,7 @@ public class ARCProcessor implements IComponentProcessor
return null;
} else if (key.startsWith("output"))
{
int index = Integer.parseInt(key.substring("output".length())) - 1;
int index = Integer.parseInt(key.substring(6)) - 1;
if (recipe.getAllListedOutputs().size() > index)
{
return IVariable.from(recipe.getAllListedOutputs().get(index));
@ -52,7 +57,7 @@ public class ARCProcessor implements IComponentProcessor
}
} else if (key.startsWith("chance"))
{
int index = Integer.parseInt(key.substring("chance".length())) - 2; // Index 0 = 2nd output.
int index = Integer.parseInt(key.substring(6)) - 2; // Index 0 = 2nd output.
if (recipe.getAllOutputChances().length > index)
{
double chance = recipe.getAllOutputChances()[index] * 100;
@ -64,7 +69,7 @@ public class ARCProcessor implements IComponentProcessor
}
} else if (key.startsWith("show_chance"))
{
int index = Integer.parseInt(key.substring("show_chance".length())) - 2; // Index 0 = 2nd output.
int index = Integer.parseInt(key.substring(11)) - 2; // Index 0 = 2nd output.
if (recipe.getAllOutputChances().length > index)
{
return IVariable.wrap(true);

View file

@ -1,6 +1,7 @@
package wayoftime.bloodmagic.compat.patchouli.processors;
import java.util.Arrays;
import java.util.Optional;
import java.util.stream.Collectors;
import org.apache.logging.log4j.LogManager;
@ -22,14 +23,18 @@ public class AlchemyArrayProcessor implements IComponentProcessor
public void setup(IVariableProvider variables)
{
ResourceLocation id = new ResourceLocation(variables.get("recipe").asString());
IRecipe<?> recipe = Minecraft.getInstance().world.getRecipeManager().getRecipe(id).get();
if (recipe.getType().equals(BloodMagicRecipeType.ARRAY))
Optional<? extends IRecipe<?>> recipeHandler = Minecraft.getInstance().world.getRecipeManager().getRecipe(id);
if (recipeHandler.isPresent())
{
this.recipe = (RecipeAlchemyArray) recipe;
IRecipe<?> recipe = Minecraft.getInstance().world.getRecipeManager().getRecipe(id).get();
if (recipe.getType().equals(BloodMagicRecipeType.ARRAY))
{
this.recipe = (RecipeAlchemyArray) recipe;
}
}
if (this.recipe == null)
{
LogManager.getLogger().warn("Guidebook missing Alchemy Array recipe " + id);
LogManager.getLogger().warn("Guidebook missing Alchemy Array recipe {}", id);
}
}

View file

@ -1,6 +1,7 @@
package wayoftime.bloodmagic.compat.patchouli.processors;
import java.util.Arrays;
import java.util.Optional;
import java.util.stream.Collectors;
import org.apache.logging.log4j.LogManager;
@ -25,14 +26,18 @@ public class AlchemyTableProcessor implements IComponentProcessor
public void setup(IVariableProvider variables)
{
ResourceLocation id = new ResourceLocation(variables.get("recipe").asString());
IRecipe<?> recipe = Minecraft.getInstance().world.getRecipeManager().getRecipe(id).get();
if (recipe.getType().equals(BloodMagicRecipeType.ALCHEMYTABLE))
Optional<? extends IRecipe<?>> recipeHandler = Minecraft.getInstance().world.getRecipeManager().getRecipe(id);
if (recipeHandler.isPresent())
{
this.recipe = (RecipeAlchemyTable) recipe;
IRecipe<?> recipe = recipeHandler.get();
if (recipe.getType().equals(BloodMagicRecipeType.ALCHEMYTABLE))
{
this.recipe = (RecipeAlchemyTable) recipe;
}
}
if (this.recipe == null)
{
LogManager.getLogger().warn("Guidebook missing Alchemy Table recipe " + id);
LogManager.getLogger().warn("Guidebook missing Alchemy Table recipe {}", id);
}
}
@ -44,7 +49,7 @@ public class AlchemyTableProcessor implements IComponentProcessor
return null;
} else if (key.startsWith("input"))
{
int index = Integer.parseInt(key.substring("input".length())) - 1;
int index = Integer.parseInt(key.substring(5)) - 1;
if (recipe.getInput().size() > index)
{
return IVariable.wrapList(Arrays.stream(recipe.getInput().get(index).getMatchingStacks()).map(IVariable::from).collect(Collectors.toList()));
@ -78,7 +83,7 @@ public class AlchemyTableProcessor implements IComponentProcessor
// case 6: return IVariable.from(new
// ItemStack(BloodMagicItems.TRANSCENDENT_BLOOD_ORB.get()));
default:
LogManager.getLogger().warn("Guidebook unable to find large enough Blood Orb for " + recipe.getId());
LogManager.getLogger().warn("Guidebook unable to find large enough Blood Orb for {}", recipe.getId());
return IVariable.from(new ItemStack(Items.BARRIER));
}
default:

View file

@ -1,6 +1,7 @@
package wayoftime.bloodmagic.compat.patchouli.processors;
import java.util.Arrays;
import java.util.Optional;
import java.util.stream.Collectors;
import org.apache.logging.log4j.LogManager;
@ -22,14 +23,18 @@ public class BloodAltarProcessor implements IComponentProcessor
public void setup(IVariableProvider variables)
{
ResourceLocation id = new ResourceLocation(variables.get("recipe").asString());
IRecipe<?> recipe = Minecraft.getInstance().world.getRecipeManager().getRecipe(id).get();
if (recipe.getType().equals(BloodMagicRecipeType.ALTAR))
Optional<? extends IRecipe<?>> recipeHandler = Minecraft.getInstance().world.getRecipeManager().getRecipe(id);
if (recipeHandler.isPresent())
{
this.recipe = (RecipeBloodAltar) recipe;
IRecipe<?> recipe = recipeHandler.get();
if (recipe.getType().equals(BloodMagicRecipeType.ALTAR))
{
this.recipe = (RecipeBloodAltar) recipe;
}
}
if (this.recipe == null)
{
LogManager.getLogger().warn("Guidebook missing Blood Altar recipe " + id);
LogManager.getLogger().warn("Guidebook missing Blood Altar recipe {}", id);
}
}

View file

@ -1,6 +1,7 @@
package wayoftime.bloodmagic.compat.patchouli.processors;
import java.util.Arrays;
import java.util.Optional;
import java.util.stream.Collectors;
import org.apache.logging.log4j.LogManager;
@ -25,14 +26,18 @@ public class TartaricForgeProcessor implements IComponentProcessor
public void setup(IVariableProvider variables)
{
ResourceLocation id = new ResourceLocation(variables.get("recipe").asString());
IRecipe<?> recipe = Minecraft.getInstance().world.getRecipeManager().getRecipe(id).get();
if (recipe.getType().equals(BloodMagicRecipeType.TARTARICFORGE))
Optional<? extends IRecipe<?>> recipeHandler = Minecraft.getInstance().world.getRecipeManager().getRecipe(id);
if (recipeHandler.isPresent())
{
this.recipe = (RecipeTartaricForge) recipe;
IRecipe<?> recipe = recipeHandler.get();
if (recipe.getType().equals(BloodMagicRecipeType.TARTARICFORGE))
{
this.recipe = (RecipeTartaricForge) recipe;
}
}
if (this.recipe == null)
{
LogManager.getLogger().warn("Guidebook missing Hellfire Forge recipe " + id);
LogManager.getLogger().warn("Guidebook missing Hellfire Forge recipe {}", id);
}
}
@ -45,7 +50,7 @@ public class TartaricForgeProcessor implements IComponentProcessor
}
if (key.startsWith("input"))
{
int index = Integer.parseInt(key.substring("input".length())) - 1;
int index = Integer.parseInt(key.substring(5)) - 1;
if (recipe.getInput().size() > index)
{
return IVariable.wrapList(Arrays.stream(recipe.getInput().get(index).getMatchingStacks()).map(IVariable::from).collect(Collectors.toList()));
@ -83,7 +88,7 @@ public class TartaricForgeProcessor implements IComponentProcessor
// }
} else
{
LogManager.getLogger().warn("Guidebook could not find a large enough Tartaric Gem for " + recipe.getId());
LogManager.getLogger().warn("Guidebook could not find a large enough Tartaric Gem for {}", recipe.getId());
return IVariable.from(new ItemStack(Items.BARRIER));
}