2018-10-16 01:36:30 +02:00
|
|
|
package de.ellpeck.naturesaura.recipes;
|
|
|
|
|
2018-11-20 11:44:07 +01:00
|
|
|
import de.ellpeck.naturesaura.Helper;
|
2018-10-22 00:14:52 +02:00
|
|
|
import de.ellpeck.naturesaura.NaturesAura;
|
2018-11-12 01:29:33 +01:00
|
|
|
import de.ellpeck.naturesaura.api.NaturesAuraAPI;
|
2018-11-11 13:26:19 +01:00
|
|
|
import de.ellpeck.naturesaura.api.recipes.AltarRecipe;
|
2018-12-30 20:37:00 +01:00
|
|
|
import de.ellpeck.naturesaura.api.recipes.AnimalSpawnerRecipe;
|
2018-11-20 19:59:18 +01:00
|
|
|
import de.ellpeck.naturesaura.api.recipes.OfferingRecipe;
|
2018-11-11 13:26:19 +01:00
|
|
|
import de.ellpeck.naturesaura.api.recipes.TreeRitualRecipe;
|
2018-11-20 19:59:18 +01:00
|
|
|
import de.ellpeck.naturesaura.api.recipes.ing.AmountIngredient;
|
|
|
|
import de.ellpeck.naturesaura.api.recipes.ing.NBTIngredient;
|
2018-10-16 17:48:36 +02:00
|
|
|
import de.ellpeck.naturesaura.blocks.ModBlocks;
|
2018-12-20 00:12:59 +01:00
|
|
|
import de.ellpeck.naturesaura.chunk.effect.AnimalEffect;
|
2018-12-14 13:51:08 +01:00
|
|
|
import de.ellpeck.naturesaura.chunk.effect.CacheRechargeEffect;
|
2018-12-14 00:47:01 +01:00
|
|
|
import de.ellpeck.naturesaura.chunk.effect.PlantBoostEffect;
|
2018-11-08 18:03:58 +01:00
|
|
|
import de.ellpeck.naturesaura.items.ItemAuraBottle;
|
2018-12-16 18:15:54 +01:00
|
|
|
import de.ellpeck.naturesaura.items.ItemEffectPowder;
|
2018-10-16 17:48:36 +02:00
|
|
|
import de.ellpeck.naturesaura.items.ModItems;
|
2018-11-20 19:59:18 +01:00
|
|
|
import net.minecraft.block.Block;
|
|
|
|
import net.minecraft.block.BlockFlower;
|
|
|
|
import net.minecraft.block.BlockStoneBrick;
|
2018-12-30 20:37:00 +01:00
|
|
|
import net.minecraft.entity.passive.EntityCow;
|
|
|
|
import net.minecraft.entity.passive.EntitySheep;
|
2018-10-16 01:36:30 +02:00
|
|
|
import net.minecraft.init.Blocks;
|
|
|
|
import net.minecraft.init.Items;
|
2018-12-30 20:37:00 +01:00
|
|
|
import net.minecraft.item.EnumDyeColor;
|
2018-10-16 01:36:30 +02:00
|
|
|
import net.minecraft.item.ItemStack;
|
2018-11-20 11:44:07 +01:00
|
|
|
import net.minecraft.item.crafting.Ingredient;
|
2018-10-22 00:14:52 +02:00
|
|
|
import net.minecraft.util.ResourceLocation;
|
2018-11-20 19:59:18 +01:00
|
|
|
import net.minecraftforge.fml.common.registry.ForgeRegistries;
|
2018-10-16 01:36:30 +02:00
|
|
|
|
|
|
|
public final class ModRecipes {
|
|
|
|
|
|
|
|
public static void init() {
|
2018-10-22 00:14:52 +02:00
|
|
|
new TreeRitualRecipe(new ResourceLocation(NaturesAura.MOD_ID, "eye"),
|
2018-11-20 11:44:07 +01:00
|
|
|
Ingredient.fromStacks(new ItemStack(Blocks.SAPLING)), new ItemStack(ModItems.EYE), 250,
|
|
|
|
Ingredient.fromItem(Items.SPIDER_EYE),
|
|
|
|
Ingredient.fromItem(Items.GOLD_INGOT),
|
|
|
|
Ingredient.fromItem(ModItems.GOLD_LEAF),
|
|
|
|
Ingredient.fromItem(ModItems.GOLD_LEAF)).register();
|
2018-12-25 19:38:25 +01:00
|
|
|
new TreeRitualRecipe(new ResourceLocation(NaturesAura.MOD_ID, "eye_improved"),
|
|
|
|
Ingredient.fromStacks(new ItemStack(Blocks.SAPLING)), new ItemStack(ModItems.EYE_IMPROVED), 500,
|
|
|
|
Ingredient.fromItem(ModItems.EYE),
|
|
|
|
Ingredient.fromItem(ModItems.SKY_INGOT),
|
|
|
|
Ingredient.fromItem(ModItems.SKY_INGOT),
|
|
|
|
Helper.blockIng(ModBlocks.END_FLOWER),
|
|
|
|
Ingredient.fromItem(ModItems.GOLD_LEAF),
|
|
|
|
Ingredient.fromItem(ModItems.GOLD_LEAF)).register();
|
2018-10-22 00:14:52 +02:00
|
|
|
new TreeRitualRecipe(new ResourceLocation(NaturesAura.MOD_ID, "nature_altar"),
|
2018-11-20 11:44:07 +01:00
|
|
|
Helper.blockIng(Blocks.SAPLING), new ItemStack(ModBlocks.NATURE_ALTAR), 500,
|
|
|
|
Helper.blockIng(Blocks.STONE),
|
|
|
|
Helper.blockIng(Blocks.STONE),
|
|
|
|
Helper.blockIng(Blocks.STONE),
|
|
|
|
Ingredient.fromItem(ModItems.GOLD_LEAF),
|
|
|
|
Ingredient.fromItem(Items.GOLD_INGOT),
|
2018-11-20 19:59:18 +01:00
|
|
|
new NBTIngredient(ItemAuraBottle.setType(new ItemStack(ModItems.AURA_BOTTLE), NaturesAuraAPI.TYPE_OVERWORLD))).register();
|
2018-10-22 00:14:52 +02:00
|
|
|
new TreeRitualRecipe(new ResourceLocation(NaturesAura.MOD_ID, "ancient_sapling"),
|
2018-11-20 11:44:07 +01:00
|
|
|
Helper.blockIng(Blocks.SAPLING), new ItemStack(ModBlocks.ANCIENT_SAPLING), 200,
|
|
|
|
Helper.blockIng(Blocks.SAPLING),
|
|
|
|
Helper.blockIng(Blocks.YELLOW_FLOWER),
|
|
|
|
Helper.blockIng(Blocks.RED_FLOWER),
|
|
|
|
Ingredient.fromItem(Items.WHEAT_SEEDS),
|
|
|
|
Ingredient.fromItem(Items.REEDS),
|
|
|
|
Ingredient.fromItem(ModItems.GOLD_LEAF)).register();
|
2018-10-26 15:01:48 +02:00
|
|
|
new TreeRitualRecipe(new ResourceLocation(NaturesAura.MOD_ID, "furnace_heater"),
|
2018-11-20 11:44:07 +01:00
|
|
|
Helper.blockIng(Blocks.SAPLING), new ItemStack(ModBlocks.FURNACE_HEATER), 600,
|
|
|
|
Helper.blockIng(ModBlocks.INFUSED_STONE),
|
|
|
|
Helper.blockIng(ModBlocks.INFUSED_STONE),
|
|
|
|
Ingredient.fromItem(ModItems.INFUSED_IRON),
|
|
|
|
Ingredient.fromItem(ModItems.INFUSED_IRON),
|
|
|
|
Ingredient.fromItem(Items.FIRE_CHARGE),
|
|
|
|
Ingredient.fromItem(Items.FLINT),
|
|
|
|
Helper.blockIng(Blocks.MAGMA),
|
2018-11-20 19:59:18 +01:00
|
|
|
new NBTIngredient(ItemAuraBottle.setType(new ItemStack(ModItems.AURA_BOTTLE), NaturesAuraAPI.TYPE_NETHER))).register();
|
2018-10-31 01:17:58 +01:00
|
|
|
new TreeRitualRecipe(new ResourceLocation(NaturesAura.MOD_ID, "conversion_catalyst"),
|
2018-11-20 11:44:07 +01:00
|
|
|
Ingredient.fromStacks(new ItemStack(Blocks.SAPLING, 1, 3)), new ItemStack(ModBlocks.CONVERSION_CATALYST), 600,
|
|
|
|
Ingredient.fromStacks(new ItemStack(Blocks.STONEBRICK, 1, 1)),
|
|
|
|
Helper.blockIng(ModBlocks.INFUSED_STONE),
|
|
|
|
Ingredient.fromItem(Items.BREWING_STAND),
|
2018-11-21 11:49:21 +01:00
|
|
|
Ingredient.fromItem(ModItems.SKY_INGOT),
|
2018-11-20 11:44:07 +01:00
|
|
|
Ingredient.fromItem(ModItems.GOLD_LEAF),
|
|
|
|
Helper.blockIng(Blocks.GLOWSTONE)).register();
|
2018-12-14 00:47:01 +01:00
|
|
|
new TreeRitualRecipe(new ResourceLocation(NaturesAura.MOD_ID, "plant_powder"),
|
|
|
|
Ingredient.fromStacks(new ItemStack(Blocks.SAPLING)),
|
2018-12-16 18:15:54 +01:00
|
|
|
ItemEffectPowder.setEffect(new ItemStack(ModItems.EFFECT_POWDER), PlantBoostEffect.NAME), 400,
|
2018-12-14 00:47:01 +01:00
|
|
|
Helper.blockIng(ModBlocks.GOLD_POWDER),
|
|
|
|
Helper.blockIng(ModBlocks.GOLD_POWDER),
|
|
|
|
Ingredient.fromItem(ModItems.SKY_INGOT),
|
|
|
|
Ingredient.fromItem(Items.WHEAT)).register();
|
2018-12-14 13:51:08 +01:00
|
|
|
new TreeRitualRecipe(new ResourceLocation(NaturesAura.MOD_ID, "cache_powder"),
|
|
|
|
Ingredient.fromStacks(new ItemStack(Blocks.SAPLING)),
|
2018-12-16 18:15:54 +01:00
|
|
|
ItemEffectPowder.setEffect(new ItemStack(ModItems.EFFECT_POWDER), CacheRechargeEffect.NAME), 400,
|
2018-12-14 13:51:08 +01:00
|
|
|
Helper.blockIng(ModBlocks.GOLD_POWDER),
|
|
|
|
Helper.blockIng(ModBlocks.GOLD_POWDER),
|
|
|
|
Ingredient.fromItem(ModItems.SKY_INGOT),
|
|
|
|
Ingredient.fromItem(ModItems.AURA_CACHE)).register();
|
2018-12-20 00:12:59 +01:00
|
|
|
new TreeRitualRecipe(new ResourceLocation(NaturesAura.MOD_ID, "animal_powder"),
|
|
|
|
Ingredient.fromStacks(new ItemStack(Blocks.SAPLING, 1, 3)),
|
|
|
|
ItemEffectPowder.setEffect(new ItemStack(ModItems.EFFECT_POWDER), AnimalEffect.NAME), 400,
|
|
|
|
Helper.blockIng(ModBlocks.GOLD_POWDER),
|
|
|
|
Helper.blockIng(ModBlocks.GOLD_POWDER),
|
|
|
|
Ingredient.fromItem(ModItems.SKY_INGOT),
|
|
|
|
Ingredient.fromItem(Items.EGG)).register();
|
2018-10-18 13:34:37 +02:00
|
|
|
|
2018-10-22 00:14:52 +02:00
|
|
|
new AltarRecipe(new ResourceLocation(NaturesAura.MOD_ID, "infused_iron"),
|
2018-11-20 11:44:07 +01:00
|
|
|
Ingredient.fromItem(Items.IRON_INGOT), new ItemStack(ModItems.INFUSED_IRON),
|
|
|
|
Ingredient.EMPTY, 300, 80).register();
|
2018-11-17 23:08:46 +01:00
|
|
|
new AltarRecipe(new ResourceLocation(NaturesAura.MOD_ID, "infused_iron_block"),
|
2018-11-20 11:44:07 +01:00
|
|
|
Helper.blockIng(Blocks.IRON_BLOCK), new ItemStack(ModBlocks.INFUSED_IRON),
|
|
|
|
Ingredient.EMPTY, 2700, 700).register();
|
2018-10-22 00:14:52 +02:00
|
|
|
new AltarRecipe(new ResourceLocation(NaturesAura.MOD_ID, "infused_stone"),
|
2018-11-20 11:44:07 +01:00
|
|
|
Helper.blockIng(Blocks.STONE), new ItemStack(ModBlocks.INFUSED_STONE),
|
|
|
|
Ingredient.EMPTY, 150, 40).register();
|
2018-10-31 01:17:58 +01:00
|
|
|
|
2018-11-22 18:56:01 +01:00
|
|
|
Ingredient conversion = Helper.blockIng(ModBlocks.CONVERSION_CATALYST);
|
|
|
|
new AltarRecipe(new ResourceLocation(NaturesAura.MOD_ID, "breath"),
|
2018-11-20 19:59:18 +01:00
|
|
|
new NBTIngredient(ItemAuraBottle.setType(new ItemStack(ModItems.AURA_BOTTLE), NaturesAuraAPI.TYPE_END)),
|
2018-11-20 11:44:07 +01:00
|
|
|
new ItemStack(Items.DRAGON_BREATH),
|
2018-11-22 18:56:01 +01:00
|
|
|
conversion, 500, 80).register();
|
2018-10-31 01:17:58 +01:00
|
|
|
new AltarRecipe(new ResourceLocation(NaturesAura.MOD_ID, "leather"),
|
2018-11-20 11:44:07 +01:00
|
|
|
Ingredient.fromItem(Items.ROTTEN_FLESH), new ItemStack(Items.LEATHER),
|
2018-11-22 18:56:01 +01:00
|
|
|
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();
|
2018-11-20 19:59:18 +01:00
|
|
|
|
2018-11-21 01:05:50 +01:00
|
|
|
new OfferingRecipe(new ResourceLocation(NaturesAura.MOD_ID, "sky_ingot"),
|
2018-11-20 19:59:18 +01:00
|
|
|
new AmountIngredient(new ItemStack(ModItems.INFUSED_IRON, 3)),
|
2018-11-21 01:05:50 +01:00
|
|
|
Ingredient.fromItem(ModItems.CALLING_SPIRIT),
|
|
|
|
new ItemStack(ModItems.SKY_INGOT)).register();
|
2018-11-20 19:59:18 +01:00
|
|
|
|
2018-12-30 20:37:00 +01:00
|
|
|
new AnimalSpawnerRecipe(new ResourceLocation(NaturesAura.MOD_ID, "cow"),
|
|
|
|
EntityCow::new, 500, 60,
|
|
|
|
Ingredient.fromItem(ModItems.BIRTH_SPIRIT),
|
|
|
|
Ingredient.fromItem(Items.BEEF),
|
|
|
|
Ingredient.fromItem(Items.LEATHER)).register();
|
|
|
|
for (EnumDyeColor color : EnumDyeColor.values())
|
|
|
|
new AnimalSpawnerRecipe(new ResourceLocation(NaturesAura.MOD_ID, "sheep_" + color.getName()),
|
|
|
|
world -> {
|
|
|
|
EntitySheep sheep = new EntitySheep(world);
|
|
|
|
sheep.setFleeceColor(color);
|
|
|
|
return sheep;
|
|
|
|
}, 500, 60,
|
|
|
|
Ingredient.fromItem(ModItems.BIRTH_SPIRIT),
|
|
|
|
Ingredient.fromItem(Items.MUTTON),
|
|
|
|
Ingredient.fromStacks(new ItemStack(Blocks.WOOL, 1, color.getMetadata()))).register();
|
|
|
|
|
2018-11-20 19:59:18 +01:00
|
|
|
NaturesAuraAPI.BOTANIST_PICKAXE_CONVERSIONS.put(
|
|
|
|
Blocks.COBBLESTONE.getDefaultState(),
|
|
|
|
Blocks.MOSSY_COBBLESTONE.getDefaultState());
|
|
|
|
NaturesAuraAPI.BOTANIST_PICKAXE_CONVERSIONS.put(
|
|
|
|
Blocks.STONEBRICK.getDefaultState().withProperty(BlockStoneBrick.VARIANT, BlockStoneBrick.EnumType.DEFAULT),
|
|
|
|
Blocks.STONEBRICK.getDefaultState().withProperty(BlockStoneBrick.VARIANT, BlockStoneBrick.EnumType.MOSSY));
|
|
|
|
|
|
|
|
for (Block block : ForgeRegistries.BLOCKS)
|
|
|
|
if (block instanceof BlockFlower)
|
|
|
|
NaturesAuraAPI.FLOWERS.addAll(block.getBlockState().getValidStates());
|
2018-10-16 01:36:30 +02:00
|
|
|
}
|
|
|
|
}
|