NaturesAura/src/main/java/de/ellpeck/naturesaura/recipes/ModRecipes.java

419 lines
24 KiB
Java
Raw Normal View History

2018-10-16 01:36:30 +02:00
package de.ellpeck.naturesaura.recipes;
2018-10-22 00:14:52 +02:00
import de.ellpeck.naturesaura.NaturesAura;
import de.ellpeck.naturesaura.api.NaturesAuraAPI;
2020-01-22 20:31:09 +01:00
import de.ellpeck.naturesaura.api.recipes.*;
2018-11-20 19:59:18 +01:00
import de.ellpeck.naturesaura.api.recipes.ing.AmountIngredient;
import de.ellpeck.naturesaura.api.recipes.ing.NBTIngredient;
2020-01-22 20:31:09 +01:00
import de.ellpeck.naturesaura.blocks.ModBlocks;
2020-02-26 19:32:42 +01:00
import de.ellpeck.naturesaura.chunk.effect.*;
2020-01-26 01:41:49 +01:00
import de.ellpeck.naturesaura.items.ItemAuraBottle;
import de.ellpeck.naturesaura.items.ItemEffectPowder;
2018-10-16 17:48:36 +02:00
import de.ellpeck.naturesaura.items.ModItems;
2020-01-29 20:22:10 +01:00
import de.ellpeck.naturesaura.misc.ColoredBlockHelper;
2018-11-20 19:59:18 +01:00
import net.minecraft.block.Block;
2020-01-22 20:31:09 +01:00
import net.minecraft.block.Blocks;
import net.minecraft.block.FlowerBlock;
import net.minecraft.client.resources.ReloadListener;
2020-01-22 20:31:09 +01:00
import net.minecraft.entity.Entity;
2020-01-24 17:05:41 +01:00
import net.minecraft.entity.EntityType;
2020-01-22 20:31:09 +01:00
import net.minecraft.entity.passive.SheepEntity;
import net.minecraft.item.DyeColor;
import net.minecraft.item.Item;
2018-10-16 01:36:30 +02:00
import net.minecraft.item.ItemStack;
2020-01-22 20:31:09 +01:00
import net.minecraft.item.Items;
import net.minecraft.item.crafting.Ingredient;
2020-01-22 20:31:09 +01:00
import net.minecraft.potion.PotionUtils;
import net.minecraft.potion.Potions;
import net.minecraft.profiler.IProfiler;
import net.minecraft.resources.IResourceManager;
2020-04-29 00:24:07 +02:00
import net.minecraft.tags.BlockTags;
2020-01-22 20:31:09 +01:00
import net.minecraft.tags.ItemTags;
import net.minecraft.tags.Tag;
2018-10-22 00:14:52 +02:00
import net.minecraft.util.ResourceLocation;
2020-01-22 20:31:09 +01:00
import net.minecraft.world.World;
2020-01-23 22:40:03 +01:00
import net.minecraftforge.common.Tags;
2020-01-22 20:31:09 +01:00
import net.minecraftforge.registries.ForgeRegistries;
import java.util.Arrays;
2020-04-29 00:24:07 +02:00
import java.util.List;
public class ModRecipes extends ReloadListener<Object> {
2018-10-16 01:36:30 +02:00
private void init() {
// Clear all registries first
NaturesAuraAPI.TREE_RITUAL_RECIPES.clear();
NaturesAuraAPI.ALTAR_RECIPES.clear();
NaturesAuraAPI.OFFERING_RECIPES.clear();
NaturesAuraAPI.BOTANIST_PICKAXE_CONVERSIONS.clear();
NaturesAuraAPI.FLOWERS.clear();
NaturesAuraAPI.ANIMAL_SPAWNER_RECIPES.clear();
NaturesAuraAPI.OVERWORLD_ORES.clear();
NaturesAuraAPI.NETHER_ORES.clear();
NaturesAuraAPI.PROJECTILE_GENERATIONS.clear();
2020-01-22 20:31:09 +01:00
new TreeRitualRecipe(res("eye"),
ing(new ItemStack(Blocks.OAK_SAPLING)), new ItemStack(ModItems.EYE), 250,
ing(Items.SPIDER_EYE),
ing(Items.GOLD_INGOT),
ing(ModItems.GOLD_LEAF),
ing(ModItems.GOLD_LEAF)).register();
new TreeRitualRecipe(res("eye_improved"),
2020-01-22 20:31:09 +01:00
ing(new ItemStack(Blocks.OAK_SAPLING)), new ItemStack(ModItems.EYE_IMPROVED), 500,
ing(ModItems.EYE),
ing(ModItems.SKY_INGOT),
ing(ModItems.SKY_INGOT),
ing(ModBlocks.END_FLOWER),
ing(ModItems.GOLD_LEAF),
ing(ModItems.GOLD_LEAF)).register();
new TreeRitualRecipe(res("nature_altar"),
2020-01-22 20:31:09 +01:00
ing(Blocks.OAK_SAPLING), new ItemStack(ModBlocks.NATURE_ALTAR), 500,
ing(Blocks.STONE),
ing(Blocks.STONE),
ing(Blocks.STONE),
ing(ModItems.GOLD_LEAF),
ing(Items.GOLD_INGOT),
ing(ModItems.TOKEN_JOY)).register();
new TreeRitualRecipe(res("ancient_sapling"),
2020-01-22 20:31:09 +01:00
ing(Blocks.OAK_SAPLING), new ItemStack(ModBlocks.ANCIENT_SAPLING), 200,
ing(Blocks.OAK_SAPLING),
ing(Blocks.DANDELION),
ing(Blocks.POPPY),
ing(Items.WHEAT_SEEDS),
2020-01-22 20:31:09 +01:00
ing(Items.SUGAR_CANE),
ing(ModItems.GOLD_LEAF)).register();
new TreeRitualRecipe(res("furnace_heater"),
2020-01-22 20:31:09 +01:00
ing(Blocks.OAK_SAPLING), new ItemStack(ModBlocks.FURNACE_HEATER), 600,
ing(ModBlocks.INFUSED_STONE),
ing(ModBlocks.INFUSED_STONE),
ing(ModItems.TAINTED_GOLD),
ing(ModItems.INFUSED_IRON),
ing(Items.FIRE_CHARGE),
ing(Items.FLINT),
2020-01-22 20:31:09 +01:00
ing(Blocks.MAGMA_BLOCK),
ing(ModItems.TOKEN_FEAR)).register();
new TreeRitualRecipe(res("conversion_catalyst"),
2020-01-22 20:31:09 +01:00
ing(Blocks.JUNGLE_SAPLING), new ItemStack(ModBlocks.CONVERSION_CATALYST), 600,
ing(ModBlocks.GOLD_BRICK),
ing(ModBlocks.INFUSED_STONE),
ing(Items.BREWING_STAND),
ing(ModItems.SKY_INGOT),
ing(ModItems.GOLD_LEAF),
ing(Blocks.GLOWSTONE)).register();
new TreeRitualRecipe(res("crushing_catalyst"),
2020-01-22 20:31:09 +01:00
ing(Blocks.OAK_SAPLING), new ItemStack(ModBlocks.CRUSHING_CATALYST), 600,
ing(ModBlocks.GOLD_BRICK),
ing(ModBlocks.INFUSED_STONE),
ing(Blocks.PISTON),
ing(Items.FLINT),
ing(ModItems.TOKEN_ANGER)).register();
new TreeRitualRecipe(res("plant_powder"),
2020-01-22 20:31:09 +01:00
ing(new ItemStack(Blocks.OAK_SAPLING)),
2020-01-26 01:41:49 +01:00
ItemEffectPowder.setEffect(new ItemStack(ModItems.EFFECT_POWDER, 24), PlantBoostEffect.NAME), 400,
ing(ModBlocks.GOLD_POWDER),
ing(ModBlocks.GOLD_POWDER),
ing(ModItems.SKY_INGOT),
ing(Items.WHEAT)).register();
new TreeRitualRecipe(res("cache_powder"),
2020-01-22 20:31:09 +01:00
ing(new ItemStack(Blocks.OAK_SAPLING)),
2020-01-26 01:41:49 +01:00
ItemEffectPowder.setEffect(new ItemStack(ModItems.EFFECT_POWDER, 32), CacheRechargeEffect.NAME), 400,
ing(ModBlocks.GOLD_POWDER),
ing(ModBlocks.GOLD_POWDER),
ing(ModItems.SKY_INGOT),
ing(ModItems.AURA_CACHE)).register();
new TreeRitualRecipe(res("animal_powder"),
2020-01-22 20:31:09 +01:00
ing(Blocks.JUNGLE_SAPLING),
2020-01-26 01:41:49 +01:00
ItemEffectPowder.setEffect(new ItemStack(ModItems.EFFECT_POWDER, 8), AnimalEffect.NAME), 400,
ing(ModBlocks.GOLD_POWDER),
ing(ModBlocks.GOLD_POWDER),
ing(ModItems.SKY_INGOT),
ing(Items.EGG)).register();
new TreeRitualRecipe(res("ore_spawn_powder"),
2020-01-22 20:31:09 +01:00
ing(Blocks.OAK_SAPLING),
2020-01-26 01:41:49 +01:00
ItemEffectPowder.setEffect(new ItemStack(ModItems.EFFECT_POWDER, 4), OreSpawnEffect.NAME), 400,
ing(ModBlocks.GOLD_POWDER),
ing(ModBlocks.GOLD_POWDER),
ing(Blocks.DIAMOND_ORE),
ing(Blocks.REDSTONE_ORE)).register();
2020-02-26 19:32:42 +01:00
new TreeRitualRecipe(res("nether_grass_powder"),
ing(Blocks.OAK_SAPLING),
2020-02-26 19:38:47 +01:00
ItemEffectPowder.setEffect(new ItemStack(ModItems.EFFECT_POWDER, 24), NetherGrassEffect.NAME), 400,
2020-02-26 19:32:42 +01:00
ing(ModBlocks.GOLD_POWDER),
ing(ModBlocks.GOLD_POWDER),
ing(Blocks.NETHERRACK),
ing(Blocks.GRASS)).register();
new TreeRitualRecipe(res("token_joy"),
2020-01-22 20:31:09 +01:00
ing(Blocks.OAK_SAPLING), new ItemStack(ModItems.TOKEN_JOY, 2), 200,
2020-01-26 01:41:49 +01:00
nbtIng(ItemAuraBottle.setType(new ItemStack(ModItems.AURA_BOTTLE), NaturesAuraAPI.TYPE_OVERWORLD)),
ing(ModItems.GOLD_LEAF),
2020-01-22 20:31:09 +01:00
ing(ItemTags.SMALL_FLOWERS),
ing(Items.APPLE),
ing(Blocks.TORCH),
ing(Items.IRON_INGOT)).register();
new TreeRitualRecipe(res("token_anger"),
2020-01-22 20:31:09 +01:00
ing(Blocks.OAK_SAPLING), new ItemStack(ModItems.TOKEN_ANGER, 2), 200,
2020-01-26 01:41:49 +01:00
nbtIng(ItemAuraBottle.setType(new ItemStack(ModItems.AURA_BOTTLE), NaturesAuraAPI.TYPE_NETHER)),
ing(ModItems.GOLD_LEAF),
2020-01-22 20:31:09 +01:00
ing(Blocks.MAGMA_BLOCK),
ing(Items.BLAZE_POWDER),
ing(Items.GUNPOWDER),
ing(Items.ENDER_PEARL)).register();
new TreeRitualRecipe(res("token_sorrow"),
2020-01-22 20:31:09 +01:00
ing(Blocks.OAK_SAPLING), new ItemStack(ModItems.TOKEN_SORROW, 2), 200,
2020-01-26 01:41:49 +01:00
nbtIng(ItemAuraBottle.setType(new ItemStack(ModItems.AURA_BOTTLE), NaturesAuraAPI.TYPE_OVERWORLD)),
ing(ModItems.GOLD_LEAF),
ing(Items.GHAST_TEAR),
ing(Items.BEEF, Items.MUTTON, Items.CHICKEN, Items.PORKCHOP),
ing(Blocks.GLASS),
2020-01-22 20:31:09 +01:00
ing(ItemTags.FISHES)).register();
new TreeRitualRecipe(res("token_fear"),
2020-01-22 20:31:09 +01:00
ing(Blocks.OAK_SAPLING), new ItemStack(ModItems.TOKEN_FEAR, 2), 200,
2020-01-26 01:41:49 +01:00
nbtIng(ItemAuraBottle.setType(new ItemStack(ModItems.AURA_BOTTLE), NaturesAuraAPI.TYPE_NETHER)),
ing(ModItems.GOLD_LEAF),
ing(Items.ROTTEN_FLESH),
ing(Items.FEATHER),
ing(Items.BONE),
ing(Blocks.SOUL_SAND)).register();
2018-10-18 13:34:37 +02:00
new AltarRecipe(res("infused_iron"),
ing(Items.IRON_INGOT), new ItemStack(ModItems.INFUSED_IRON),
2020-02-25 22:57:10 +01:00
NaturesAuraAPI.TYPE_OVERWORLD, Ingredient.EMPTY, 15000, 80).register();
new AltarRecipe(res("infused_iron_block"),
2020-01-23 19:20:47 +01:00
ing(Blocks.IRON_BLOCK), new ItemStack(ModBlocks.INFUSED_IRON_BLOCK),
2020-02-25 22:57:10 +01:00
NaturesAuraAPI.TYPE_OVERWORLD, Ingredient.EMPTY, 135000, 700).register();
new AltarRecipe(res("tainted_gold"),
ing(Items.GOLD_INGOT), new ItemStack(ModItems.TAINTED_GOLD),
NaturesAuraAPI.TYPE_NETHER, Ingredient.EMPTY, 15000, 80).register();
new AltarRecipe(res("tainted_gold_block"),
ing(Blocks.GOLD_BLOCK), new ItemStack(ModBlocks.TAINTED_GOLD_BLOCK),
NaturesAuraAPI.TYPE_NETHER, Ingredient.EMPTY, 135000, 700).register();
new AltarRecipe(res("infused_stone"),
ing(Blocks.STONE), new ItemStack(ModBlocks.INFUSED_STONE),
2020-02-25 22:57:10 +01:00
NaturesAuraAPI.TYPE_OVERWORLD, Ingredient.EMPTY, 7500, 40).register();
2018-10-31 01:17:58 +01:00
Ingredient conversion = ing(ModBlocks.CONVERSION_CATALYST);
2020-02-25 22:57:10 +01:00
new AltarRecipe(res("breath"), nbtIng(ItemAuraBottle.setType(new ItemStack(ModItems.AURA_BOTTLE), NaturesAuraAPI.TYPE_END)), new ItemStack(Items.DRAGON_BREATH), NaturesAuraAPI.TYPE_NETHER, conversion, 20000, 80).register();
new AltarRecipe(res("leather"), ing(Items.ROTTEN_FLESH), new ItemStack(Items.LEATHER), NaturesAuraAPI.TYPE_OVERWORLD, conversion, 10000, 50).register();
new AltarRecipe(res("soul_sand"), ing(Blocks.SAND), new ItemStack(Blocks.SOUL_SAND), NaturesAuraAPI.TYPE_NETHER, conversion, 5000, 100).register();
new AltarRecipe(res("nether_wart"), ing(Blocks.RED_MUSHROOM), new ItemStack(Items.NETHER_WART), NaturesAuraAPI.TYPE_NETHER, conversion, 30000, 250).register();
new AltarRecipe(res("prismarine"), ing(Items.QUARTZ), new ItemStack(Items.PRISMARINE_SHARD), NaturesAuraAPI.TYPE_NETHER, conversion, 55000, 200).register();
new AltarRecipe(res("water"), ing(Items.GLASS_BOTTLE), PotionUtils.addPotionToItemStack(new ItemStack(Items.POTION), Potions.WATER), NaturesAuraAPI.TYPE_OVERWORLD, conversion, 25000, 200).register();
new AltarRecipe(res("coal"), ing(Items.CHARCOAL), new ItemStack(Items.COAL), NaturesAuraAPI.TYPE_OVERWORLD, conversion, 30000, 250).register();
2018-11-20 19:59:18 +01:00
Ingredient crushing = ing(ModBlocks.CRUSHING_CATALYST);
2020-02-25 22:57:10 +01:00
new AltarRecipe(res("bone"), ing(Items.BONE), new ItemStack(Items.BONE_MEAL, 6), NaturesAuraAPI.TYPE_OVERWORLD, crushing, 3000, 40).register();
new AltarRecipe(res("sugar"), ing(Items.SUGAR_CANE), new ItemStack(Items.SUGAR, 3), NaturesAuraAPI.TYPE_OVERWORLD, crushing, 3000, 40).register();
new AltarRecipe(res("blaze"), ing(Items.BLAZE_ROD), new ItemStack(Items.BLAZE_POWDER, 4), NaturesAuraAPI.TYPE_NETHER, crushing, 5000, 60).register();
new AltarRecipe(res("glowstone"), ing(Blocks.GLOWSTONE), new ItemStack(Items.GLOWSTONE_DUST, 4), NaturesAuraAPI.TYPE_NETHER, crushing, 3000, 40).register();
new AltarRecipe(res("sand"), ing(Blocks.COBBLESTONE), new ItemStack(Blocks.SAND), NaturesAuraAPI.TYPE_OVERWORLD, crushing, 3000, 40).register();
2019-01-28 17:37:24 +01:00
new OfferingRecipe(res("sky_ingot"),
amountIng(new ItemStack(ModItems.INFUSED_IRON, 3)),
ing(ModItems.CALLING_SPIRIT),
2018-11-21 01:05:50 +01:00
new ItemStack(ModItems.SKY_INGOT)).register();
new OfferingRecipe(res("sky_ingot_from_gold"),
ing(ModItems.TAINTED_GOLD),
ing(ModItems.CALLING_SPIRIT),
new ItemStack(ModItems.SKY_INGOT)).register();
new OfferingRecipe(res("clock_hand"),
ing(Items.NETHER_STAR),
ing(ModItems.CALLING_SPIRIT),
2019-02-09 19:58:07 +01:00
new ItemStack(ModItems.CLOCK_HAND)).register();
new OfferingRecipe(res("token_euphoria"),
ing(ModItems.TOKEN_JOY),
ing(ModItems.CALLING_SPIRIT),
2019-02-15 22:46:14 +01:00
new ItemStack(ModItems.TOKEN_EUPHORIA)).register();
new OfferingRecipe(res("token_rage"),
ing(ModItems.TOKEN_ANGER),
ing(ModItems.CALLING_SPIRIT),
2019-02-15 22:46:14 +01:00
new ItemStack(ModItems.TOKEN_RAGE)).register();
new OfferingRecipe(res("token_grief"),
ing(ModItems.TOKEN_SORROW),
ing(ModItems.CALLING_SPIRIT),
2019-02-15 22:46:14 +01:00
new ItemStack(ModItems.TOKEN_GRIEF)).register();
new OfferingRecipe(res("token_terror"),
ing(ModItems.TOKEN_FEAR),
ing(ModItems.CALLING_SPIRIT),
2019-02-15 22:46:14 +01:00
new ItemStack(ModItems.TOKEN_TERROR)).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(
2020-01-22 20:31:09 +01:00
Blocks.STONE_BRICKS.getDefaultState(),
Blocks.MOSSY_STONE_BRICKS.getDefaultState());
2019-02-01 17:42:59 +01:00
NaturesAuraAPI.BOTANIST_PICKAXE_CONVERSIONS.put(
2020-01-22 20:31:09 +01:00
Blocks.COBBLESTONE_WALL.getDefaultState(),
Blocks.MOSSY_COBBLESTONE_WALL.getDefaultState());
NaturesAuraAPI.BOTANIST_PICKAXE_CONVERSIONS.put(
Blocks.STONE_BRICK_WALL.getDefaultState(),
Blocks.MOSSY_STONE_BRICK_WALL.getDefaultState());
2018-11-20 19:59:18 +01:00
for (Block block : ForgeRegistries.BLOCKS)
2019-10-20 22:30:49 +02:00
if (block instanceof FlowerBlock)
2020-01-22 20:31:09 +01:00
NaturesAuraAPI.FLOWERS.addAll(block.getStateContainer().getValidStates());
2019-10-20 22:30:49 +02:00
for (DyeColor color : DyeColor.values())
2020-01-25 16:56:04 +01:00
new AnimalSpawnerRecipe(res("sheep_" + color.getName()), EntityType.SHEEP,
500, 60, ing(ModItems.BIRTH_SPIRIT), ing(Items.MUTTON),
2020-01-29 20:22:10 +01:00
ing(ColoredBlockHelper.WOOL.get(color.getId()))) {
2019-01-01 15:20:12 +01:00
@Override
public Entity makeEntity(World world, double x, double y, double z) {
2019-10-20 22:30:49 +02:00
SheepEntity sheep = (SheepEntity) super.makeEntity(world, x, y, z);
2019-01-01 15:20:12 +01:00
sheep.setFleeceColor(color);
return sheep;
}
}.register();
2020-01-25 16:56:04 +01:00
spawner("cow", EntityType.COW, 50000, 60, ing(Items.BEEF), ing(Items.LEATHER));
spawner("chicken", EntityType.CHICKEN, 30000, 40, ing(Items.FEATHER), ing(Items.EGG));
spawner("pig", EntityType.PIG, 50000, 60, ing(Items.PORKCHOP));
spawner("blaze", EntityType.BLAZE, 150000, 120, ing(Items.BLAZE_ROD), ing(Items.BLAZE_POWDER));
spawner("ghast", EntityType.GHAST, 120000, 150, ing(Items.GUNPOWDER), ing(Items.GHAST_TEAR));
spawner("ocelot", EntityType.OCELOT, 80000, 60, ing(ItemTags.FISHES), ing(ItemTags.WOOL));
2020-01-25 16:56:04 +01:00
spawner("mule", EntityType.MULE, 100000, 100, ing(Items.LEATHER), ing(Blocks.CHEST), ing(Items.APPLE));
spawner("bat", EntityType.BAT, 30000, 40, ing(Items.FEATHER));
spawner("endermite", EntityType.ENDERMITE, 30000, 40, ing(Items.ENDER_PEARL), ing(Blocks.STONE));
spawner("parrot", EntityType.PARROT, 50000, 60, ing(Items.FEATHER), ing(Items.COOKIE));
spawner("slime", EntityType.SLIME, 30000, 40, ing(Items.SLIME_BALL));
spawner("spider", EntityType.SPIDER, 100000, 120, ing(Items.STRING), ing(Items.SPIDER_EYE));
spawner("skeleton", EntityType.SKELETON, 100000, 120, ing(Items.BONE), ing(Items.ARROW));
spawner("enderman", EntityType.ENDERMAN, 120000, 120, ing(Items.ENDER_PEARL));
spawner("silverfish", EntityType.SILVERFISH, 30000, 40, ing(Blocks.STONE));
spawner("squid", EntityType.SQUID, 50000, 40, ing(Items.INK_SAC));
spawner("stray", EntityType.STRAY, 100000, 120, ing(Items.BONE), ing(Blocks.ICE));
spawner("shulker", EntityType.SHULKER, 150000, 100, ing(Items.SHULKER_SHELL));
spawner("husk", EntityType.HUSK, 100000, 120, ing(Items.ROTTEN_FLESH), ing(Blocks.SAND));
spawner("llama", EntityType.LLAMA, 60000, 80, ing(ItemTags.WOOL));
spawner("rabbit", EntityType.RABBIT, 30000, 40, ing(Items.RABBIT_HIDE));
spawner("magma_cube", EntityType.MAGMA_CUBE, 100000, 100, ing(Items.MAGMA_CREAM));
spawner("zombie_pigman", EntityType.ZOMBIE_PIGMAN, 120000, 150, ing(Items.ROTTEN_FLESH), ing(Items.GOLD_NUGGET));
spawner("polar_bear", EntityType.POLAR_BEAR, 50000, 60, ing(Items.COD), ing(Blocks.ICE));
spawner("mooshroom", EntityType.MOOSHROOM, 40000, 60, ing(Items.LEATHER), ing(Blocks.RED_MUSHROOM));
spawner("guardian", EntityType.GUARDIAN, 150000, 150, ing(Items.PRISMARINE_SHARD), ing(Items.PRISMARINE_CRYSTALS));
spawner("horse", EntityType.HORSE, 100000, 100, ing(Items.LEATHER));
spawner("donkey", EntityType.DONKEY, 100000, 100, ing(Items.LEATHER), ing(Blocks.CHEST));
spawner("cave_spider", EntityType.CAVE_SPIDER, 100000, 120, ing(Items.STRING), ing(Items.FERMENTED_SPIDER_EYE));
spawner("creeper", EntityType.CREEPER, 100000, 120, ing(Items.GUNPOWDER));
spawner("witch", EntityType.WITCH, 150000, 150, ing(Items.GLASS_BOTTLE), ing(Items.GLOWSTONE_DUST));
spawner("wither_skeleton", EntityType.WITHER_SKELETON, 150000, 150, ing(Items.BONE), ing(Blocks.OBSIDIAN));
spawner("wolf", EntityType.WOLF, 50000, 60, ing(Items.LEATHER), ing(Items.BONE));
spawner("zombie", EntityType.ZOMBIE, 100000, 100, ing(Items.ROTTEN_FLESH));
spawner("bee", EntityType.BEE, 50000, 100, ing(Items.HONEYCOMB), ing(Items.HONEY_BLOCK));
spawner("dolphin", EntityType.DOLPHIN, 100000, 150, ing(ItemTags.FISHES), ing(Items.MAP));
spawner("fox", EntityType.FOX, 30000, 100, ing(Items.SWEET_BERRIES), ing(Items.FEATHER));
spawner("panda", EntityType.PANDA, 100000, 100, ing(Items.BAMBOO), ing(Blocks.BAMBOO_SAPLING));
spawner("turtle", EntityType.TURTLE, 100000, 150, ing(Items.SCUTE), ing(Items.SEAGRASS));
spawner("phantom", EntityType.PHANTOM, 200000, 200, ing(Items.PHANTOM_MEMBRANE));
spawner("cat", EntityType.CAT, 50000, 100, ing(Items.STRING), ing(ItemTags.WOOL));
2019-02-20 23:49:21 +01:00
2020-01-23 22:40:03 +01:00
NaturesAuraAPI.OVERWORLD_ORES.add(new WeightedOre(Tags.Blocks.ORES_COAL, 5000));
NaturesAuraAPI.OVERWORLD_ORES.add(new WeightedOre(Tags.Blocks.ORES_IRON, 3000));
NaturesAuraAPI.OVERWORLD_ORES.add(new WeightedOre(Tags.Blocks.ORES_GOLD, 500));
NaturesAuraAPI.OVERWORLD_ORES.add(new WeightedOre(Tags.Blocks.ORES_DIAMOND, 50));
NaturesAuraAPI.OVERWORLD_ORES.add(new WeightedOre(Tags.Blocks.ORES_LAPIS, 250));
NaturesAuraAPI.OVERWORLD_ORES.add(new WeightedOre(Tags.Blocks.ORES_REDSTONE, 200));
NaturesAuraAPI.OVERWORLD_ORES.add(new WeightedOre(Tags.Blocks.ORES_EMERALD, 30));
NaturesAuraAPI.NETHER_ORES.add(new WeightedOre(Tags.Blocks.ORES_QUARTZ, 3000));
2019-02-20 23:49:21 +01:00
2020-04-29 00:24:07 +02:00
foreignOre(NaturesAuraAPI.OVERWORLD_ORES, "ores/copper", 2000);
foreignOre(NaturesAuraAPI.NETHER_ORES, "ores/nether/copper", 2000);
foreignOre(NaturesAuraAPI.OVERWORLD_ORES, "ores/tin", 1800);
foreignOre(NaturesAuraAPI.NETHER_ORES, "ores/nether/tin", 1800);
foreignOre(NaturesAuraAPI.OVERWORLD_ORES, "ores/lead", 1500);
foreignOre(NaturesAuraAPI.NETHER_ORES, "ores/nether/lead", 1500);
foreignOre(NaturesAuraAPI.OVERWORLD_ORES, "ores/silver", 1000);
foreignOre(NaturesAuraAPI.NETHER_ORES, "ores/nether/silver", 1000);
foreignOre(NaturesAuraAPI.OVERWORLD_ORES, "ores/nickel", 100);
foreignOre(NaturesAuraAPI.NETHER_ORES, "ores/nether/nickel", 100);
foreignOre(NaturesAuraAPI.OVERWORLD_ORES, "ores/platinum", 20);
foreignOre(NaturesAuraAPI.NETHER_ORES, "ores/nether/platinum", 20);
foreignOre(NaturesAuraAPI.OVERWORLD_ORES, "ores/aluminum", 1200);
foreignOre(NaturesAuraAPI.OVERWORLD_ORES, "ores/aluminium", 1200);
foreignOre(NaturesAuraAPI.OVERWORLD_ORES, "ores/osmium", 1500);
foreignOre(NaturesAuraAPI.OVERWORLD_ORES, "ores/zinc", 1000);
foreignOre(NaturesAuraAPI.OVERWORLD_ORES, "ores/yellorite", 1200);
foreignOre(NaturesAuraAPI.OVERWORLD_ORES, "ores/uranium", 400);
foreignOre(NaturesAuraAPI.OVERWORLD_ORES, "ores/apatite", 700);
foreignOre(NaturesAuraAPI.OVERWORLD_ORES, "ores/ruby", 40);
foreignOre(NaturesAuraAPI.OVERWORLD_ORES, "ores/peridot", 40);
foreignOre(NaturesAuraAPI.OVERWORLD_ORES, "ores/topaz", 40);
foreignOre(NaturesAuraAPI.OVERWORLD_ORES, "ores/tanzanite", 40);
foreignOre(NaturesAuraAPI.OVERWORLD_ORES, "ores/malachite", 40);
foreignOre(NaturesAuraAPI.OVERWORLD_ORES, "ores/sapphire", 40);
foreignOre(NaturesAuraAPI.OVERWORLD_ORES, "ores/amber", 150);
foreignOre(NaturesAuraAPI.OVERWORLD_ORES, "ores/resonating", 50);
foreignOre(NaturesAuraAPI.OVERWORLD_ORES, "ores/sulfur", 3000);
foreignOre(NaturesAuraAPI.OVERWORLD_ORES, "ores/saltpeter", 250);
foreignOre(NaturesAuraAPI.NETHER_ORES, "ores/firestone", 30);
foreignOre(NaturesAuraAPI.OVERWORLD_ORES, "ores/salt", 2900);
foreignOre(NaturesAuraAPI.OVERWORLD_ORES, "ores/draconium", 5);
foreignOre(NaturesAuraAPI.NETHER_ORES, "ores/cobalt", 50);
foreignOre(NaturesAuraAPI.NETHER_ORES, "ores/ardite", 50);
2019-03-12 19:34:59 +01:00
2020-01-24 17:05:41 +01:00
NaturesAuraAPI.PROJECTILE_GENERATIONS.put(EntityType.EGG, 2500);
NaturesAuraAPI.PROJECTILE_GENERATIONS.put(EntityType.SNOWBALL, 3500);
NaturesAuraAPI.PROJECTILE_GENERATIONS.put(EntityType.SMALL_FIREBALL, 15000);
NaturesAuraAPI.PROJECTILE_GENERATIONS.put(EntityType.ENDER_PEARL, 30000);
NaturesAuraAPI.PROJECTILE_GENERATIONS.put(EntityType.EXPERIENCE_BOTTLE, 75000);
NaturesAuraAPI.PROJECTILE_GENERATIONS.put(EntityType.ARROW, 10000);
NaturesAuraAPI.PROJECTILE_GENERATIONS.put(EntityType.SPECTRAL_ARROW, 15000);
NaturesAuraAPI.PROJECTILE_GENERATIONS.put(EntityType.SHULKER_BULLET, 250000);
NaturesAuraAPI.PROJECTILE_GENERATIONS.put(EntityType.LLAMA_SPIT, 80000);
NaturesAuraAPI.PROJECTILE_GENERATIONS.put(EntityType.TRIDENT, 3000000);
}
2020-01-25 16:56:04 +01:00
private static void spawner(String name, EntityType entity, int aura, int time, Ingredient... ings) {
Ingredient[] actualIngs = new Ingredient[ings.length + 1];
actualIngs[0] = ing(ModItems.BIRTH_SPIRIT);
System.arraycopy(ings, 0, actualIngs, 1, ings.length);
2020-01-25 16:56:04 +01:00
new AnimalSpawnerRecipe(res(name), entity, aura, time, actualIngs).register();
2018-10-16 01:36:30 +02:00
}
2020-04-29 00:24:07 +02:00
private static void foreignOre(List<WeightedOre> list, String name, int weight) {
ResourceLocation res = new ResourceLocation("forge", name);
Tag<Block> tag = BlockTags.getCollection().get(res);
if (tag == null)
return;
list.add(new WeightedOre(tag, weight));
}
private static Ingredient ing(Block... blocks) {
return ing(Arrays.stream(blocks).map(ItemStack::new).toArray(ItemStack[]::new));
}
private static Ingredient ing(Item... items) {
return ing(Arrays.stream(items).map(ItemStack::new).toArray(ItemStack[]::new));
}
private static Ingredient ing(ItemStack... stacks) {
return Ingredient.fromStacks(stacks);
}
2020-01-22 20:31:09 +01:00
private static Ingredient ing(Tag<Item> tag) {
return Ingredient.fromTag(tag);
}
private static Ingredient nbtIng(ItemStack stack) {
return new NBTIngredient(stack);
}
private static Ingredient amountIng(ItemStack stack) {
return new AmountIngredient(stack);
}
private static ResourceLocation res(String name) {
return new ResourceLocation(NaturesAura.MOD_ID, name);
}
@Override
protected Object prepare(IResourceManager resourceManagerIn, IProfiler profilerIn) {
return null;
}
@Override
protected void apply(Object splashList, IResourceManager resourceManagerIn, IProfiler profilerIn) {
NaturesAura.LOGGER.info("Loading recipes");
this.init();
}
2018-10-16 01:36:30 +02:00
}