From e78472570a9445ddd7bc0eab5b2edcecec08dbc0 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Fri, 22 Feb 2019 12:43:32 +0100 Subject: [PATCH] document the ore spawn effect --- .../chunk/effect/OreSpawnEffect.java | 4 ++-- .../naturesaura/recipes/ModRecipes.java | 8 +++++++ .../assets/naturesaura/lang/en_US.lang | 1 + .../book/en_us/entries/effects/ore_spawn.json | 21 +++++++++++++++++++ 4 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 src/main/resources/assets/naturesaura/patchouli_books/book/en_us/entries/effects/ore_spawn.json diff --git a/src/main/java/de/ellpeck/naturesaura/chunk/effect/OreSpawnEffect.java b/src/main/java/de/ellpeck/naturesaura/chunk/effect/OreSpawnEffect.java index 9e2f016f..00adefad 100644 --- a/src/main/java/de/ellpeck/naturesaura/chunk/effect/OreSpawnEffect.java +++ b/src/main/java/de/ellpeck/naturesaura/chunk/effect/OreSpawnEffect.java @@ -98,6 +98,7 @@ public class OreSpawnEffect implements IDrainSpotEffect { if (block != requiredBlock) continue; + outer: while (true) { WeightedOre ore = WeightedRandom.getRandomItem(world.rand, ores, totalWeight); List stacks = OreDictionary.getOres(ore.name, false); @@ -115,8 +116,7 @@ public class OreSpawnEffect implements IDrainSpotEffect { int toDrain = (20000 - ore.itemWeight * 2) * 2; BlockPos highestSpot = IAuraChunk.getHighestSpot(world, orePos, 30, pos); IAuraChunk.getAuraChunk(world, highestSpot).drainAura(highestSpot, toDrain); - - return; + break outer; } } } diff --git a/src/main/java/de/ellpeck/naturesaura/recipes/ModRecipes.java b/src/main/java/de/ellpeck/naturesaura/recipes/ModRecipes.java index 1ad40d2b..5d15be2e 100644 --- a/src/main/java/de/ellpeck/naturesaura/recipes/ModRecipes.java +++ b/src/main/java/de/ellpeck/naturesaura/recipes/ModRecipes.java @@ -9,6 +9,7 @@ import de.ellpeck.naturesaura.api.recipes.ing.NBTIngredient; import de.ellpeck.naturesaura.blocks.ModBlocks; import de.ellpeck.naturesaura.chunk.effect.AnimalEffect; import de.ellpeck.naturesaura.chunk.effect.CacheRechargeEffect; +import de.ellpeck.naturesaura.chunk.effect.OreSpawnEffect; import de.ellpeck.naturesaura.chunk.effect.PlantBoostEffect; import de.ellpeck.naturesaura.items.ItemAuraBottle; import de.ellpeck.naturesaura.items.ItemEffectPowder; @@ -108,6 +109,13 @@ public final class ModRecipes { Helper.blockIng(ModBlocks.GOLD_POWDER), Ingredient.fromItem(ModItems.SKY_INGOT), Ingredient.fromItem(Items.EGG)).register(); + new TreeRitualRecipe(new ResourceLocation(NaturesAura.MOD_ID, "ore_spawn_powder"), + Ingredient.fromStacks(new ItemStack(Blocks.SAPLING)), + ItemEffectPowder.setEffect(new ItemStack(ModItems.EFFECT_POWDER, 4), OreSpawnEffect.NAME), 400, + Helper.blockIng(ModBlocks.GOLD_POWDER), + Helper.blockIng(ModBlocks.GOLD_POWDER), + Helper.blockIng(Blocks.DIAMOND_ORE), + Helper.blockIng(Blocks.REDSTONE_ORE)).register(); new TreeRitualRecipe(new ResourceLocation(NaturesAura.MOD_ID, "token_joy"), Helper.blockIng(Blocks.SAPLING), new ItemStack(ModItems.TOKEN_JOY, 2), 200, new NBTIngredient(ItemAuraBottle.setType(new ItemStack(ModItems.AURA_BOTTLE), NaturesAuraAPI.TYPE_OVERWORLD)), diff --git a/src/main/resources/assets/naturesaura/lang/en_US.lang b/src/main/resources/assets/naturesaura/lang/en_US.lang index 97eab86f..835e1222 100644 --- a/src/main/resources/assets/naturesaura/lang/en_US.lang +++ b/src/main/resources/assets/naturesaura/lang/en_US.lang @@ -79,6 +79,7 @@ item.naturesaura.infused_iron_shoes.name=Botanist's Shoes item.naturesaura.effect_powder.naturesaura:plant_boost.name=Powder of Steady Growth item.naturesaura.effect_powder.naturesaura:cache_recharge.name=Powder of no Storage item.naturesaura.effect_powder.naturesaura:animal.name=Powder of Fertility +item.naturesaura.effect_powder.naturesaura:ore_spawn.name=Powder of the Bountiful Core item.naturesaura.mover_cart.name=Aura Attraction Cart item.naturesaura.range_visualizer.name=Mystical Magnifier item.naturesaura.clock_hand.name=Hand of Time diff --git a/src/main/resources/assets/naturesaura/patchouli_books/book/en_us/entries/effects/ore_spawn.json b/src/main/resources/assets/naturesaura/patchouli_books/book/en_us/entries/effects/ore_spawn.json new file mode 100644 index 00000000..2e0037ee --- /dev/null +++ b/src/main/resources/assets/naturesaura/patchouli_books/book/en_us/entries/effects/ore_spawn.json @@ -0,0 +1,21 @@ +{ + "name": "Mineral Amassing", + "icon": "minecraft:diamond_ore", + "category": "effects", + "advancement": "naturesaura:positive_imbalance", + "pages": [ + { + "type": "text", + "text": "Using the $(l:creating/generator_limit_remover)Creational Catalyst$(), $(aura) can be created beyond the point visible to the $(l:items/eye)Environmental Eye$(). This capability allows for a higher tier of imbalance effect to happen: $(item)Mineral Amassing$() will start occuring, provided there is a bit of $(l:effects/effect_powder)Powder of the Bountiful Core$() around." + }, + { + "type": "text", + "text": "$(thing)Ores$() of varying rarities will start appearing in $(item)stone$() blocks in the overworld and $(item)netherrack$() blocks in the nether and, expectedly, quite a large amount of the natural $(aura) will be drained while these ores are being conjured.$(p)Of course, creational capabilities like this could be used for some sort of automation, maybe making use of blocks like the $(l:using/field_creator)Aura Field Creator$()." + }, + { + "type": "naturesaura:tree_ritual", + "recipe": "naturesaura:ore_spawn_powder", + "text": "Creating the $(l:effects/effect_powder)Powder of the Bountiful Core$()." + } + ] +} \ No newline at end of file