From 0365acb1f762c5aea3e41141b33747b8863f62f6 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Thu, 22 Nov 2018 18:56:01 +0100 Subject: [PATCH] added some more transmutation catalyst recipes --- .../blocks/tiles/TileEntityNatureAltar.java | 4 ++-- .../naturesaura/recipes/ModRecipes.java | 16 +++++++++++++--- .../entries/using/conversion_catalyst.json | 19 +++++++++++++++++-- 3 files changed, 32 insertions(+), 7 deletions(-) diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityNatureAltar.java b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityNatureAltar.java index b922c548..5f6f1708 100644 --- a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityNatureAltar.java +++ b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityNatureAltar.java @@ -10,7 +10,6 @@ import de.ellpeck.naturesaura.blocks.multi.Multiblocks; import de.ellpeck.naturesaura.packet.PacketHandler; import de.ellpeck.naturesaura.packet.PacketParticleStream; import de.ellpeck.naturesaura.packet.PacketParticles; -import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.init.SoundEvents; import net.minecraft.item.ItemStack; @@ -21,6 +20,7 @@ import net.minecraft.util.ITickable; import net.minecraft.util.ResourceLocation; import net.minecraft.util.SoundCategory; import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.MathHelper; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.items.IItemHandlerModifiable; @@ -120,7 +120,7 @@ public class TileEntityNatureAltar extends TileEntityImpl implements ITickable { this.currentRecipe = null; this.timer = 0; } else if (this.hasCatalyst(this.currentRecipe.catalyst)) { - int req = this.currentRecipe.aura / this.currentRecipe.time; + int req = MathHelper.ceil(this.currentRecipe.aura / (double) this.currentRecipe.time); if (this.container.getStoredAura() >= req) { this.container.drainAura(req, false); diff --git a/src/main/java/de/ellpeck/naturesaura/recipes/ModRecipes.java b/src/main/java/de/ellpeck/naturesaura/recipes/ModRecipes.java index 253127cc..9bde39c7 100644 --- a/src/main/java/de/ellpeck/naturesaura/recipes/ModRecipes.java +++ b/src/main/java/de/ellpeck/naturesaura/recipes/ModRecipes.java @@ -75,13 +75,23 @@ public final class ModRecipes { Helper.blockIng(Blocks.STONE), new ItemStack(ModBlocks.INFUSED_STONE), Ingredient.EMPTY, 150, 40).register(); - new AltarRecipe(new ResourceLocation(NaturesAura.MOD_ID, "chorus"), + Ingredient conversion = Helper.blockIng(ModBlocks.CONVERSION_CATALYST); + new AltarRecipe(new ResourceLocation(NaturesAura.MOD_ID, "breath"), new NBTIngredient(ItemAuraBottle.setType(new ItemStack(ModItems.AURA_BOTTLE), NaturesAuraAPI.TYPE_END)), new ItemStack(Items.DRAGON_BREATH), - Helper.blockIng(ModBlocks.CONVERSION_CATALYST), 350, 80).register(); + conversion, 500, 80).register(); new AltarRecipe(new ResourceLocation(NaturesAura.MOD_ID, "leather"), Ingredient.fromItem(Items.ROTTEN_FLESH), new ItemStack(Items.LEATHER), - Helper.blockIng(ModBlocks.CONVERSION_CATALYST), 400, 50).register(); + conversion, 400, 50).register(); + new AltarRecipe(new ResourceLocation(NaturesAura.MOD_ID, "soul_sand"), + Helper.blockIng(Blocks.SAND), new ItemStack(Blocks.SOUL_SAND), + conversion, 200, 100).register(); + new AltarRecipe(new ResourceLocation(NaturesAura.MOD_ID, "nether_wart"), + Helper.blockIng(Blocks.RED_MUSHROOM), new ItemStack(Items.NETHER_WART), + conversion, 600, 250).register(); + new AltarRecipe(new ResourceLocation(NaturesAura.MOD_ID, "prismarine"), + Ingredient.fromItem(Items.QUARTZ), new ItemStack(Items.PRISMARINE_SHARD), + conversion, 850, 200).register(); new OfferingRecipe(new ResourceLocation(NaturesAura.MOD_ID, "sky_ingot"), new AmountIngredient(new ItemStack(ModItems.INFUSED_IRON, 3)), 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 3607641d..c6cd2b3e 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 @@ -15,13 +15,28 @@ }, { "type": "naturesaura:altar", - "text": "Creating $(item)Dragon's Breath$() out of the end's fruit", - "recipe": "naturesaura:chorus" + "text": "Creating $(item)Dragon's Breath$() out of the end's $(aura)", + "recipe": "naturesaura:breath" }, { "type": "naturesaura:altar", "text": "Conjuring $(item)Leather$() from a zombie's remains", "recipe": "naturesaura:leather" + }, + { + "type": "naturesaura:altar", + "text": "Making $(item)Soul Sand$() out of worldly grains", + "recipe": "naturesaura:soul_sand" + }, + { + "type": "naturesaura:altar", + "text": "Creating $(item)Nether Wart$() from poisonous mushrooms", + "recipe": "naturesaura:nether_wart" + }, + { + "type": "naturesaura:altar", + "text": "Conjuring $(item)Prismarine Shards$() from the nether's ore", + "recipe": "naturesaura:prismarine" } ] } \ No newline at end of file