diff --git a/src/main/java/de/ellpeck/naturesaura/compat/patchouli/ProcessorOffering.java b/src/main/java/de/ellpeck/naturesaura/compat/patchouli/ProcessorOffering.java new file mode 100644 index 00000000..70364724 --- /dev/null +++ b/src/main/java/de/ellpeck/naturesaura/compat/patchouli/ProcessorOffering.java @@ -0,0 +1,35 @@ +package de.ellpeck.naturesaura.compat.patchouli; + +import de.ellpeck.naturesaura.api.NaturesAuraAPI; +import de.ellpeck.naturesaura.api.recipes.OfferingRecipe; +import net.minecraft.util.ResourceLocation; +import vazkii.patchouli.api.IComponentProcessor; +import vazkii.patchouli.api.IVariableProvider; +import vazkii.patchouli.api.PatchouliAPI; + +public class ProcessorOffering implements IComponentProcessor { + + private OfferingRecipe recipe; + + @Override + public void setup(IVariableProvider provider) { + ResourceLocation res = new ResourceLocation(provider.get("recipe")); + this.recipe = NaturesAuraAPI.OFFERING_RECIPES.get(res); + } + + @Override + public String process(String key) { + switch (key) { + case "input": + return PatchouliAPI.instance.serializeIngredient(this.recipe.input); + case "output": + return PatchouliAPI.instance.serializeItemStack(this.recipe.output); + case "start": + return PatchouliAPI.instance.serializeIngredient(this.recipe.startItem); + case "name": + return this.recipe.output.getDisplayName(); + default: + return null; + } + } +} diff --git a/src/main/java/de/ellpeck/naturesaura/recipes/ModRecipes.java b/src/main/java/de/ellpeck/naturesaura/recipes/ModRecipes.java index 34fe06d7..253127cc 100644 --- a/src/main/java/de/ellpeck/naturesaura/recipes/ModRecipes.java +++ b/src/main/java/de/ellpeck/naturesaura/recipes/ModRecipes.java @@ -61,7 +61,7 @@ public final class ModRecipes { Ingredient.fromStacks(new ItemStack(Blocks.STONEBRICK, 1, 1)), Helper.blockIng(ModBlocks.INFUSED_STONE), Ingredient.fromItem(Items.BREWING_STAND), - Ingredient.fromItem(Items.GOLD_INGOT), + Ingredient.fromItem(ModItems.SKY_INGOT), Ingredient.fromItem(ModItems.GOLD_LEAF), Helper.blockIng(Blocks.GLOWSTONE)).register(); diff --git a/src/main/resources/assets/naturesaura/advancements/conversion_catalyst.json b/src/main/resources/assets/naturesaura/advancements/conversion_catalyst.json index fded579a..6f91e05f 100644 --- a/src/main/resources/assets/naturesaura/advancements/conversion_catalyst.json +++ b/src/main/resources/assets/naturesaura/advancements/conversion_catalyst.json @@ -10,7 +10,7 @@ "translate": "advancement.naturesaura.conversion_catalyst.desc" } }, - "parent": "naturesaura:infused_materials", + "parent": "naturesaura:sky_ingot", "criteria": { "catalyst": { "trigger": "minecraft:inventory_changed", diff --git a/src/main/resources/assets/naturesaura/advancements/offering.json b/src/main/resources/assets/naturesaura/advancements/offering.json new file mode 100644 index 00000000..0ae31b23 --- /dev/null +++ b/src/main/resources/assets/naturesaura/advancements/offering.json @@ -0,0 +1,26 @@ +{ + "display": { + "icon": { + "item": "naturesaura:offering_table" + }, + "title": { + "translate": "advancement.naturesaura.offering" + }, + "description": { + "translate": "advancement.naturesaura.offering.desc" + } + }, + "parent": "naturesaura:aura_bottle_end", + "criteria": { + "table": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "naturesaura:offering_table" + } + ] + } + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/naturesaura/advancements/potion_generator.json b/src/main/resources/assets/naturesaura/advancements/potion_generator.json index ddcba0dc..aa1e2260 100644 --- a/src/main/resources/assets/naturesaura/advancements/potion_generator.json +++ b/src/main/resources/assets/naturesaura/advancements/potion_generator.json @@ -10,7 +10,7 @@ "translate": "advancement.naturesaura.potion_generator.desc" } }, - "parent": "naturesaura:aura_bottle_nether", + "parent": "naturesaura:sky_ingot", "criteria": { "generator": { "trigger": "minecraft:inventory_changed", diff --git a/src/main/resources/assets/naturesaura/advancements/sky_ingot.json b/src/main/resources/assets/naturesaura/advancements/sky_ingot.json new file mode 100644 index 00000000..ae2453e3 --- /dev/null +++ b/src/main/resources/assets/naturesaura/advancements/sky_ingot.json @@ -0,0 +1,26 @@ +{ + "display": { + "icon": { + "item": "naturesaura:sky_ingot" + }, + "title": { + "translate": "advancement.naturesaura.sky_ingot" + }, + "description": { + "translate": "advancement.naturesaura.sky_ingot.desc" + } + }, + "parent": "naturesaura:offering", + "criteria": { + "ingot": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "naturesaura:sky_ingot" + } + ] + } + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/naturesaura/lang/en_US.lang b/src/main/resources/assets/naturesaura/lang/en_US.lang index 06d0128d..64522664 100644 --- a/src/main/resources/assets/naturesaura/lang/en_US.lang +++ b/src/main/resources/assets/naturesaura/lang/en_US.lang @@ -100,5 +100,9 @@ advancement.naturesaura.aura_bottle_nether=Spooky Scary Skeletons advancement.naturesaura.aura_bottle_nether.desc=Collect Aura using a Bottle in the Nether advancement.naturesaura.aura_bottle_end=Breathy Surroundings advancement.naturesaura.aura_bottle_end.desc=Collect Aura using a Bottle in the End +advancement.naturesaura.offering=Yo God, ya want this? +advancement.naturesaura.offering.desc=Create an Offering Table for the Offering to the Gods +advancement.naturesaura.sky_ingot=Sturdy and light +advancement.naturesaura.sky_ingot.desc=Create an Ingot of the Skies using the Offering to the Gods command.naturesaura.aura.usage=/naaura \ No newline at end of file diff --git a/src/main/resources/assets/naturesaura/patchouli_books/book/en_us/entries/collecting/aura_bottle.json b/src/main/resources/assets/naturesaura/patchouli_books/book/en_us/entries/collecting/aura_bottle.json index 9f713296..183ce0cf 100644 --- a/src/main/resources/assets/naturesaura/patchouli_books/book/en_us/entries/collecting/aura_bottle.json +++ b/src/main/resources/assets/naturesaura/patchouli_books/book/en_us/entries/collecting/aura_bottle.json @@ -3,6 +3,7 @@ "icon": "naturesaura:aura_bottle{stored_type:'naturesaura:overworld'}", "category": "collecting", "advancement": "naturesaura:wood_stand", + "priority": true, "pages": [ { "type": "text", diff --git a/src/main/resources/assets/naturesaura/patchouli_books/book/en_us/entries/creating/potion_generator.json b/src/main/resources/assets/naturesaura/patchouli_books/book/en_us/entries/creating/potion_generator.json index 9ab5bc40..92b8a7ee 100644 --- a/src/main/resources/assets/naturesaura/patchouli_books/book/en_us/entries/creating/potion_generator.json +++ b/src/main/resources/assets/naturesaura/patchouli_books/book/en_us/entries/creating/potion_generator.json @@ -2,7 +2,7 @@ "name": "Ritual of the Brewer", "icon": "naturesaura:potion_generator", "category": "creating", - "advancement": "naturesaura:aura_bottle_nether", + "advancement": "naturesaura:sky_ingot", "pages": [ { "type": "text", diff --git a/src/main/resources/assets/naturesaura/patchouli_books/book/en_us/entries/practices/offering.json b/src/main/resources/assets/naturesaura/patchouli_books/book/en_us/entries/practices/offering.json new file mode 100644 index 00000000..5b7cfa75 --- /dev/null +++ b/src/main/resources/assets/naturesaura/patchouli_books/book/en_us/entries/practices/offering.json @@ -0,0 +1,36 @@ +{ + "name": "Offering to the Gods", + "icon": "naturesaura:offering_table", + "category": "practices", + "advancement": "naturesaura:aura_bottle_end", + "pages": [ + { + "type": "text", + "text": "$(item)Infused Iron$() is good and well, and it has enough natural power to do a variety of things on its own. But for more advanced mechanisms, a more powerful metal is required. For that, and for a lot of other things, the $(item)Offering to the Gods$() is required.$(br)The Gods have been, for a long time, the strongest and most powerful beings, and as such, also posess the strongest metals known to man." + }, + { + "type": "text", + "text": "To construct a way to call to the Gods themselves, simply place down an $(item)Offering Table$() with some flowers around it as depicted on the next page. Then, to start an offering, place any amount of items you want to offer into the bowl on the table, and then throw down the item that will call the Gods themselves, in most cases, the $(item)Spirit of Calling$(), close to the table.$(br)The requested items will then, with any luck, rain down from the sky." + }, + { + "type": "multiblock", + "multiblock_id": "naturesaura:offering_table", + "text": "Preparing the $(item)Offering to the Gods$(). Any type of flower can be used." + }, + { + "type": "crafting", + "text": "Creating the $(item)Offering Table$()", + "recipe": "naturesaura:offering_table" + }, + { + "type": "crafting", + "text": "Creating $(item)Spirits of Calling$()", + "recipe": "naturesaura:calling_spirit" + }, + { + "type":"naturesaura:offering", + "text":"Asking for $(item)Ingots of the Sky$(), a powerful metal infused with divine energy.", + "recipe":"naturesaura:sky_ingot" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/naturesaura/patchouli_books/book/en_us/entries/using/conversion_catalyst.json b/src/main/resources/assets/naturesaura/patchouli_books/book/en_us/entries/using/conversion_catalyst.json index 1a3bf46d..3607641d 100644 --- a/src/main/resources/assets/naturesaura/patchouli_books/book/en_us/entries/using/conversion_catalyst.json +++ b/src/main/resources/assets/naturesaura/patchouli_books/book/en_us/entries/using/conversion_catalyst.json @@ -2,7 +2,7 @@ "name": "Transmutation Catalyst", "icon": "naturesaura:conversion_catalyst", "category": "using", - "advancement": "naturesaura:infused_materials", + "advancement": "naturesaura:sky_ingot", "pages": [ { "type": "text", diff --git a/src/main/resources/assets/naturesaura/patchouli_books/book/en_us/templates/offering.json b/src/main/resources/assets/naturesaura/patchouli_books/book/en_us/templates/offering.json new file mode 100644 index 00000000..8e903090 --- /dev/null +++ b/src/main/resources/assets/naturesaura/patchouli_books/book/en_us/templates/offering.json @@ -0,0 +1,46 @@ +{ + "processor": "de.ellpeck.naturesaura.compat.patchouli.ProcessorOffering", + "components": [ + { + "type": "image", + "image": "naturesaura:textures/gui/patchouli/elements.png", + "x": 16, + "y": 13, + "u": 76, + "v": 0, + "width": 84, + "height": 38 + }, + { + "type": "item", + "item": "#input", + "x": 20, + "y": 31 + }, + { + "type": "item", + "item": "#output", + "x": 80, + "y": 31, + "link_recipe": true + }, + { + "type": "item", + "item": "#start", + "x": 48, + "y": 17 + }, + { + "type": "header", + "text": "#name", + "x": -1, + "y": 0 + }, + { + "type": "text", + "text": "#text", + "x": 0, + "y": 63 + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/naturesaura/recipes/calling_spirit.json b/src/main/resources/assets/naturesaura/recipes/calling_spirit.json new file mode 100644 index 00000000..0df9d0a8 --- /dev/null +++ b/src/main/resources/assets/naturesaura/recipes/calling_spirit.json @@ -0,0 +1,38 @@ +{ + "type": "forge:ore_shaped", + "pattern": [ + " O ", + "GNG", + " E " + ], + "key": { + "G": { + "item": "naturesaura:infused_iron" + }, + "O": { + "type": "minecraft:item_nbt", + "item": "naturesaura:aura_bottle", + "nbt": { + "stored_type": "naturesaura:overworld" + } + }, + "N": { + "type": "minecraft:item_nbt", + "item": "naturesaura:aura_bottle", + "nbt": { + "stored_type": "naturesaura:nether" + } + }, + "E": { + "type": "minecraft:item_nbt", + "item": "naturesaura:aura_bottle", + "nbt": { + "stored_type": "naturesaura:end" + } + } + }, + "result": { + "item": "naturesaura:calling_spirit", + "count": 3 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/naturesaura/recipes/offering_table.json b/src/main/resources/assets/naturesaura/recipes/offering_table.json new file mode 100644 index 00000000..84c0f962 --- /dev/null +++ b/src/main/resources/assets/naturesaura/recipes/offering_table.json @@ -0,0 +1,24 @@ +{ + "type": "forge:ore_shaped", + "pattern": [ + "SIS", + " S ", + "WWW" + ], + "key": { + "S": { + "type": "forge:ore_dict", + "ore": "stone" + }, + "W": { + "type": "forge:ore_dict", + "ore": "logWood" + }, + "I": { + "item": "naturesaura:infused_iron" + } + }, + "result": { + "item": "naturesaura:offering_table" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/naturesaura/recipes/potion_generator.json b/src/main/resources/assets/naturesaura/recipes/potion_generator.json index 28532f6f..65fd6ab3 100644 --- a/src/main/resources/assets/naturesaura/recipes/potion_generator.json +++ b/src/main/resources/assets/naturesaura/recipes/potion_generator.json @@ -13,7 +13,7 @@ "item": "minecraft:blaze_rod" }, "I": { - "item": "naturesaura:infused_iron" + "item": "naturesaura:sky_ingot" }, "W": { "type": "minecraft:item_nbt", diff --git a/src/main/resources/assets/naturesaura/textures/gui/patchouli/elements.png b/src/main/resources/assets/naturesaura/textures/gui/patchouli/elements.png index 38e7bd73..d3773dba 100644 Binary files a/src/main/resources/assets/naturesaura/textures/gui/patchouli/elements.png and b/src/main/resources/assets/naturesaura/textures/gui/patchouli/elements.png differ