finish the offering to the Gods

This commit is contained in:
Ellpeck 2018-11-21 11:49:21 +01:00
parent ab2b8612cd
commit b096dad3bf
16 changed files with 242 additions and 6 deletions

View file

@ -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<String> 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;
}
}
}

View file

@ -61,7 +61,7 @@ public final class ModRecipes {
Ingredient.fromStacks(new ItemStack(Blocks.STONEBRICK, 1, 1)), Ingredient.fromStacks(new ItemStack(Blocks.STONEBRICK, 1, 1)),
Helper.blockIng(ModBlocks.INFUSED_STONE), Helper.blockIng(ModBlocks.INFUSED_STONE),
Ingredient.fromItem(Items.BREWING_STAND), Ingredient.fromItem(Items.BREWING_STAND),
Ingredient.fromItem(Items.GOLD_INGOT), Ingredient.fromItem(ModItems.SKY_INGOT),
Ingredient.fromItem(ModItems.GOLD_LEAF), Ingredient.fromItem(ModItems.GOLD_LEAF),
Helper.blockIng(Blocks.GLOWSTONE)).register(); Helper.blockIng(Blocks.GLOWSTONE)).register();

View file

@ -10,7 +10,7 @@
"translate": "advancement.naturesaura.conversion_catalyst.desc" "translate": "advancement.naturesaura.conversion_catalyst.desc"
} }
}, },
"parent": "naturesaura:infused_materials", "parent": "naturesaura:sky_ingot",
"criteria": { "criteria": {
"catalyst": { "catalyst": {
"trigger": "minecraft:inventory_changed", "trigger": "minecraft:inventory_changed",

View file

@ -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"
}
]
}
}
}
}

View file

@ -10,7 +10,7 @@
"translate": "advancement.naturesaura.potion_generator.desc" "translate": "advancement.naturesaura.potion_generator.desc"
} }
}, },
"parent": "naturesaura:aura_bottle_nether", "parent": "naturesaura:sky_ingot",
"criteria": { "criteria": {
"generator": { "generator": {
"trigger": "minecraft:inventory_changed", "trigger": "minecraft:inventory_changed",

View file

@ -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"
}
]
}
}
}
}

View file

@ -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_nether.desc=Collect Aura using a Bottle in the Nether
advancement.naturesaura.aura_bottle_end=Breathy Surroundings advancement.naturesaura.aura_bottle_end=Breathy Surroundings
advancement.naturesaura.aura_bottle_end.desc=Collect Aura using a Bottle in the End 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 <action> <amount> <range> command.naturesaura.aura.usage=/naaura <action> <amount> <range>

View file

@ -3,6 +3,7 @@
"icon": "naturesaura:aura_bottle{stored_type:'naturesaura:overworld'}", "icon": "naturesaura:aura_bottle{stored_type:'naturesaura:overworld'}",
"category": "collecting", "category": "collecting",
"advancement": "naturesaura:wood_stand", "advancement": "naturesaura:wood_stand",
"priority": true,
"pages": [ "pages": [
{ {
"type": "text", "type": "text",

View file

@ -2,7 +2,7 @@
"name": "Ritual of the Brewer", "name": "Ritual of the Brewer",
"icon": "naturesaura:potion_generator", "icon": "naturesaura:potion_generator",
"category": "creating", "category": "creating",
"advancement": "naturesaura:aura_bottle_nether", "advancement": "naturesaura:sky_ingot",
"pages": [ "pages": [
{ {
"type": "text", "type": "text",

View file

@ -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"
}
]
}

View file

@ -2,7 +2,7 @@
"name": "Transmutation Catalyst", "name": "Transmutation Catalyst",
"icon": "naturesaura:conversion_catalyst", "icon": "naturesaura:conversion_catalyst",
"category": "using", "category": "using",
"advancement": "naturesaura:infused_materials", "advancement": "naturesaura:sky_ingot",
"pages": [ "pages": [
{ {
"type": "text", "type": "text",

View file

@ -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
}
]
}

View file

@ -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
}
}

View file

@ -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"
}
}

View file

@ -13,7 +13,7 @@
"item": "minecraft:blaze_rod" "item": "minecraft:blaze_rod"
}, },
"I": { "I": {
"item": "naturesaura:infused_iron" "item": "naturesaura:sky_ingot"
}, },
"W": { "W": {
"type": "minecraft:item_nbt", "type": "minecraft:item_nbt",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB