mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-11-26 05:08:34 +01:00
change recipes to not use wildcard where they don't have to
Closes #34, surprisingly
This commit is contained in:
parent
80b3196034
commit
0724b6e007
2 changed files with 183 additions and 165 deletions
|
@ -260,10 +260,6 @@ public final class Helper {
|
||||||
}, () -> null);
|
}, () -> null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Ingredient blockIng(Block block) {
|
|
||||||
return Ingredient.fromStacks(new ItemStack(block));
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void addAdvancement(EntityPlayer player, ResourceLocation advancement, String criterion) {
|
public static void addAdvancement(EntityPlayer player, ResourceLocation advancement, String criterion) {
|
||||||
if (!(player instanceof EntityPlayerMP))
|
if (!(player instanceof EntityPlayerMP))
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package de.ellpeck.naturesaura.recipes;
|
package de.ellpeck.naturesaura.recipes;
|
||||||
|
|
||||||
import de.ellpeck.naturesaura.Helper;
|
|
||||||
import de.ellpeck.naturesaura.NaturesAura;
|
import de.ellpeck.naturesaura.NaturesAura;
|
||||||
import de.ellpeck.naturesaura.api.NaturesAuraAPI;
|
import de.ellpeck.naturesaura.api.NaturesAuraAPI;
|
||||||
import de.ellpeck.naturesaura.api.recipes.*;
|
import de.ellpeck.naturesaura.api.recipes.*;
|
||||||
|
@ -23,6 +22,7 @@ import net.minecraft.entity.passive.EntitySheep;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.init.Items;
|
import net.minecraft.init.Items;
|
||||||
import net.minecraft.item.EnumDyeColor;
|
import net.minecraft.item.EnumDyeColor;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.item.crafting.Ingredient;
|
import net.minecraft.item.crafting.Ingredient;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
@ -30,193 +30,195 @@ import net.minecraft.world.World;
|
||||||
import net.minecraftforge.fml.common.registry.ForgeRegistries;
|
import net.minecraftforge.fml.common.registry.ForgeRegistries;
|
||||||
import net.minecraftforge.oredict.OreDictionary;
|
import net.minecraftforge.oredict.OreDictionary;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
public final class ModRecipes {
|
public final class ModRecipes {
|
||||||
|
|
||||||
public static void init() {
|
public static void init() {
|
||||||
new TreeRitualRecipe(new ResourceLocation(NaturesAura.MOD_ID, "eye"),
|
new TreeRitualRecipe(new ResourceLocation(NaturesAura.MOD_ID, "eye"),
|
||||||
Ingredient.fromStacks(new ItemStack(Blocks.SAPLING)), new ItemStack(ModItems.EYE), 250,
|
ing(new ItemStack(Blocks.SAPLING)), new ItemStack(ModItems.EYE), 250,
|
||||||
Ingredient.fromItem(Items.SPIDER_EYE),
|
ing(Items.SPIDER_EYE),
|
||||||
Ingredient.fromItem(Items.GOLD_INGOT),
|
ing(Items.GOLD_INGOT),
|
||||||
Ingredient.fromItem(ModItems.GOLD_LEAF),
|
ing(ModItems.GOLD_LEAF),
|
||||||
Ingredient.fromItem(ModItems.GOLD_LEAF)).register();
|
ing(ModItems.GOLD_LEAF)).register();
|
||||||
new TreeRitualRecipe(new ResourceLocation(NaturesAura.MOD_ID, "eye_improved"),
|
new TreeRitualRecipe(new ResourceLocation(NaturesAura.MOD_ID, "eye_improved"),
|
||||||
Ingredient.fromStacks(new ItemStack(Blocks.SAPLING)), new ItemStack(ModItems.EYE_IMPROVED), 500,
|
ing(new ItemStack(Blocks.SAPLING)), new ItemStack(ModItems.EYE_IMPROVED), 500,
|
||||||
Ingredient.fromItem(ModItems.EYE),
|
ing(ModItems.EYE),
|
||||||
Ingredient.fromItem(ModItems.SKY_INGOT),
|
ing(ModItems.SKY_INGOT),
|
||||||
Ingredient.fromItem(ModItems.SKY_INGOT),
|
ing(ModItems.SKY_INGOT),
|
||||||
Helper.blockIng(ModBlocks.END_FLOWER),
|
ing(ModBlocks.END_FLOWER),
|
||||||
Ingredient.fromItem(ModItems.GOLD_LEAF),
|
ing(ModItems.GOLD_LEAF),
|
||||||
Ingredient.fromItem(ModItems.GOLD_LEAF)).register();
|
ing(ModItems.GOLD_LEAF)).register();
|
||||||
new TreeRitualRecipe(new ResourceLocation(NaturesAura.MOD_ID, "nature_altar"),
|
new TreeRitualRecipe(new ResourceLocation(NaturesAura.MOD_ID, "nature_altar"),
|
||||||
Helper.blockIng(Blocks.SAPLING), new ItemStack(ModBlocks.NATURE_ALTAR), 500,
|
ing(Blocks.SAPLING), new ItemStack(ModBlocks.NATURE_ALTAR), 500,
|
||||||
Helper.blockIng(Blocks.STONE),
|
ing(Blocks.STONE),
|
||||||
Helper.blockIng(Blocks.STONE),
|
ing(Blocks.STONE),
|
||||||
Helper.blockIng(Blocks.STONE),
|
ing(Blocks.STONE),
|
||||||
Ingredient.fromItem(ModItems.GOLD_LEAF),
|
ing(ModItems.GOLD_LEAF),
|
||||||
Ingredient.fromItem(Items.GOLD_INGOT),
|
ing(Items.GOLD_INGOT),
|
||||||
Ingredient.fromItem(ModItems.TOKEN_JOY)).register();
|
ing(ModItems.TOKEN_JOY)).register();
|
||||||
new TreeRitualRecipe(new ResourceLocation(NaturesAura.MOD_ID, "ancient_sapling"),
|
new TreeRitualRecipe(new ResourceLocation(NaturesAura.MOD_ID, "ancient_sapling"),
|
||||||
Helper.blockIng(Blocks.SAPLING), new ItemStack(ModBlocks.ANCIENT_SAPLING), 200,
|
ing(Blocks.SAPLING), new ItemStack(ModBlocks.ANCIENT_SAPLING), 200,
|
||||||
Helper.blockIng(Blocks.SAPLING),
|
ing(Blocks.SAPLING),
|
||||||
Helper.blockIng(Blocks.YELLOW_FLOWER),
|
ing(Blocks.YELLOW_FLOWER),
|
||||||
Helper.blockIng(Blocks.RED_FLOWER),
|
ing(Blocks.RED_FLOWER),
|
||||||
Ingredient.fromItem(Items.WHEAT_SEEDS),
|
ing(Items.WHEAT_SEEDS),
|
||||||
Ingredient.fromItem(Items.REEDS),
|
ing(Items.REEDS),
|
||||||
Ingredient.fromItem(ModItems.GOLD_LEAF)).register();
|
ing(ModItems.GOLD_LEAF)).register();
|
||||||
new TreeRitualRecipe(new ResourceLocation(NaturesAura.MOD_ID, "furnace_heater"),
|
new TreeRitualRecipe(new ResourceLocation(NaturesAura.MOD_ID, "furnace_heater"),
|
||||||
Helper.blockIng(Blocks.SAPLING), new ItemStack(ModBlocks.FURNACE_HEATER), 600,
|
ing(Blocks.SAPLING), new ItemStack(ModBlocks.FURNACE_HEATER), 600,
|
||||||
Helper.blockIng(ModBlocks.INFUSED_STONE),
|
ing(ModBlocks.INFUSED_STONE),
|
||||||
Helper.blockIng(ModBlocks.INFUSED_STONE),
|
ing(ModBlocks.INFUSED_STONE),
|
||||||
Ingredient.fromItem(ModItems.INFUSED_IRON),
|
ing(ModItems.INFUSED_IRON),
|
||||||
Ingredient.fromItem(ModItems.INFUSED_IRON),
|
ing(ModItems.INFUSED_IRON),
|
||||||
Ingredient.fromItem(Items.FIRE_CHARGE),
|
ing(Items.FIRE_CHARGE),
|
||||||
Ingredient.fromItem(Items.FLINT),
|
ing(Items.FLINT),
|
||||||
Helper.blockIng(Blocks.MAGMA),
|
ing(Blocks.MAGMA),
|
||||||
Ingredient.fromItem(ModItems.TOKEN_FEAR)).register();
|
ing(ModItems.TOKEN_FEAR)).register();
|
||||||
new TreeRitualRecipe(new ResourceLocation(NaturesAura.MOD_ID, "conversion_catalyst"),
|
new TreeRitualRecipe(new ResourceLocation(NaturesAura.MOD_ID, "conversion_catalyst"),
|
||||||
Ingredient.fromStacks(new ItemStack(Blocks.SAPLING, 1, 3)), new ItemStack(ModBlocks.CONVERSION_CATALYST), 600,
|
ing(new ItemStack(Blocks.SAPLING, 1, 3)), new ItemStack(ModBlocks.CONVERSION_CATALYST), 600,
|
||||||
Helper.blockIng(ModBlocks.GOLD_BRICK),
|
ing(ModBlocks.GOLD_BRICK),
|
||||||
Helper.blockIng(ModBlocks.INFUSED_STONE),
|
ing(ModBlocks.INFUSED_STONE),
|
||||||
Ingredient.fromItem(Items.BREWING_STAND),
|
ing(Items.BREWING_STAND),
|
||||||
Ingredient.fromItem(ModItems.SKY_INGOT),
|
ing(ModItems.SKY_INGOT),
|
||||||
Ingredient.fromItem(ModItems.GOLD_LEAF),
|
ing(ModItems.GOLD_LEAF),
|
||||||
Helper.blockIng(Blocks.GLOWSTONE)).register();
|
ing(Blocks.GLOWSTONE)).register();
|
||||||
new TreeRitualRecipe(new ResourceLocation(NaturesAura.MOD_ID, "crushing_catalyst"),
|
new TreeRitualRecipe(new ResourceLocation(NaturesAura.MOD_ID, "crushing_catalyst"),
|
||||||
Helper.blockIng(Blocks.SAPLING), new ItemStack(ModBlocks.CRUSHING_CATALYST), 600,
|
ing(Blocks.SAPLING), new ItemStack(ModBlocks.CRUSHING_CATALYST), 600,
|
||||||
Helper.blockIng(ModBlocks.GOLD_BRICK),
|
ing(ModBlocks.GOLD_BRICK),
|
||||||
Helper.blockIng(ModBlocks.INFUSED_STONE),
|
ing(ModBlocks.INFUSED_STONE),
|
||||||
Helper.blockIng(Blocks.PISTON),
|
ing(Blocks.PISTON),
|
||||||
Ingredient.fromItem(Items.FLINT),
|
ing(Items.FLINT),
|
||||||
Ingredient.fromItem(ModItems.TOKEN_ANGER)).register();
|
ing(ModItems.TOKEN_ANGER)).register();
|
||||||
new TreeRitualRecipe(new ResourceLocation(NaturesAura.MOD_ID, "plant_powder"),
|
new TreeRitualRecipe(new ResourceLocation(NaturesAura.MOD_ID, "plant_powder"),
|
||||||
Ingredient.fromStacks(new ItemStack(Blocks.SAPLING)),
|
ing(new ItemStack(Blocks.SAPLING)),
|
||||||
ItemEffectPowder.setEffect(new ItemStack(ModItems.EFFECT_POWDER, 24), PlantBoostEffect.NAME), 400,
|
ItemEffectPowder.setEffect(new ItemStack(ModItems.EFFECT_POWDER, 24), PlantBoostEffect.NAME), 400,
|
||||||
Helper.blockIng(ModBlocks.GOLD_POWDER),
|
ing(ModBlocks.GOLD_POWDER),
|
||||||
Helper.blockIng(ModBlocks.GOLD_POWDER),
|
ing(ModBlocks.GOLD_POWDER),
|
||||||
Ingredient.fromItem(ModItems.SKY_INGOT),
|
ing(ModItems.SKY_INGOT),
|
||||||
Ingredient.fromItem(Items.WHEAT)).register();
|
ing(Items.WHEAT)).register();
|
||||||
new TreeRitualRecipe(new ResourceLocation(NaturesAura.MOD_ID, "cache_powder"),
|
new TreeRitualRecipe(new ResourceLocation(NaturesAura.MOD_ID, "cache_powder"),
|
||||||
Ingredient.fromStacks(new ItemStack(Blocks.SAPLING)),
|
ing(new ItemStack(Blocks.SAPLING)),
|
||||||
ItemEffectPowder.setEffect(new ItemStack(ModItems.EFFECT_POWDER, 32), CacheRechargeEffect.NAME), 400,
|
ItemEffectPowder.setEffect(new ItemStack(ModItems.EFFECT_POWDER, 32), CacheRechargeEffect.NAME), 400,
|
||||||
Helper.blockIng(ModBlocks.GOLD_POWDER),
|
ing(ModBlocks.GOLD_POWDER),
|
||||||
Helper.blockIng(ModBlocks.GOLD_POWDER),
|
ing(ModBlocks.GOLD_POWDER),
|
||||||
Ingredient.fromItem(ModItems.SKY_INGOT),
|
ing(ModItems.SKY_INGOT),
|
||||||
Ingredient.fromItem(ModItems.AURA_CACHE)).register();
|
ing(ModItems.AURA_CACHE)).register();
|
||||||
new TreeRitualRecipe(new ResourceLocation(NaturesAura.MOD_ID, "animal_powder"),
|
new TreeRitualRecipe(new ResourceLocation(NaturesAura.MOD_ID, "animal_powder"),
|
||||||
Ingredient.fromStacks(new ItemStack(Blocks.SAPLING, 1, 3)),
|
ing(new ItemStack(Blocks.SAPLING, 1, 3)),
|
||||||
ItemEffectPowder.setEffect(new ItemStack(ModItems.EFFECT_POWDER, 8), AnimalEffect.NAME), 400,
|
ItemEffectPowder.setEffect(new ItemStack(ModItems.EFFECT_POWDER, 8), AnimalEffect.NAME), 400,
|
||||||
Helper.blockIng(ModBlocks.GOLD_POWDER),
|
ing(ModBlocks.GOLD_POWDER),
|
||||||
Helper.blockIng(ModBlocks.GOLD_POWDER),
|
ing(ModBlocks.GOLD_POWDER),
|
||||||
Ingredient.fromItem(ModItems.SKY_INGOT),
|
ing(ModItems.SKY_INGOT),
|
||||||
Ingredient.fromItem(Items.EGG)).register();
|
ing(Items.EGG)).register();
|
||||||
new TreeRitualRecipe(new ResourceLocation(NaturesAura.MOD_ID, "ore_spawn_powder"),
|
new TreeRitualRecipe(new ResourceLocation(NaturesAura.MOD_ID, "ore_spawn_powder"),
|
||||||
Ingredient.fromStacks(new ItemStack(Blocks.SAPLING)),
|
ing(new ItemStack(Blocks.SAPLING)),
|
||||||
ItemEffectPowder.setEffect(new ItemStack(ModItems.EFFECT_POWDER, 4), OreSpawnEffect.NAME), 400,
|
ItemEffectPowder.setEffect(new ItemStack(ModItems.EFFECT_POWDER, 4), OreSpawnEffect.NAME), 400,
|
||||||
Helper.blockIng(ModBlocks.GOLD_POWDER),
|
ing(ModBlocks.GOLD_POWDER),
|
||||||
Helper.blockIng(ModBlocks.GOLD_POWDER),
|
ing(ModBlocks.GOLD_POWDER),
|
||||||
Helper.blockIng(Blocks.DIAMOND_ORE),
|
ing(Blocks.DIAMOND_ORE),
|
||||||
Helper.blockIng(Blocks.REDSTONE_ORE)).register();
|
ing(Blocks.REDSTONE_ORE)).register();
|
||||||
new TreeRitualRecipe(new ResourceLocation(NaturesAura.MOD_ID, "token_joy"),
|
new TreeRitualRecipe(new ResourceLocation(NaturesAura.MOD_ID, "token_joy"),
|
||||||
Helper.blockIng(Blocks.SAPLING), new ItemStack(ModItems.TOKEN_JOY, 2), 200,
|
ing(Blocks.SAPLING), new ItemStack(ModItems.TOKEN_JOY, 2), 200,
|
||||||
new NBTIngredient(ItemAuraBottle.setType(new ItemStack(ModItems.AURA_BOTTLE), NaturesAuraAPI.TYPE_OVERWORLD)),
|
nbtIng(ItemAuraBottle.setType(new ItemStack(ModItems.AURA_BOTTLE), NaturesAuraAPI.TYPE_OVERWORLD)),
|
||||||
Ingredient.fromItem(ModItems.GOLD_LEAF),
|
ing(ModItems.GOLD_LEAF),
|
||||||
Ingredient.fromStacks(new ItemStack(Blocks.RED_FLOWER, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(Blocks.YELLOW_FLOWER)),
|
ing(new ItemStack(Blocks.RED_FLOWER, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(Blocks.YELLOW_FLOWER)),
|
||||||
Ingredient.fromItem(Items.APPLE),
|
ing(Items.APPLE),
|
||||||
Helper.blockIng(Blocks.TORCH),
|
ing(Blocks.TORCH),
|
||||||
Ingredient.fromItem(Items.IRON_INGOT)).register();
|
ing(Items.IRON_INGOT)).register();
|
||||||
new TreeRitualRecipe(new ResourceLocation(NaturesAura.MOD_ID, "token_anger"),
|
new TreeRitualRecipe(new ResourceLocation(NaturesAura.MOD_ID, "token_anger"),
|
||||||
Helper.blockIng(Blocks.SAPLING), new ItemStack(ModItems.TOKEN_ANGER, 2), 200,
|
ing(Blocks.SAPLING), new ItemStack(ModItems.TOKEN_ANGER, 2), 200,
|
||||||
new NBTIngredient(ItemAuraBottle.setType(new ItemStack(ModItems.AURA_BOTTLE), NaturesAuraAPI.TYPE_NETHER)),
|
nbtIng(ItemAuraBottle.setType(new ItemStack(ModItems.AURA_BOTTLE), NaturesAuraAPI.TYPE_NETHER)),
|
||||||
Ingredient.fromItem(ModItems.GOLD_LEAF),
|
ing(ModItems.GOLD_LEAF),
|
||||||
Helper.blockIng(Blocks.MAGMA),
|
ing(Blocks.MAGMA),
|
||||||
Ingredient.fromItem(Items.BLAZE_POWDER),
|
ing(Items.BLAZE_POWDER),
|
||||||
Ingredient.fromItem(Items.GUNPOWDER),
|
ing(Items.GUNPOWDER),
|
||||||
Ingredient.fromItem(Items.ENDER_PEARL)).register();
|
ing(Items.ENDER_PEARL)).register();
|
||||||
new TreeRitualRecipe(new ResourceLocation(NaturesAura.MOD_ID, "token_sorrow"),
|
new TreeRitualRecipe(new ResourceLocation(NaturesAura.MOD_ID, "token_sorrow"),
|
||||||
Helper.blockIng(Blocks.SAPLING), new ItemStack(ModItems.TOKEN_SORROW, 2), 200,
|
ing(Blocks.SAPLING), new ItemStack(ModItems.TOKEN_SORROW, 2), 200,
|
||||||
new NBTIngredient(ItemAuraBottle.setType(new ItemStack(ModItems.AURA_BOTTLE), NaturesAuraAPI.TYPE_OVERWORLD)),
|
nbtIng(ItemAuraBottle.setType(new ItemStack(ModItems.AURA_BOTTLE), NaturesAuraAPI.TYPE_OVERWORLD)),
|
||||||
Ingredient.fromItem(ModItems.GOLD_LEAF),
|
ing(ModItems.GOLD_LEAF),
|
||||||
Ingredient.fromItem(Items.GHAST_TEAR),
|
ing(Items.GHAST_TEAR),
|
||||||
Ingredient.fromItems(Items.BEEF, Items.MUTTON, Items.CHICKEN, Items.PORKCHOP),
|
ing(Items.BEEF, Items.MUTTON, Items.CHICKEN, Items.PORKCHOP),
|
||||||
Helper.blockIng(Blocks.GLASS),
|
ing(Blocks.GLASS),
|
||||||
Ingredient.fromItem(Items.FISH)).register();
|
ing(new ItemStack(Items.FISH, 1, OreDictionary.WILDCARD_VALUE))).register();
|
||||||
new TreeRitualRecipe(new ResourceLocation(NaturesAura.MOD_ID, "token_fear"),
|
new TreeRitualRecipe(new ResourceLocation(NaturesAura.MOD_ID, "token_fear"),
|
||||||
Helper.blockIng(Blocks.SAPLING), new ItemStack(ModItems.TOKEN_FEAR, 2), 200,
|
ing(Blocks.SAPLING), new ItemStack(ModItems.TOKEN_FEAR, 2), 200,
|
||||||
new NBTIngredient(ItemAuraBottle.setType(new ItemStack(ModItems.AURA_BOTTLE), NaturesAuraAPI.TYPE_NETHER)),
|
nbtIng(ItemAuraBottle.setType(new ItemStack(ModItems.AURA_BOTTLE), NaturesAuraAPI.TYPE_NETHER)),
|
||||||
Ingredient.fromItem(ModItems.GOLD_LEAF),
|
ing(ModItems.GOLD_LEAF),
|
||||||
Ingredient.fromItem(Items.ROTTEN_FLESH),
|
ing(Items.ROTTEN_FLESH),
|
||||||
Ingredient.fromItem(Items.FEATHER),
|
ing(Items.FEATHER),
|
||||||
Ingredient.fromItem(Items.BONE),
|
ing(Items.BONE),
|
||||||
Helper.blockIng(Blocks.SOUL_SAND)).register();
|
ing(Blocks.SOUL_SAND)).register();
|
||||||
|
|
||||||
new AltarRecipe(new ResourceLocation(NaturesAura.MOD_ID, "infused_iron"),
|
new AltarRecipe(new ResourceLocation(NaturesAura.MOD_ID, "infused_iron"),
|
||||||
Ingredient.fromItem(Items.IRON_INGOT), new ItemStack(ModItems.INFUSED_IRON),
|
ing(Items.IRON_INGOT), new ItemStack(ModItems.INFUSED_IRON),
|
||||||
Ingredient.EMPTY, 15000, 80).register();
|
Ingredient.EMPTY, 15000, 80).register();
|
||||||
new AltarRecipe(new ResourceLocation(NaturesAura.MOD_ID, "infused_iron_block"),
|
new AltarRecipe(new ResourceLocation(NaturesAura.MOD_ID, "infused_iron_block"),
|
||||||
Helper.blockIng(Blocks.IRON_BLOCK), new ItemStack(ModBlocks.INFUSED_IRON),
|
ing(Blocks.IRON_BLOCK), new ItemStack(ModBlocks.INFUSED_IRON),
|
||||||
Ingredient.EMPTY, 135000, 700).register();
|
Ingredient.EMPTY, 135000, 700).register();
|
||||||
new AltarRecipe(new ResourceLocation(NaturesAura.MOD_ID, "infused_stone"),
|
new AltarRecipe(new ResourceLocation(NaturesAura.MOD_ID, "infused_stone"),
|
||||||
Helper.blockIng(Blocks.STONE), new ItemStack(ModBlocks.INFUSED_STONE),
|
ing(Blocks.STONE), new ItemStack(ModBlocks.INFUSED_STONE),
|
||||||
Ingredient.EMPTY, 7500, 40).register();
|
Ingredient.EMPTY, 7500, 40).register();
|
||||||
|
|
||||||
Ingredient conversion = Helper.blockIng(ModBlocks.CONVERSION_CATALYST);
|
Ingredient conversion = ing(ModBlocks.CONVERSION_CATALYST);
|
||||||
new AltarRecipe(new ResourceLocation(NaturesAura.MOD_ID, "breath"),
|
new AltarRecipe(new ResourceLocation(NaturesAura.MOD_ID, "breath"),
|
||||||
new NBTIngredient(ItemAuraBottle.setType(new ItemStack(ModItems.AURA_BOTTLE), NaturesAuraAPI.TYPE_END)),
|
nbtIng(ItemAuraBottle.setType(new ItemStack(ModItems.AURA_BOTTLE), NaturesAuraAPI.TYPE_END)),
|
||||||
new ItemStack(Items.DRAGON_BREATH),
|
new ItemStack(Items.DRAGON_BREATH),
|
||||||
conversion, 20000, 80).register();
|
conversion, 20000, 80).register();
|
||||||
new AltarRecipe(new ResourceLocation(NaturesAura.MOD_ID, "leather"),
|
new AltarRecipe(new ResourceLocation(NaturesAura.MOD_ID, "leather"),
|
||||||
Ingredient.fromItem(Items.ROTTEN_FLESH), new ItemStack(Items.LEATHER),
|
ing(Items.ROTTEN_FLESH), new ItemStack(Items.LEATHER),
|
||||||
conversion, 10000, 50).register();
|
conversion, 10000, 50).register();
|
||||||
new AltarRecipe(new ResourceLocation(NaturesAura.MOD_ID, "soul_sand"),
|
new AltarRecipe(new ResourceLocation(NaturesAura.MOD_ID, "soul_sand"),
|
||||||
Helper.blockIng(Blocks.SAND), new ItemStack(Blocks.SOUL_SAND),
|
ing(Blocks.SAND), new ItemStack(Blocks.SOUL_SAND),
|
||||||
conversion, 5000, 100).register();
|
conversion, 5000, 100).register();
|
||||||
new AltarRecipe(new ResourceLocation(NaturesAura.MOD_ID, "nether_wart"),
|
new AltarRecipe(new ResourceLocation(NaturesAura.MOD_ID, "nether_wart"),
|
||||||
Helper.blockIng(Blocks.RED_MUSHROOM), new ItemStack(Items.NETHER_WART),
|
ing(Blocks.RED_MUSHROOM), new ItemStack(Items.NETHER_WART),
|
||||||
conversion, 30000, 250).register();
|
conversion, 30000, 250).register();
|
||||||
new AltarRecipe(new ResourceLocation(NaturesAura.MOD_ID, "prismarine"),
|
new AltarRecipe(new ResourceLocation(NaturesAura.MOD_ID, "prismarine"),
|
||||||
Ingredient.fromItem(Items.QUARTZ), new ItemStack(Items.PRISMARINE_SHARD),
|
ing(Items.QUARTZ), new ItemStack(Items.PRISMARINE_SHARD),
|
||||||
conversion, 55000, 200).register();
|
conversion, 55000, 200).register();
|
||||||
|
|
||||||
Ingredient crushing = Helper.blockIng(ModBlocks.CRUSHING_CATALYST);
|
Ingredient crushing = ing(ModBlocks.CRUSHING_CATALYST);
|
||||||
new AltarRecipe(new ResourceLocation(NaturesAura.MOD_ID, "bone"),
|
new AltarRecipe(new ResourceLocation(NaturesAura.MOD_ID, "bone"),
|
||||||
Ingredient.fromItem(Items.BONE), new ItemStack(Items.DYE, 6, 15),
|
ing(Items.BONE), new ItemStack(Items.DYE, 6, 15),
|
||||||
crushing, 3000, 40).register();
|
crushing, 3000, 40).register();
|
||||||
new AltarRecipe(new ResourceLocation(NaturesAura.MOD_ID, "sugar"),
|
new AltarRecipe(new ResourceLocation(NaturesAura.MOD_ID, "sugar"),
|
||||||
Ingredient.fromItem(Items.REEDS), new ItemStack(Items.SUGAR, 3),
|
ing(Items.REEDS), new ItemStack(Items.SUGAR, 3),
|
||||||
crushing, 3000, 40).register();
|
crushing, 3000, 40).register();
|
||||||
new AltarRecipe(new ResourceLocation(NaturesAura.MOD_ID, "blaze"),
|
new AltarRecipe(new ResourceLocation(NaturesAura.MOD_ID, "blaze"),
|
||||||
Ingredient.fromItem(Items.BLAZE_ROD), new ItemStack(Items.BLAZE_POWDER, 4),
|
ing(Items.BLAZE_ROD), new ItemStack(Items.BLAZE_POWDER, 4),
|
||||||
crushing, 5000, 60).register();
|
crushing, 5000, 60).register();
|
||||||
new AltarRecipe(new ResourceLocation(NaturesAura.MOD_ID, "glowstone"),
|
new AltarRecipe(new ResourceLocation(NaturesAura.MOD_ID, "glowstone"),
|
||||||
Helper.blockIng(Blocks.GLOWSTONE), new ItemStack(Items.GLOWSTONE_DUST, 4),
|
ing(Blocks.GLOWSTONE), new ItemStack(Items.GLOWSTONE_DUST, 4),
|
||||||
crushing, 3000, 40).register();
|
crushing, 3000, 40).register();
|
||||||
new AltarRecipe(new ResourceLocation(NaturesAura.MOD_ID, "sand"),
|
new AltarRecipe(new ResourceLocation(NaturesAura.MOD_ID, "sand"),
|
||||||
Helper.blockIng(Blocks.COBBLESTONE), new ItemStack(Blocks.SAND),
|
ing(Blocks.COBBLESTONE), new ItemStack(Blocks.SAND),
|
||||||
crushing, 3000, 40).register();
|
crushing, 3000, 40).register();
|
||||||
|
|
||||||
new OfferingRecipe(new ResourceLocation(NaturesAura.MOD_ID, "sky_ingot"),
|
new OfferingRecipe(new ResourceLocation(NaturesAura.MOD_ID, "sky_ingot"),
|
||||||
new AmountIngredient(new ItemStack(ModItems.INFUSED_IRON, 3)),
|
amountIng(new ItemStack(ModItems.INFUSED_IRON, 3)),
|
||||||
Ingredient.fromItem(ModItems.CALLING_SPIRIT),
|
ing(ModItems.CALLING_SPIRIT),
|
||||||
new ItemStack(ModItems.SKY_INGOT)).register();
|
new ItemStack(ModItems.SKY_INGOT)).register();
|
||||||
new OfferingRecipe(new ResourceLocation(NaturesAura.MOD_ID, "clock_hand"),
|
new OfferingRecipe(new ResourceLocation(NaturesAura.MOD_ID, "clock_hand"),
|
||||||
Ingredient.fromItem(Items.NETHER_STAR),
|
ing(Items.NETHER_STAR),
|
||||||
Ingredient.fromItem(ModItems.CALLING_SPIRIT),
|
ing(ModItems.CALLING_SPIRIT),
|
||||||
new ItemStack(ModItems.CLOCK_HAND)).register();
|
new ItemStack(ModItems.CLOCK_HAND)).register();
|
||||||
new OfferingRecipe(new ResourceLocation(NaturesAura.MOD_ID, "token_euphoria"),
|
new OfferingRecipe(new ResourceLocation(NaturesAura.MOD_ID, "token_euphoria"),
|
||||||
Ingredient.fromItem(ModItems.TOKEN_JOY),
|
ing(ModItems.TOKEN_JOY),
|
||||||
Ingredient.fromItem(ModItems.CALLING_SPIRIT),
|
ing(ModItems.CALLING_SPIRIT),
|
||||||
new ItemStack(ModItems.TOKEN_EUPHORIA)).register();
|
new ItemStack(ModItems.TOKEN_EUPHORIA)).register();
|
||||||
new OfferingRecipe(new ResourceLocation(NaturesAura.MOD_ID, "token_rage"),
|
new OfferingRecipe(new ResourceLocation(NaturesAura.MOD_ID, "token_rage"),
|
||||||
Ingredient.fromItem(ModItems.TOKEN_ANGER),
|
ing(ModItems.TOKEN_ANGER),
|
||||||
Ingredient.fromItem(ModItems.CALLING_SPIRIT),
|
ing(ModItems.CALLING_SPIRIT),
|
||||||
new ItemStack(ModItems.TOKEN_RAGE)).register();
|
new ItemStack(ModItems.TOKEN_RAGE)).register();
|
||||||
new OfferingRecipe(new ResourceLocation(NaturesAura.MOD_ID, "token_grief"),
|
new OfferingRecipe(new ResourceLocation(NaturesAura.MOD_ID, "token_grief"),
|
||||||
Ingredient.fromItem(ModItems.TOKEN_SORROW),
|
ing(ModItems.TOKEN_SORROW),
|
||||||
Ingredient.fromItem(ModItems.CALLING_SPIRIT),
|
ing(ModItems.CALLING_SPIRIT),
|
||||||
new ItemStack(ModItems.TOKEN_GRIEF)).register();
|
new ItemStack(ModItems.TOKEN_GRIEF)).register();
|
||||||
new OfferingRecipe(new ResourceLocation(NaturesAura.MOD_ID, "token_terror"),
|
new OfferingRecipe(new ResourceLocation(NaturesAura.MOD_ID, "token_terror"),
|
||||||
Ingredient.fromItem(ModItems.TOKEN_FEAR),
|
ing(ModItems.TOKEN_FEAR),
|
||||||
Ingredient.fromItem(ModItems.CALLING_SPIRIT),
|
ing(ModItems.CALLING_SPIRIT),
|
||||||
new ItemStack(ModItems.TOKEN_TERROR)).register();
|
new ItemStack(ModItems.TOKEN_TERROR)).register();
|
||||||
|
|
||||||
NaturesAuraAPI.BOTANIST_PICKAXE_CONVERSIONS.put(
|
NaturesAuraAPI.BOTANIST_PICKAXE_CONVERSIONS.put(
|
||||||
|
@ -233,11 +235,11 @@ public final class ModRecipes {
|
||||||
if (block instanceof BlockFlower)
|
if (block instanceof BlockFlower)
|
||||||
NaturesAuraAPI.FLOWERS.addAll(block.getBlockState().getValidStates());
|
NaturesAuraAPI.FLOWERS.addAll(block.getBlockState().getValidStates());
|
||||||
|
|
||||||
spawner("cow", "minecraft:cow", 50000, 60, Ingredient.fromItem(Items.BEEF), Ingredient.fromItem(Items.LEATHER));
|
spawner("cow", "minecraft:cow", 50000, 60, ing(Items.BEEF), ing(Items.LEATHER));
|
||||||
for (EnumDyeColor color : EnumDyeColor.values())
|
for (EnumDyeColor color : EnumDyeColor.values())
|
||||||
new AnimalSpawnerRecipe(new ResourceLocation(NaturesAura.MOD_ID, "sheep_" + color.getName()), new ResourceLocation("minecraft:sheep"),
|
new AnimalSpawnerRecipe(new ResourceLocation(NaturesAura.MOD_ID, "sheep_" + color.getName()), new ResourceLocation("minecraft:sheep"),
|
||||||
500, 60, Ingredient.fromItem(ModItems.BIRTH_SPIRIT), Ingredient.fromItem(Items.MUTTON),
|
500, 60, ing(ModItems.BIRTH_SPIRIT), ing(Items.MUTTON),
|
||||||
Ingredient.fromStacks(new ItemStack(Blocks.WOOL, 1, color.getMetadata()))) {
|
ing(new ItemStack(Blocks.WOOL, 1, color.getMetadata()))) {
|
||||||
@Override
|
@Override
|
||||||
public Entity makeEntity(World world, double x, double y, double z) {
|
public Entity makeEntity(World world, double x, double y, double z) {
|
||||||
EntitySheep sheep = (EntitySheep) super.makeEntity(world, x, y, z);
|
EntitySheep sheep = (EntitySheep) super.makeEntity(world, x, y, z);
|
||||||
|
@ -245,39 +247,39 @@ public final class ModRecipes {
|
||||||
return sheep;
|
return sheep;
|
||||||
}
|
}
|
||||||
}.register();
|
}.register();
|
||||||
spawner("chicken", "minecraft:chicken", 30000, 40, Ingredient.fromItem(Items.FEATHER), Ingredient.fromItem(Items.EGG));
|
spawner("chicken", "minecraft:chicken", 30000, 40, ing(Items.FEATHER), ing(Items.EGG));
|
||||||
spawner("pig", "minecraft:pig", 50000, 60, Ingredient.fromItem(Items.PORKCHOP));
|
spawner("pig", "minecraft:pig", 50000, 60, ing(Items.PORKCHOP));
|
||||||
spawner("blaze", "minecraft:blaze", 150000, 120, Ingredient.fromItem(Items.BLAZE_ROD), Ingredient.fromItem(Items.BLAZE_POWDER));
|
spawner("blaze", "minecraft:blaze", 150000, 120, ing(Items.BLAZE_ROD), ing(Items.BLAZE_POWDER));
|
||||||
spawner("ghast", "minecraft:ghast", 120000, 150, Ingredient.fromItem(Items.GUNPOWDER), Ingredient.fromItem(Items.GHAST_TEAR));
|
spawner("ghast", "minecraft:ghast", 120000, 150, ing(Items.GUNPOWDER), ing(Items.GHAST_TEAR));
|
||||||
spawner("ocelot", "minecraft:ocelot", 80000, 60, Ingredient.fromItem(Items.FISH), Helper.blockIng(Blocks.WOOL));
|
spawner("ocelot", "minecraft:ocelot", 80000, 60, ing(Items.FISH), ing(Blocks.WOOL));
|
||||||
spawner("mule", "minecraft:mule", 100000, 100, Ingredient.fromItem(Items.LEATHER), Helper.blockIng(Blocks.CHEST), Ingredient.fromItem(Items.APPLE));
|
spawner("mule", "minecraft:mule", 100000, 100, ing(Items.LEATHER), ing(Blocks.CHEST), ing(Items.APPLE));
|
||||||
spawner("bat", "minecraft:bat", 30000, 40, Ingredient.fromItem(Items.FEATHER));
|
spawner("bat", "minecraft:bat", 30000, 40, ing(Items.FEATHER));
|
||||||
spawner("endermite", "minecraft:endermite", 30000, 40, Ingredient.fromItem(Items.ENDER_PEARL), Helper.blockIng(Blocks.STONE));
|
spawner("endermite", "minecraft:endermite", 30000, 40, ing(Items.ENDER_PEARL), ing(Blocks.STONE));
|
||||||
spawner("parrot", "minecraft:parrot", 50000, 60, Ingredient.fromItem(Items.FEATHER), Ingredient.fromItem(Items.COOKIE));
|
spawner("parrot", "minecraft:parrot", 50000, 60, ing(Items.FEATHER), ing(Items.COOKIE));
|
||||||
spawner("slime", "minecraft:slime", 30000, 40, Ingredient.fromItem(Items.SLIME_BALL));
|
spawner("slime", "minecraft:slime", 30000, 40, ing(Items.SLIME_BALL));
|
||||||
spawner("spider", "minecraft:spider", 100000, 120, Ingredient.fromItem(Items.STRING), Ingredient.fromItem(Items.SPIDER_EYE));
|
spawner("spider", "minecraft:spider", 100000, 120, ing(Items.STRING), ing(Items.SPIDER_EYE));
|
||||||
spawner("skeleton", "minecraft:skeleton", 100000, 120, Ingredient.fromItem(Items.BONE), Ingredient.fromItem(Items.ARROW));
|
spawner("skeleton", "minecraft:skeleton", 100000, 120, ing(Items.BONE), ing(Items.ARROW));
|
||||||
spawner("enderman", "minecraft:enderman", 120000, 120, Ingredient.fromItem(Items.ENDER_PEARL));
|
spawner("enderman", "minecraft:enderman", 120000, 120, ing(Items.ENDER_PEARL));
|
||||||
spawner("silverfish", "minecraft:silverfish", 30000, 40, Helper.blockIng(Blocks.STONE));
|
spawner("silverfish", "minecraft:silverfish", 30000, 40, ing(Blocks.STONE));
|
||||||
spawner("squid", "minecraft:squid", 50000, 40, Ingredient.fromStacks(new ItemStack(Items.DYE, 1, EnumDyeColor.BLACK.getDyeDamage())));
|
spawner("squid", "minecraft:squid", 50000, 40, ing(new ItemStack(Items.DYE, 1, EnumDyeColor.BLACK.getDyeDamage())));
|
||||||
spawner("stray", "minecraft:stray", 100000, 120, Ingredient.fromItem(Items.BONE), Helper.blockIng(Blocks.ICE));
|
spawner("stray", "minecraft:stray", 100000, 120, ing(Items.BONE), ing(Blocks.ICE));
|
||||||
spawner("shulker", "minecraft:shulker", 150000, 100, Ingredient.fromItem(Items.SHULKER_SHELL));
|
spawner("shulker", "minecraft:shulker", 150000, 100, ing(Items.SHULKER_SHELL));
|
||||||
spawner("husk", "minecraft:husk", 100000, 120, Ingredient.fromItem(Items.ROTTEN_FLESH), Helper.blockIng(Blocks.SAND));
|
spawner("husk", "minecraft:husk", 100000, 120, ing(Items.ROTTEN_FLESH), ing(Blocks.SAND));
|
||||||
spawner("llama", "minecraft:llama", 60000, 80, Ingredient.fromStacks(new ItemStack(Blocks.WOOL, 1, OreDictionary.WILDCARD_VALUE)));
|
spawner("llama", "minecraft:llama", 60000, 80, ing(new ItemStack(Blocks.WOOL, 1, OreDictionary.WILDCARD_VALUE)));
|
||||||
spawner("rabbit", "minecraft:rabbit", 30000, 40, Ingredient.fromItem(Items.RABBIT_HIDE));
|
spawner("rabbit", "minecraft:rabbit", 30000, 40, ing(Items.RABBIT_HIDE));
|
||||||
spawner("magma_cube", "minecraft:magma_cube", 100000, 100, Ingredient.fromItem(Items.MAGMA_CREAM));
|
spawner("magma_cube", "minecraft:magma_cube", 100000, 100, ing(Items.MAGMA_CREAM));
|
||||||
spawner("zombie_pigman", "minecraft:zombie_pigman", 120000, 150, Ingredient.fromItem(Items.ROTTEN_FLESH), Ingredient.fromItem(Items.GOLD_NUGGET));
|
spawner("zombie_pigman", "minecraft:zombie_pigman", 120000, 150, ing(Items.ROTTEN_FLESH), ing(Items.GOLD_NUGGET));
|
||||||
spawner("polar_bear", "minecraft:polar_bear", 50000, 60, Ingredient.fromItem(Items.FISH), Helper.blockIng(Blocks.ICE));
|
spawner("polar_bear", "minecraft:polar_bear", 50000, 60, ing(Items.FISH), ing(Blocks.ICE));
|
||||||
spawner("mooshroom", "minecraft:mooshroom", 40000, 60, Ingredient.fromItem(Items.LEATHER), Helper.blockIng(Blocks.RED_MUSHROOM));
|
spawner("mooshroom", "minecraft:mooshroom", 40000, 60, ing(Items.LEATHER), ing(Blocks.RED_MUSHROOM));
|
||||||
spawner("guardian", "minecraft:guardian", 150000, 150, Ingredient.fromItem(Items.PRISMARINE_SHARD), Ingredient.fromItem(Items.PRISMARINE_CRYSTALS));
|
spawner("guardian", "minecraft:guardian", 150000, 150, ing(Items.PRISMARINE_SHARD), ing(Items.PRISMARINE_CRYSTALS));
|
||||||
spawner("horse", "minecraft:horse", 100000, 100, Ingredient.fromItem(Items.LEATHER));
|
spawner("horse", "minecraft:horse", 100000, 100, ing(Items.LEATHER));
|
||||||
spawner("donkey", "minecraft:donkey", 100000, 100, Ingredient.fromItem(Items.LEATHER), Helper.blockIng(Blocks.CHEST));
|
spawner("donkey", "minecraft:donkey", 100000, 100, ing(Items.LEATHER), ing(Blocks.CHEST));
|
||||||
spawner("cave_spider", "minecraft:cave_spider", 100000, 120, Ingredient.fromItem(Items.STRING), Ingredient.fromItem(Items.FERMENTED_SPIDER_EYE));
|
spawner("cave_spider", "minecraft:cave_spider", 100000, 120, ing(Items.STRING), ing(Items.FERMENTED_SPIDER_EYE));
|
||||||
spawner("creeper", "minecraft:creeper", 100000, 120, Ingredient.fromItem(Items.GUNPOWDER));
|
spawner("creeper", "minecraft:creeper", 100000, 120, ing(Items.GUNPOWDER));
|
||||||
spawner("witch", "minecraft:witch", 150000, 150, Ingredient.fromItem(Items.GLASS_BOTTLE), Ingredient.fromItem(Items.GLOWSTONE_DUST));
|
spawner("witch", "minecraft:witch", 150000, 150, ing(Items.GLASS_BOTTLE), ing(Items.GLOWSTONE_DUST));
|
||||||
spawner("wither_skeleton", "minecraft:wither_skeleton", 150000, 150, Ingredient.fromItem(Items.BONE), Helper.blockIng(Blocks.OBSIDIAN));
|
spawner("wither_skeleton", "minecraft:wither_skeleton", 150000, 150, ing(Items.BONE), ing(Blocks.OBSIDIAN));
|
||||||
spawner("wolf", "minecraft:wolf", 50000, 60, Ingredient.fromItem(Items.LEATHER), Ingredient.fromItem(Items.BONE));
|
spawner("wolf", "minecraft:wolf", 50000, 60, ing(Items.LEATHER), ing(Items.BONE));
|
||||||
spawner("zombie", "minecraft:zombie", 100000, 100, Ingredient.fromItem(Items.ROTTEN_FLESH));
|
spawner("zombie", "minecraft:zombie", 100000, 100, ing(Items.ROTTEN_FLESH));
|
||||||
|
|
||||||
NaturesAuraAPI.OVERWORLD_ORES.add(new WeightedOre("oreCoal", 5000));
|
NaturesAuraAPI.OVERWORLD_ORES.add(new WeightedOre("oreCoal", 5000));
|
||||||
NaturesAuraAPI.NETHER_ORES.add(new WeightedOre("oreNetherCoal", 5000));
|
NaturesAuraAPI.NETHER_ORES.add(new WeightedOre("oreNetherCoal", 5000));
|
||||||
|
@ -342,8 +344,28 @@ public final class ModRecipes {
|
||||||
|
|
||||||
private static void spawner(String name, String entity, int aura, int time, Ingredient... ings) {
|
private static void spawner(String name, String entity, int aura, int time, Ingredient... ings) {
|
||||||
Ingredient[] actualIngs = new Ingredient[ings.length + 1];
|
Ingredient[] actualIngs = new Ingredient[ings.length + 1];
|
||||||
actualIngs[0] = Ingredient.fromItem(ModItems.BIRTH_SPIRIT);
|
actualIngs[0] = ing(ModItems.BIRTH_SPIRIT);
|
||||||
System.arraycopy(ings, 0, actualIngs, 1, ings.length);
|
System.arraycopy(ings, 0, actualIngs, 1, ings.length);
|
||||||
new AnimalSpawnerRecipe(new ResourceLocation(NaturesAura.MOD_ID, name), new ResourceLocation(entity), aura, time, actualIngs).register();
|
new AnimalSpawnerRecipe(new ResourceLocation(NaturesAura.MOD_ID, name), new ResourceLocation(entity), aura, time, actualIngs).register();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static Ingredient nbtIng(ItemStack stack) {
|
||||||
|
return new NBTIngredient(stack);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static Ingredient amountIng(ItemStack stack) {
|
||||||
|
return new AmountIngredient(stack);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue