Move mana infusion recipes to imc

This commit is contained in:
Vincent Lee committed 2019-04-22 20:01:06 -05:00
1 parent 48b52a9a86
commit 15c35ee8da
13 files changed
+177 -220

No files matched your search

@@ -82,7 +82,7 @@ public final class BotaniaAPI {
public static final List<RecipePetals> petalRecipes = new ArrayList<>();
public static final List<RecipePureDaisy> pureDaisyRecipes = new ArrayList<>();
public static final List<RecipeManaInfusion> manaInfusionRecipes = new ArrayList<>();
public static Map<ResourceLocation, RecipeManaInfusion> manaInfusionRecipes = Collections.emptyMap();
public static final List<RecipeRuneAltar> runeAltarRecipes = new ArrayList<>();
public static final List<RecipeElvenTrade> elvenTradeRecipes = new ArrayList<>();
public static final List<RecipeBrew> brewRecipes = new ArrayList<>();
@@ -90,10 +90,10 @@ public final class BotaniaAPI {
public static final ResourceLocation DUMMY_SUBTILE_NAME = new ResourceLocation("botania", "dummy");
public static volatile Map<ResourceLocation, Integer> oreWeights = Collections.emptyMap();
public static volatile Map<ResourceLocation, Integer> oreWeightsNether = Collections.emptyMap();
public static Map<ResourceLocation, Integer> oreWeights = Collections.emptyMap();
public static Map<ResourceLocation, Integer> oreWeightsNether = Collections.emptyMap();
public static volatile Map<IRegistryDelegate<Block>, Function<EnumDyeColor, Block>> paintableBlocks = Collections.emptyMap();
public static Map<IRegistryDelegate<Block>, Function<EnumDyeColor, Block>> paintableBlocks = Collections.emptyMap();
public static final Set<Class<? extends Entity>> gravityRodBlacklist = new LinkedHashSet<>();
private static final int[] MAX_DAMAGE_ARRAY = new int[]{13, 15, 16, 11};
@@ -493,32 +493,7 @@ public final class BotaniaAPI {
* @return The recipe created.
*/
public static RecipeManaInfusion registerManaInfusionRecipe(ItemStack output, Ingredient input, int mana) {
Preconditions.checkArgument(mana <= 1000000);
RecipeManaInfusion recipe = new RecipeManaInfusion(output, input, mana);
manaInfusionRecipes.add(recipe);
return recipe;
}
/**
* Register a Mana Infusion Recipe and flags it as an Alchemy recipe (requires an
* Alchemy Catalyst below the pool).
* @see BotaniaAPI#registerManaInfusionRecipe
*/
public static RecipeManaInfusion registerManaAlchemyRecipe(ItemStack output, Ingredient input, int mana) {
RecipeManaInfusion recipe = registerManaInfusionRecipe(output, input, mana);
recipe.setCatalyst(RecipeManaInfusion.alchemy.getDefaultState());
return recipe;
}
/**
* Register a Mana Infusion Recipe and flags it as an Conjuration recipe (requires a
* Conjuration Catalyst below the pool).
* @see BotaniaAPI#registerManaInfusionRecipe
*/
public static RecipeManaInfusion registerManaConjurationRecipe(ItemStack output, Ingredient input, int mana) {
RecipeManaInfusion recipe = registerManaInfusionRecipe(output, input, mana);
recipe.setCatalyst(RecipeManaInfusion.conjuration.getDefaultState());
return recipe;
return new RecipeManaInfusion(new ResourceLocation("put", "idhere"), output, input, mana);
}
/**
@@ -555,19 +530,6 @@ public final class BotaniaAPI {
return recipe;
}
/**
* Register a SubTileEntity and makes it a mini flower. Also adds the recipe and returns it.
*/
public static RecipeManaInfusion registerMiniSubTile(ResourceLocation id, Class<? extends SubTileEntity> subtileClass, ResourceLocation original) {
/* todo 1.13
RecipeMiniFlower recipe = new RecipeMiniFlower(id, original, 2500);
manaInfusionRecipes.add(recipe);
miniFlowerRecipes.add(recipe);
return recipe;
*/
return null;
}
/**
* Adds a category to the list of registered categories to appear in the Lexicon.
*/
@@ -42,4 +42,10 @@ public class IMC {
* The argument should be a {@link PaintableBlockMessage}, any other types are ignored.
*/
public static final String REGISTER_PAINTABLE_BLOCK = "register_paintable_block";
/**
* Registers a mana infusion recipe at the mana pool.<br />
* The argument should be a {@link vazkii.botania.api.recipe.RecipeManaInfusion}, any other types are ignored.
*/
public static final String REGISTER_MANA_INFUSION = "register_mana_infusion";
}
@@ -12,6 +12,10 @@ public class PaintableBlockMessage {
private final IRegistryDelegate<Block> block;
private final Function<EnumDyeColor, Block> transformer;
/**
* @param transformer Lookup function from color to destination block
* @param block The block being converted
*/
public PaintableBlockMessage(Function<EnumDyeColor, Block> transformer, Block block) {
this.block = block.delegate;
this.transformer = transformer;
@@ -10,10 +10,12 @@
*/
package vazkii.botania.api.recipe;
import com.google.common.base.Preconditions;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.Ingredient;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.registries.ObjectHolder;
import javax.annotation.Nullable;
@@ -25,21 +27,42 @@ public class RecipeManaInfusion {
@ObjectHolder("botania:conjuration_catalyst")
public static Block conjuration;
private final ResourceLocation id;
private final ItemStack output;
private final Ingredient input;
private final int mana;
private @Nullable IBlockState catalystState;
@Nullable
private IBlockState catalystState;
public RecipeManaInfusion(ItemStack output, Ingredient input, int mana) {
public static RecipeManaInfusion conjuration(ResourceLocation id, ItemStack output, Ingredient input, int mana) {
RecipeManaInfusion ret = new RecipeManaInfusion(id, output, input, mana);
ret.setCatalyst(conjuration.getDefaultState());
return ret;
}
public static RecipeManaInfusion alchemy(ResourceLocation id, ItemStack output, Ingredient input, int mana) {
RecipeManaInfusion ret = new RecipeManaInfusion(id, output, input, mana);
ret.setCatalyst(alchemy.getDefaultState());
return ret;
}
public RecipeManaInfusion(ResourceLocation id, ItemStack output, Ingredient input, int mana) {
this.id = id;
this.output = output;
this.input = input;
this.mana = mana;
Preconditions.checkArgument(mana < 100000);
}
public final ResourceLocation getId() {
return id;
}
public boolean matches(ItemStack stack) {
return input.test(stack);
}
@Nullable
public IBlockState getCatalyst() {
return catalystState;
}
@@ -19,7 +19,7 @@ import vazkii.botania.api.subtile.SubTileType;
public class RecipeMiniFlower extends RecipeManaInfusion {
public RecipeMiniFlower(SubTileType mini, SubTileType flower, int mana) {
super(BotaniaAPI.internalHandler.getSubTileAsStack(flower), Ingredient.fromStacks(BotaniaAPI.internalHandler.getSubTileAsStack(mini)), mana);
super(mini.getRegistryName(), BotaniaAPI.internalHandler.getSubTileAsStack(mini), Ingredient.fromStacks(BotaniaAPI.internalHandler.getSubTileAsStack(flower)), mana);
setCatalyst(RecipeManaInfusion.alchemy.getDefaultState());
}
@@ -153,8 +153,6 @@ public class Botania {
ModPetalRecipes.init();
ModPureDaisyRecipes.init();
ModRuneRecipes.init();
ModManaAlchemyRecipes.init();
ModManaConjurationRecipes.init();
ModManaInfusionRecipes.init();
ModElvenTradeRecipes.init();
ModBrewRecipes.init();
@@ -903,63 +903,7 @@ public final class ModBlocks {
r.register(TileEntityType.Builder.create(TileAnimatedTorch::new).build(null).setRegistryName(LibMisc.MOD_ID, LibBlockNames.ANIMATED_TORCH));
}
@SubscribeEvent
public static void initSubtiles(RegistryEvent.Register<SubTileType> evt) {
IForgeRegistry<SubTileType> r = evt.getRegistry();
r.register(new SubTileType(SubTileType.MISC_TYPE, DummySubTile::new).setRegistryName(BotaniaAPI.DUMMY_SUBTILE_NAME));
r.register(new SubTileType(SubTileType.MISC_TYPE, SubTilePureDaisy::new).setRegistryName(LibBlockNames.SUBTILE_PUREDAISY));
r.register(new SubTileType(SubTileType.MISC_TYPE, SubTileManastar::new).setRegistryName(LibBlockNames.SUBTILE_MANASTAR));
r.register(new SubTileType(SubTileType.GENERATING_TYPE, SubTileHydroangeas::new).setRegistryName(LibBlockNames.SUBTILE_HYDROANGEAS));
r.register(new SubTileType(SubTileType.GENERATING_TYPE, SubTileEndoflame::new).setRegistryName(LibBlockNames.SUBTILE_ENDOFLAME));
r.register(new SubTileType(SubTileType.GENERATING_TYPE, SubTileThermalily::new).setRegistryName(LibBlockNames.SUBTILE_THERMALILY));
r.register(new SubTileType(SubTileType.GENERATING_TYPE, SubTileArcaneRose::new).setRegistryName(LibBlockNames.SUBTILE_ARCANE_ROSE));
r.register(new SubTileType(SubTileType.GENERATING_TYPE, SubTileMunchdew::new).setRegistryName(LibBlockNames.SUBTILE_MUNCHDEW));
r.register(new SubTileType(SubTileType.GENERATING_TYPE, SubTileEntropinnyum::new).setRegistryName(LibBlockNames.SUBTILE_ENTROPINNYUM));
r.register(new SubTileType(SubTileType.GENERATING_TYPE, SubTileKekimurus::new).setRegistryName(LibBlockNames.SUBTILE_KEKIMURUS));
r.register(new SubTileType(SubTileType.GENERATING_TYPE, SubTileGourmaryllis::new).setRegistryName(LibBlockNames.SUBTILE_GOURMARYLLIS));
r.register(new SubTileType(SubTileType.GENERATING_TYPE, SubTileNarslimmus::new).setRegistryName(LibBlockNames.SUBTILE_NARSLIMMUS));
r.register(new SubTileType(SubTileType.GENERATING_TYPE, SubTileSpectrolus::new).setRegistryName(LibBlockNames.SUBTILE_SPECTROLUS));
r.register(new SubTileType(SubTileType.GENERATING_TYPE, SubTileDandelifeon::new).setRegistryName(LibBlockNames.SUBTILE_DANDELIFEON));
r.register(new SubTileType(SubTileType.GENERATING_TYPE, SubTileRafflowsia::new).setRegistryName(LibBlockNames.SUBTILE_RAFFLOWSIA));
r.register(new SubTileType(SubTileType.GENERATING_TYPE, SubTileShulkMeNot::new).setRegistryName(LibBlockNames.SUBTILE_SHULK_ME_NOT));
// todo 1.13 register recipes for chibis: BotaniaAPI.registerMiniSubTile(new ResourceLocation(key.getNamespace(), key.getPath() + "_chibi"), innerClazz, key);
r.register(new SubTileType(SubTileType.FUNCTIONAL_TYPE, SubTileBellethorn::new).setRegistryName(LibBlockNames.SUBTILE_BELLETHORN));
r.register(new SubTileType(SubTileType.FUNCTIONAL_TYPE, SubTileBellethorn.Mini::new).setRegistryName(LibMisc.MOD_ID, LibBlockNames.SUBTILE_BELLETHORN.getPath() + "_chibi"));
r.register(new SubTileType(SubTileType.FUNCTIONAL_TYPE, SubTileDreadthorn::new).setRegistryName(LibBlockNames.SUBTILE_DREADTHORN));
r.register(new SubTileType(SubTileType.FUNCTIONAL_TYPE, SubTileHeiseiDream::new).setRegistryName(LibBlockNames.SUBTILE_HEISEI_DREAM));
r.register(new SubTileType(SubTileType.FUNCTIONAL_TYPE, SubTileTigerseye::new).setRegistryName(LibBlockNames.SUBTILE_TIGERSEYE));
r.register(new SubTileType(SubTileType.FUNCTIONAL_TYPE, SubTileJadedAmaranthus::new).setRegistryName(LibBlockNames.SUBTILE_JADED_AMARANTHUS));
r.register(new SubTileType(SubTileType.FUNCTIONAL_TYPE, SubTileOrechid::new).setRegistryName(LibBlockNames.SUBTILE_ORECHID));
r.register(new SubTileType(SubTileType.FUNCTIONAL_TYPE, SubTileOrechidIgnem::new).setRegistryName(LibBlockNames.SUBTILE_ORECHID_IGNEM));
r.register(new SubTileType(SubTileType.FUNCTIONAL_TYPE, SubTileFallenKanade::new).setRegistryName(LibBlockNames.SUBTILE_FALLEN_KANADE));
r.register(new SubTileType(SubTileType.FUNCTIONAL_TYPE, SubTileExoflame::new).setRegistryName(LibBlockNames.SUBTILE_EXOFLAME));
r.register(new SubTileType(SubTileType.FUNCTIONAL_TYPE, SubTileAgricarnation::new).setRegistryName(LibBlockNames.SUBTILE_AGRICARNATION));
r.register(new SubTileType(SubTileType.FUNCTIONAL_TYPE, SubTileAgricarnation.Mini::new).setRegistryName(LibMisc.MOD_ID, LibBlockNames.SUBTILE_AGRICARNATION.getPath() + "_chibi"));
r.register(new SubTileType(SubTileType.FUNCTIONAL_TYPE, SubTileHopperhock::new).setRegistryName(LibBlockNames.SUBTILE_HOPPERHOCK));
r.register(new SubTileType(SubTileType.FUNCTIONAL_TYPE, SubTileHopperhock.Mini::new).setRegistryName(LibMisc.MOD_ID, LibBlockNames.SUBTILE_HOPPERHOCK.getPath() + "_chibi"));
r.register(new SubTileType(SubTileType.FUNCTIONAL_TYPE, SubTileTangleberrie::new).setRegistryName(LibBlockNames.SUBTILE_TANGLEBERRIE));
r.register(new SubTileType(SubTileType.FUNCTIONAL_TYPE, SubTileJiyuulia::new).setRegistryName(LibBlockNames.SUBTILE_JIYUULIA));
r.register(new SubTileType(SubTileType.FUNCTIONAL_TYPE, SubTileRannuncarpus::new).setRegistryName(LibBlockNames.SUBTILE_RANNUNCARPUS));
r.register(new SubTileType(SubTileType.FUNCTIONAL_TYPE, SubTileRannuncarpus.Mini::new).setRegistryName(LibMisc.MOD_ID, LibBlockNames.SUBTILE_RANNUNCARPUS.getPath() + "_chibi"));
r.register(new SubTileType(SubTileType.FUNCTIONAL_TYPE, SubTileHyacidus::new).setRegistryName(LibBlockNames.SUBTILE_HYACIDUS));
r.register(new SubTileType(SubTileType.FUNCTIONAL_TYPE, SubTilePollidisiac::new).setRegistryName(LibBlockNames.SUBTILE_POLLIDISIAC));
r.register(new SubTileType(SubTileType.FUNCTIONAL_TYPE, SubTileClayconia::new).setRegistryName(LibBlockNames.SUBTILE_CLAYCONIA));
r.register(new SubTileType(SubTileType.FUNCTIONAL_TYPE, SubTileClayconia.Mini::new).setRegistryName(LibMisc.MOD_ID, LibBlockNames.SUBTILE_CLAYCONIA.getPath() + "_chibi"));
r.register(new SubTileType(SubTileType.FUNCTIONAL_TYPE, SubTileLoonuim::new).setRegistryName(LibBlockNames.SUBTILE_LOONIUM));
r.register(new SubTileType(SubTileType.FUNCTIONAL_TYPE, SubTileDaffomill::new).setRegistryName(LibBlockNames.SUBTILE_DAFFOMILL));
r.register(new SubTileType(SubTileType.FUNCTIONAL_TYPE, SubTileVinculotus::new).setRegistryName(LibBlockNames.SUBTILE_VINCULOTUS));
r.register(new SubTileType(SubTileType.FUNCTIONAL_TYPE, SubTileSpectranthemum::new).setRegistryName(LibBlockNames.SUBTILE_SPECTRANTHEMUM));
r.register(new SubTileType(SubTileType.FUNCTIONAL_TYPE, SubTileMedumone::new).setRegistryName(LibBlockNames.SUBTILE_MEDUMONE));
r.register(new SubTileType(SubTileType.FUNCTIONAL_TYPE, SubTileMarimorphosis::new).setRegistryName(LibBlockNames.SUBTILE_MARIMORPHOSIS));
r.register(new SubTileType(SubTileType.FUNCTIONAL_TYPE, SubTileMarimorphosis.Mini::new).setRegistryName(LibMisc.MOD_ID, LibBlockNames.SUBTILE_MARIMORPHOSIS.getPath() + "_chibi"));
r.register(new SubTileType(SubTileType.FUNCTIONAL_TYPE, SubTileBubbell::new).setRegistryName(LibBlockNames.SUBTILE_BUBBELL));
r.register(new SubTileType(SubTileType.FUNCTIONAL_TYPE, SubTileBubbell.Mini::new).setRegistryName(LibMisc.MOD_ID, LibBlockNames.SUBTILE_BUBBELL.getPath() + "_chibi"));
r.register(new SubTileType(SubTileType.FUNCTIONAL_TYPE, SubTileSolegnolia::new).setRegistryName(LibBlockNames.SUBTILE_SOLEGNOLIA));
r.register(new SubTileType(SubTileType.FUNCTIONAL_TYPE, SubTileSolegnolia.Mini::new).setRegistryName(LibMisc.MOD_ID, LibBlockNames.SUBTILE_SOLEGNOLIA.getPath() + "_chibi"));
r.register(new SubTileType(SubTileType.FUNCTIONAL_TYPE, SubTileBergamute::new).setRegistryName(LibBlockNames.SUBTILE_BERGAMUTE));
}
public static Block getFlower(EnumDyeColor color) {
switch (color) {
@@ -153,7 +153,7 @@ public class TilePool extends TileMod implements IManaPool, IKeyLocked, ISparkAt
List<RecipeManaInfusion> matchingNonCatRecipes = new ArrayList<>();
List<RecipeManaInfusion> matchingCatRecipes = new ArrayList<>();
for (RecipeManaInfusion recipe : BotaniaAPI.manaInfusionRecipes) {
for (RecipeManaInfusion recipe : BotaniaAPI.manaInfusionRecipes.values()) {
if (recipe.matches(stack)) {
if(recipe.getCatalyst() == null)
matchingNonCatRecipes.add(recipe);
@@ -12,6 +12,7 @@ import vazkii.botania.api.imc.IMC;
import vazkii.botania.api.imc.ModWikiMessage;
import vazkii.botania.api.imc.OreWeightMessage;
import vazkii.botania.api.imc.PaintableBlockMessage;
import vazkii.botania.api.recipe.RecipeManaInfusion;
import vazkii.botania.api.wiki.IWikiProvider;
import vazkii.botania.api.wiki.WikiHooks;
@@ -26,6 +27,7 @@ public final class IMCHandler {
BotaniaAPI.oreWeightsNether = handleOreWeights(evt.getIMCStream(IMC.REGISTER_NETHER_ORE_WEIGHT::equals));
WikiHooks.modWikis = handleWikis(evt.getIMCStream(IMC.REGISTER_MOD_WIKI::equals));
BotaniaAPI.paintableBlocks = handlePaintable(evt.getIMCStream(IMC.REGISTER_PAINTABLE_BLOCK::equals));
BotaniaAPI.manaInfusionRecipes = handleManaInfusion(evt.getIMCStream(IMC.REGISTER_MANA_INFUSION::equals));
}
private static Map<String, IWikiProvider> handleWikis(Stream<InterModComms.IMCMessage> msgs) {
@@ -51,4 +53,12 @@ public final class IMCHandler {
.collect(Collectors.toMap(PaintableBlockMessage::getBlock, PaintableBlockMessage::getTransformer));
return ImmutableMap.copyOf(map);
}
private static Map<ResourceLocation, RecipeManaInfusion> handleManaInfusion(Stream<InterModComms.IMCMessage> msgs) {
Map<ResourceLocation, RecipeManaInfusion> map = msgs
.filter(msg -> msg.getMessageSupplier().get() instanceof RecipeManaInfusion)
.map(msg -> (RecipeManaInfusion) msg.getMessageSupplier().get())
.collect(Collectors.toMap(RecipeManaInfusion::getId, r -> r));
return ImmutableMap.copyOf(map);
}
}
@@ -10,6 +10,8 @@ import vazkii.botania.api.imc.ModWikiMessage;
import vazkii.botania.api.imc.PaintableBlockMessage;
import vazkii.botania.api.wiki.IWikiProvider;
import vazkii.botania.api.wiki.SimpleWikiProvider;
import vazkii.botania.common.crafting.ModManaAlchemyRecipes;
import vazkii.botania.common.crafting.ModManaConjurationRecipes;
import vazkii.botania.common.lib.LibMisc;
public class IMCSender {
@@ -129,9 +131,12 @@ public class IMCSender {
Blocks.CYAN_CARPET, Blocks.PURPLE_CARPET, Blocks.BLUE_CARPET, Blocks.BROWN_CARPET, Blocks.GREEN_CARPET, Blocks.RED_CARPET, Blocks.BLACK_CARPET };
for(Block b : carpets)
send(IMC.REGISTER_PAINTABLE_BLOCK, new PaintableBlockMessage(ColorHelper.CARPET_MAP::get, b));
ModManaAlchemyRecipes.send();
ModManaConjurationRecipes.send();
}
private static void send(String method, Object thing) {
public static void send(String method, Object thing) {
InterModComms.sendTo(LibMisc.MOD_ID, method, () -> thing);
}
}
@@ -10,21 +10,26 @@
*/
package vazkii.botania.common.crafting;
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.Ingredient;
import net.minecraft.tags.ItemTags;
import vazkii.botania.api.BotaniaAPI;
import net.minecraft.util.ResourceLocation;
import vazkii.botania.api.imc.IMC;
import vazkii.botania.api.recipe.RecipeManaInfusion;
import vazkii.botania.api.subtile.SubTileType;
import vazkii.botania.common.Botania;
import vazkii.botania.common.block.ModFluffBlocks;
import vazkii.botania.common.block.ModSubtiles;
import vazkii.botania.common.core.handler.IMCSender;
import vazkii.botania.common.item.ModItems;
import vazkii.botania.common.item.block.ItemBlockSpecialFlower;
import vazkii.botania.common.lib.LibMisc;
import java.util.ArrayList;
import java.util.List;
import static vazkii.botania.common.lib.ResourceLocationHelper.prefix;
public final class ModManaAlchemyRecipes {
@@ -58,123 +63,122 @@ public final class ModManaAlchemyRecipes {
// Garden of Glass
public static List<RecipeManaInfusion> prismarineRecipes;
public static void init() {
leatherRecipe = BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Items.LEATHER), Ingredient.fromItems(Items.ROTTEN_FLESH), 600);
public static void send() {
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("rotten_flesh_to_leather"), new ItemStack(Items.LEATHER), Ingredient.fromItems(Items.ROTTEN_FLESH), 600));
woodRecipes = new ArrayList<>();
woodRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Blocks.SPRUCE_LOG), Ingredient.fromItems(Blocks.OAK_LOG), 40));
woodRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Blocks.BIRCH_LOG), Ingredient.fromItems(Blocks.SPRUCE_LOG), 40));
woodRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Blocks.JUNGLE_LOG), Ingredient.fromItems(Blocks.BIRCH_LOG), 40));
woodRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Blocks.ACACIA_LOG), Ingredient.fromItems(Blocks.JUNGLE_LOG), 40));
woodRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Blocks.DARK_OAK_LOG), Ingredient.fromItems(Blocks.ACACIA_LOG), 40));
woodRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Blocks.OAK_LOG), Ingredient.fromItems(Blocks.DARK_OAK_LOG), 40));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("oak_to_spruce_log"), new ItemStack(Blocks.SPRUCE_LOG), Ingredient.fromItems(Blocks.OAK_LOG), 40));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("spruce_to_birch_log"), new ItemStack(Blocks.BIRCH_LOG), Ingredient.fromItems(Blocks.SPRUCE_LOG), 40));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("birch_to_jungle_log"), new ItemStack(Blocks.JUNGLE_LOG), Ingredient.fromItems(Blocks.BIRCH_LOG), 40));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("jungle_to_acacia_log"), new ItemStack(Blocks.ACACIA_LOG), Ingredient.fromItems(Blocks.JUNGLE_LOG), 40));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("acacia_to_dark_oak_log"), new ItemStack(Blocks.DARK_OAK_LOG), Ingredient.fromItems(Blocks.ACACIA_LOG), 40));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("dark_oak_to_oak_log"), new ItemStack(Blocks.OAK_LOG), Ingredient.fromItems(Blocks.DARK_OAK_LOG), 40));
saplingRecipes = new ArrayList<>();
saplingRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Blocks.SPRUCE_SAPLING), Ingredient.fromItems(Blocks.OAK_SAPLING), 120));
saplingRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Blocks.BIRCH_SAPLING), Ingredient.fromItems(Blocks.SPRUCE_SAPLING), 120));
saplingRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Blocks.JUNGLE_SAPLING), Ingredient.fromItems(Blocks.BIRCH_SAPLING), 120));
saplingRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Blocks.ACACIA_SAPLING), Ingredient.fromItems(Blocks.JUNGLE_SAPLING), 120));
saplingRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Blocks.DARK_OAK_SAPLING), Ingredient.fromItems(Blocks.ACACIA_SAPLING), 120));
saplingRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Blocks.OAK_SAPLING), Ingredient.fromItems(Blocks.DARK_OAK_SAPLING), 120));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("oak_to_spruce_sapling"), new ItemStack(Blocks.SPRUCE_SAPLING), Ingredient.fromItems(Blocks.OAK_SAPLING), 120));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("spruce_to_birch_sapling"), new ItemStack(Blocks.BIRCH_SAPLING), Ingredient.fromItems(Blocks.SPRUCE_SAPLING), 120));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("birch_to_jungle_sapling"), new ItemStack(Blocks.JUNGLE_SAPLING), Ingredient.fromItems(Blocks.BIRCH_SAPLING), 120));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("jungle_to_acacia_sapling"), new ItemStack(Blocks.ACACIA_SAPLING), Ingredient.fromItems(Blocks.JUNGLE_SAPLING), 120));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("acacia_to_dark_oak_sapling"), new ItemStack(Blocks.DARK_OAK_SAPLING), Ingredient.fromItems(Blocks.ACACIA_SAPLING), 120));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("dark_oak_to_oak_sapling"), new ItemStack(Blocks.OAK_SAPLING), Ingredient.fromItems(Blocks.DARK_OAK_SAPLING), 120));
glowstoneDustRecipe = BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Items.GLOWSTONE_DUST, 4), Ingredient.fromItems(Blocks.GLOWSTONE), 25);
quartzRecipes = new ArrayList<>();
quartzRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Items.QUARTZ, 4), Ingredient.fromItems(Blocks.QUARTZ_BLOCK), 25));
quartzRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(ModItems.darkQuartz, 4), Ingredient.fromItems(ModFluffBlocks.darkQuartz), 25));
quartzRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(ModItems.manaQuartz, 4), Ingredient.fromItems(ModFluffBlocks.manaQuartz), 25));
quartzRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(ModItems.blazeQuartz, 4), Ingredient.fromItems(ModFluffBlocks.blazeQuartz), 25));
quartzRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(ModItems.lavenderQuartz, 4), Ingredient.fromItems(ModFluffBlocks.lavenderQuartz), 25));
quartzRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(ModItems.redQuartz, 4), Ingredient.fromItems(ModFluffBlocks.redQuartz), 25));
quartzRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(ModItems.elfQuartz, 4), Ingredient.fromItems(ModFluffBlocks.elfQuartz), 25));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("glowstone_deconstruct"), new ItemStack(Items.GLOWSTONE_DUST, 4), Ingredient.fromItems(Blocks.GLOWSTONE), 25));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("quartz_deconstruct"), new ItemStack(Items.QUARTZ, 4), Ingredient.fromItems(Blocks.QUARTZ_BLOCK), 25));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("dark_quartz_deconstruct"), new ItemStack(ModItems.darkQuartz, 4), Ingredient.fromItems(ModFluffBlocks.darkQuartz), 25));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("mana_quartz_deconstruct"), new ItemStack(ModItems.manaQuartz, 4), Ingredient.fromItems(ModFluffBlocks.manaQuartz), 25));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("blaze_quartz_deconstruct"), new ItemStack(ModItems.blazeQuartz, 4), Ingredient.fromItems(ModFluffBlocks.blazeQuartz), 25));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("lavender_quartz_deconstruct"), new ItemStack(ModItems.lavenderQuartz, 4), Ingredient.fromItems(ModFluffBlocks.lavenderQuartz), 25));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("red_quartz_deconstruct"), new ItemStack(ModItems.redQuartz, 4), Ingredient.fromItems(ModFluffBlocks.redQuartz), 25));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("elf_quartz_deconstruct"), new ItemStack(ModItems.elfQuartz, 4), Ingredient.fromItems(ModFluffBlocks.elfQuartz), 25));
chiseledBrickRecipe = BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Blocks.CHISELED_STONE_BRICKS, 1), Ingredient.fromItems(Blocks.STONE_BRICKS), 150);
iceRecipe = BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Blocks.ICE), Ingredient.fromItems(Blocks.SNOW), 2250);
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("chiseled_stone_bricks"), new ItemStack(Blocks.CHISELED_STONE_BRICKS, 1), Ingredient.fromItems(Blocks.STONE_BRICKS), 150));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("ice"), new ItemStack(Blocks.ICE), Ingredient.fromItems(Blocks.SNOW), 2250));
swampFolliageRecipes = new ArrayList<>();
swampFolliageRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Blocks.LILY_PAD), Ingredient.fromItems(Blocks.VINE), 320));
swampFolliageRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Blocks.VINE), Ingredient.fromItems(Blocks.LILY_PAD), 320));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("vine_to_lily_pad"), new ItemStack(Blocks.LILY_PAD), Ingredient.fromItems(Blocks.VINE), 320));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("lily_pad_to_vine"), new ItemStack(Blocks.VINE), Ingredient.fromItems(Blocks.LILY_PAD), 320));
fishRecipes = new ArrayList<>();
Item[] fishes = { Items.COD, Items.SALMON, Items.TROPICAL_FISH, Items.PUFFERFISH };
for(int i = 0; i < fishes.length; i++) {
Ingredient in = Ingredient.fromItems(fishes[i]);
ItemStack out = new ItemStack(i == fishes.length - 1 ? fishes[0] : fishes[i + 1]);
fishRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(out, in, 200));
String id = String.format("%s_to_%s", fishes[i].getRegistryName().getPath(), out.getItem().getRegistryName().getPath());
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(new ResourceLocation(LibMisc.MOD_ID, id), out, in, 200));
}
cropRecipes = new ArrayList<>();
cropRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Items.WHEAT_SEEDS), Ingredient.fromItems(Items.COCOA_BEANS), 6000));
cropRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Items.POTATO), Ingredient.fromItems(Items.WHEAT), 6000));
cropRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Items.CARROT), Ingredient.fromItems(Items.POTATO), 6000));
cropRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Items.BEETROOT_SEEDS), Ingredient.fromItems(Items.CARROT), 6000));
cropRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Items.MELON_SEEDS), Ingredient.fromItems(Items.BEETROOT_SEEDS), 6000));
cropRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Items.PUMPKIN_SEEDS), Ingredient.fromItems(Items.MELON_SEEDS), 6000));
cropRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Items.COCOA_BEANS), Ingredient.fromItems(Items.PUMPKIN_SEEDS), 6000));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("cocoa_to_wheat"), new ItemStack(Items.WHEAT_SEEDS), Ingredient.fromItems(Items.COCOA_BEANS), 6000));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("wheat_to_potato"), new ItemStack(Items.POTATO), Ingredient.fromItems(Items.WHEAT), 6000));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("potato_to_carrot"), new ItemStack(Items.CARROT), Ingredient.fromItems(Items.POTATO), 6000));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("carrot_to_beetroot"), new ItemStack(Items.BEETROOT_SEEDS), Ingredient.fromItems(Items.CARROT), 6000));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("beetroot_to_melon"), new ItemStack(Items.MELON_SEEDS), Ingredient.fromItems(Items.BEETROOT_SEEDS), 6000));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("melon_to_pumpkin"), new ItemStack(Items.PUMPKIN_SEEDS), Ingredient.fromItems(Items.MELON_SEEDS), 6000));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("pumpkin_to_cocoa"), new ItemStack(Items.COCOA_BEANS), Ingredient.fromItems(Items.PUMPKIN_SEEDS), 6000));
potatoRecipe = BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Items.POTATO), Ingredient.fromItems(Items.POISONOUS_POTATO), 1200);
netherWartRecipe = BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Items.NETHER_WART), Ingredient.fromItems(Items.BLAZE_ROD), 4000);
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("potato_unpoison"), new ItemStack(Items.POTATO), Ingredient.fromItems(Items.POISONOUS_POTATO), 1200));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("blaze_rod_to_nether_wart"), new ItemStack(Items.NETHER_WART), Ingredient.fromItems(Items.BLAZE_ROD), 4000));
gunpowderAndFlintRecipes = new ArrayList<>();
gunpowderAndFlintRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Items.FLINT), Ingredient.fromItems(Items.GUNPOWDER), 200));
gunpowderAndFlintRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Items.GUNPOWDER), Ingredient.fromItems(Items.FLINT), 200));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("gunpowder_to_flint"), new ItemStack(Items.FLINT), Ingredient.fromItems(Items.GUNPOWDER), 200));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("flint_to_gunpowder"), new ItemStack(Items.GUNPOWDER), Ingredient.fromItems(Items.FLINT), 200));
nameTagRecipe = BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Items.NAME_TAG), Ingredient.fromItems(Items.WRITABLE_BOOK), 16000);
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("book_to_name_tag"), new ItemStack(Items.NAME_TAG), Ingredient.fromItems(Items.WRITABLE_BOOK), 16000));
stringRecipes = new ArrayList<>();
stringRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Items.STRING, 3), Ingredient.fromTag(ItemTags.WOOL), 100));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("wool_deconstruct"), new ItemStack(Items.STRING, 3), Ingredient.fromTag(ItemTags.WOOL), 100));
slimeballCactusRecipes = new ArrayList<>();
slimeballCactusRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Items.SLIME_BALL), Ingredient.fromItems(Blocks.CACTUS), 1200));
slimeballCactusRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Blocks.CACTUS), Ingredient.fromItems(Items.SLIME_BALL), 1200));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("cactus_to_slime"), new ItemStack(Items.SLIME_BALL), Ingredient.fromItems(Blocks.CACTUS), 1200));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("slime_to_cactus"), new ItemStack(Blocks.CACTUS), Ingredient.fromItems(Items.SLIME_BALL), 1200));
enderPearlRecipe = BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Items.ENDER_PEARL), Ingredient.fromItems(Items.GHAST_TEAR), 28000);
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("ender_pearl_from_ghast_tear"), new ItemStack(Items.ENDER_PEARL), Ingredient.fromItems(Items.GHAST_TEAR), 28000));
redstoneToGlowstoneRecipes = new ArrayList<>();
redstoneToGlowstoneRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Items.REDSTONE), Ingredient.fromItems(Items.GLOWSTONE_DUST), 300));
redstoneToGlowstoneRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Items.GLOWSTONE_DUST), Ingredient.fromItems(Items.REDSTONE), 300));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("glowstone_to_redstone"), new ItemStack(Items.REDSTONE), Ingredient.fromItems(Items.GLOWSTONE_DUST), 300));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("redstone_to_glowstone"), new ItemStack(Items.GLOWSTONE_DUST), Ingredient.fromItems(Items.REDSTONE), 300));
sandRecipe = BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Blocks.SAND), Ingredient.fromItems(Blocks.COBBLESTONE), 50);
redSandRecipe = BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Blocks.RED_SAND), Ingredient.fromItems(Blocks.TERRACOTTA), 50);
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("cobble_to_sand"), new ItemStack(Blocks.SAND), Ingredient.fromItems(Blocks.COBBLESTONE), 50));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("terracotta_to_red_sand"), new ItemStack(Blocks.RED_SAND), Ingredient.fromItems(Blocks.TERRACOTTA), 50));
clayBreakdownRecipes = new ArrayList<>();
clayBreakdownRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Items.CLAY_BALL, 4), Ingredient.fromItems(Blocks.CLAY), 25));
clayBreakdownRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Items.BRICK, 4), Ingredient.fromItems(Blocks.BRICKS), 25));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("clay_deconstruct"), new ItemStack(Items.CLAY_BALL, 4), Ingredient.fromItems(Blocks.CLAY), 25));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("brick_deconstruct"), new ItemStack(Items.BRICK, 4), Ingredient.fromItems(Blocks.BRICKS), 25));
coarseDirtRecipe = BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Blocks.COARSE_DIRT), Ingredient.fromItems(Blocks.DIRT), 120);
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("coarse_dirt"), new ItemStack(Blocks.COARSE_DIRT), Ingredient.fromItems(Blocks.DIRT), 120));
stoneRecipes = new ArrayList<>();
stoneRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Blocks.ANDESITE), Ingredient.fromItems(Blocks.STONE), 200));
stoneRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Blocks.DIORITE), Ingredient.fromItems(Blocks.ANDESITE), 200));
stoneRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Blocks.GRANITE), Ingredient.fromItems(Blocks.DIORITE), 200));
stoneRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Blocks.ANDESITE), Ingredient.fromItems(Blocks.GRANITE), 200));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("stone_to_andesite"), new ItemStack(Blocks.ANDESITE), Ingredient.fromItems(Blocks.STONE), 200));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("andesite_to_diorite"), new ItemStack(Blocks.DIORITE), Ingredient.fromItems(Blocks.ANDESITE), 200));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("diorite_to_granite"), new ItemStack(Blocks.GRANITE), Ingredient.fromItems(Blocks.DIORITE), 200));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("granite_to_andesite"), new ItemStack(Blocks.ANDESITE), Ingredient.fromItems(Blocks.GRANITE), 200));
tallgrassRecipes = new ArrayList<>();
tallgrassRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Blocks.DEAD_BUSH), Ingredient.fromItems(Blocks.FERN), 500));
tallgrassRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Blocks.GRASS), Ingredient.fromItems(Blocks.DEAD_BUSH), 500));
tallgrassRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Blocks.FERN), Ingredient.fromItems(Blocks.GRASS), 500));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("fern_to_dead_bush"), new ItemStack(Blocks.DEAD_BUSH), Ingredient.fromItems(Blocks.FERN), 500));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("dead_bush_to_grass"), new ItemStack(Blocks.GRASS), Ingredient.fromItems(Blocks.DEAD_BUSH), 500));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("grass_to_fern"), new ItemStack(Blocks.FERN), Ingredient.fromItems(Blocks.GRASS), 500));
flowersRecipes = new ArrayList<>();
flowersRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Blocks.POPPY), Ingredient.fromItems(Blocks.DANDELION), 400));
flowersRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Blocks.BLUE_ORCHID), Ingredient.fromItems(Blocks.POPPY), 400));
flowersRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Blocks.ALLIUM), Ingredient.fromItems(Blocks.BLUE_ORCHID), 400));
flowersRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Blocks.AZURE_BLUET), Ingredient.fromItems(Blocks.ALLIUM), 400));
flowersRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Blocks.RED_TULIP), Ingredient.fromItems(Blocks.AZURE_BLUET), 400));
flowersRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Blocks.ORANGE_TULIP), Ingredient.fromItems(Blocks.RED_TULIP), 400));
flowersRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Blocks.WHITE_TULIP), Ingredient.fromItems(Blocks.ORANGE_TULIP), 400));
flowersRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Blocks.PINK_TULIP), Ingredient.fromItems(Blocks.WHITE_TULIP), 400));
flowersRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Blocks.OXEYE_DAISY), Ingredient.fromItems(Blocks.PINK_TULIP), 400));
flowersRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Blocks.SUNFLOWER), Ingredient.fromItems(Blocks.OXEYE_DAISY), 400));
flowersRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Blocks.LILAC), Ingredient.fromItems(Blocks.SUNFLOWER), 400));
flowersRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Blocks.ROSE_BUSH), Ingredient.fromItems(Blocks.LILAC), 400));
flowersRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Blocks.PEONY), Ingredient.fromItems(Blocks.ROSE_BUSH), 400));
flowersRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Blocks.DANDELION), Ingredient.fromItems(Blocks.PEONY), 400));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("dandelion_to_poppy"), new ItemStack(Blocks.POPPY), Ingredient.fromItems(Blocks.DANDELION), 400));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("poppy_to_blue_orchid"), new ItemStack(Blocks.BLUE_ORCHID), Ingredient.fromItems(Blocks.POPPY), 400));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("blue_orchid_to_allium"), new ItemStack(Blocks.ALLIUM), Ingredient.fromItems(Blocks.BLUE_ORCHID), 400));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("allium_to_azure_bluet"), new ItemStack(Blocks.AZURE_BLUET), Ingredient.fromItems(Blocks.ALLIUM), 400));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("azure_bluet_to_red_tulip"), new ItemStack(Blocks.RED_TULIP), Ingredient.fromItems(Blocks.AZURE_BLUET), 400));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("red_tulip_to_orange_tulip"), new ItemStack(Blocks.ORANGE_TULIP), Ingredient.fromItems(Blocks.RED_TULIP), 400));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("orange_tulip_to_white_tulip"), new ItemStack(Blocks.WHITE_TULIP), Ingredient.fromItems(Blocks.ORANGE_TULIP), 400));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("white_tulip_to_pink_tulip"), new ItemStack(Blocks.PINK_TULIP), Ingredient.fromItems(Blocks.WHITE_TULIP), 400));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("pink_tulip_to_oxeye_daisy"), new ItemStack(Blocks.OXEYE_DAISY), Ingredient.fromItems(Blocks.PINK_TULIP), 400));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("oxeye_daisy_to_sunflower"), new ItemStack(Blocks.SUNFLOWER), Ingredient.fromItems(Blocks.OXEYE_DAISY), 400));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("sunflower_to_lilac"), new ItemStack(Blocks.LILAC), Ingredient.fromItems(Blocks.SUNFLOWER), 400));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("lilac_to_rose_bush"), new ItemStack(Blocks.ROSE_BUSH), Ingredient.fromItems(Blocks.LILAC), 400));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("rose_bush_to_peony"), new ItemStack(Blocks.PEONY), Ingredient.fromItems(Blocks.ROSE_BUSH), 400));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("peony_to_dandelion"), new ItemStack(Blocks.DANDELION), Ingredient.fromItems(Blocks.PEONY), 400));
chorusRecipe = BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Blocks.CHORUS_FLOWER), Ingredient.fromItems(Items.POPPED_CHORUS_FRUIT), 10000);
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("chorus_fruit_to_flower"), new ItemStack(Blocks.CHORUS_FLOWER), Ingredient.fromItems(Items.POPPED_CHORUS_FRUIT), 10000));
if(Botania.gardenOfGlassLoaded) {
prismarineRecipes = new ArrayList<>();
prismarineRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Items.PRISMARINE_SHARD), Ingredient.fromItems(Items.QUARTZ), 1000));
prismarineRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Items.PRISMARINE_CRYSTALS), Ingredient.fromItems(Items.PRISMARINE_SHARD), 500));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("prismarine_shard_gog"), new ItemStack(Items.PRISMARINE_SHARD), Ingredient.fromItems(Items.QUARTZ), 1000));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.alchemy(prefix("prismarine_crystals_gog"), new ItemStack(Items.PRISMARINE_CRYSTALS), Ingredient.fromItems(Items.PRISMARINE_SHARD), 500));
}
IMCSender.send(IMC.REGISTER_MANA_INFUSION, mini(ModSubtiles.agricarnationChibi, ModSubtiles.agricarnation));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, mini(ModSubtiles.clayconiaChibi, ModSubtiles.clayconia));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, mini(ModSubtiles.bellethornChibi, ModSubtiles.bellethorn));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, mini(ModSubtiles.bubbellChibi, ModSubtiles.bubbell));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, mini(ModSubtiles.hopperhockChibi, ModSubtiles.hopperhock));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, mini(ModSubtiles.marimorphosisChibi, ModSubtiles.marimorphosis));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, mini(ModSubtiles.rannuncarpusChibi, ModSubtiles.rannuncarpus));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, mini(ModSubtiles.solegnoliaChibi, ModSubtiles.solegnolia));
}
private static RecipeManaInfusion mini(SubTileType mini, SubTileType full) {
return RecipeManaInfusion.alchemy(mini.getRegistryName(), ItemBlockSpecialFlower.ofType(mini), new IngredientNBTSubset(ItemBlockSpecialFlower.ofType(full)), 2500);
}
}
@@ -10,17 +10,19 @@
*/
package vazkii.botania.common.crafting;
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.Ingredient;
import net.minecraft.util.IItemProvider;
import vazkii.botania.api.BotaniaAPI;
import net.minecraft.util.ResourceLocation;
import vazkii.botania.api.imc.IMC;
import vazkii.botania.api.recipe.RecipeManaInfusion;
import vazkii.botania.common.core.handler.IMCSender;
import vazkii.botania.common.lib.LibMisc;
import java.util.ArrayList;
import java.util.List;
import static vazkii.botania.common.lib.ResourceLocationHelper.prefix;
public class ModManaConjurationRecipes {
@@ -35,25 +37,24 @@ public class ModManaConjurationRecipes {
public static List<RecipeManaInfusion> leavesRecipes;
public static RecipeManaInfusion grassRecipe;
public static void init() {
redstoneRecipe = BotaniaAPI.registerManaConjurationRecipe(new ItemStack(Items.REDSTONE, 2), ingr(Items.REDSTONE), 5000);
glowstoneRecipe = BotaniaAPI.registerManaConjurationRecipe(new ItemStack(Items.GLOWSTONE_DUST, 2), ingr(Items.GLOWSTONE_DUST), 5000);
quartzRecipe = BotaniaAPI.registerManaConjurationRecipe(new ItemStack(Items.QUARTZ, 2), ingr(Items.QUARTZ), 2500);
coalRecipe = BotaniaAPI.registerManaConjurationRecipe(new ItemStack(Items.COAL, 2), ingr(Items.COAL), 2100);
snowballRecipe = BotaniaAPI.registerManaConjurationRecipe(new ItemStack(Items.SNOWBALL, 2), ingr(Items.SNOWBALL), 200);
netherrackRecipe = BotaniaAPI.registerManaConjurationRecipe(new ItemStack(Blocks.NETHERRACK, 2), ingr(Blocks.NETHERRACK), 200);
soulSandRecipe = BotaniaAPI.registerManaConjurationRecipe(new ItemStack(Blocks.SOUL_SAND, 2), ingr(Blocks.SOUL_SAND), 1500);
gravelRecipe = BotaniaAPI.registerManaConjurationRecipe(new ItemStack(Blocks.GRAVEL, 2), ingr(Blocks.GRAVEL), 720);
public static void send() {
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.conjuration(prefix("redstone_dupe"), new ItemStack(Items.REDSTONE, 2), ingr(Items.REDSTONE), 5000));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.conjuration(prefix("glowstone_dupe"), new ItemStack(Items.GLOWSTONE_DUST, 2), ingr(Items.GLOWSTONE_DUST), 5000));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.conjuration(prefix("quartz_dupe"), new ItemStack(Items.QUARTZ, 2), ingr(Items.QUARTZ), 2500));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.conjuration(prefix("coal_dupe"), new ItemStack(Items.COAL, 2), ingr(Items.COAL), 2100));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.conjuration(prefix("snowball_dupe"), new ItemStack(Items.SNOWBALL, 2), ingr(Items.SNOWBALL), 200));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.conjuration(prefix("netherrack_dupe"), new ItemStack(Blocks.NETHERRACK, 2), ingr(Blocks.NETHERRACK), 200));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.conjuration(prefix("soul_sand_dupe"), new ItemStack(Blocks.SOUL_SAND, 2), ingr(Blocks.SOUL_SAND), 1500));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.conjuration(prefix("gravel_dupe"), new ItemStack(Blocks.GRAVEL, 2), ingr(Blocks.GRAVEL), 720));
leavesRecipes = new ArrayList<>();
leavesRecipes.add(BotaniaAPI.registerManaConjurationRecipe(new ItemStack(Blocks.OAK_LEAVES, 2), ingr(Blocks.OAK_LEAVES), 2000));
leavesRecipes.add(BotaniaAPI.registerManaConjurationRecipe(new ItemStack(Blocks.BIRCH_LEAVES, 2), ingr(Blocks.BIRCH_LEAVES), 2000));
leavesRecipes.add(BotaniaAPI.registerManaConjurationRecipe(new ItemStack(Blocks.SPRUCE_LEAVES, 2), ingr(Blocks.SPRUCE_LEAVES), 2000));
leavesRecipes.add(BotaniaAPI.registerManaConjurationRecipe(new ItemStack(Blocks.JUNGLE_LEAVES, 2), ingr(Blocks.JUNGLE_LEAVES), 2000));
leavesRecipes.add(BotaniaAPI.registerManaConjurationRecipe(new ItemStack(Blocks.ACACIA_LEAVES, 2), ingr(Blocks.ACACIA_LEAVES), 2000));
leavesRecipes.add(BotaniaAPI.registerManaConjurationRecipe(new ItemStack(Blocks.DARK_OAK_LEAVES, 2), ingr(Blocks.DARK_OAK_LEAVES), 2000));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.conjuration(prefix("oak_leaves_dupe"), new ItemStack(Blocks.OAK_LEAVES, 2), ingr(Blocks.OAK_LEAVES), 2000));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.conjuration(prefix("birch_leaves_dupe"), new ItemStack(Blocks.BIRCH_LEAVES, 2), ingr(Blocks.BIRCH_LEAVES), 2000));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.conjuration(prefix("spruce_leaves_dupe"), new ItemStack(Blocks.SPRUCE_LEAVES, 2), ingr(Blocks.SPRUCE_LEAVES), 2000));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.conjuration(prefix("jungle_leaves_dupe"), new ItemStack(Blocks.JUNGLE_LEAVES, 2), ingr(Blocks.JUNGLE_LEAVES), 2000));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.conjuration(prefix("acacia_leaves_dupe"), new ItemStack(Blocks.ACACIA_LEAVES, 2), ingr(Blocks.ACACIA_LEAVES), 2000));
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.conjuration(prefix("dark_oak_leaves_dupe"), new ItemStack(Blocks.DARK_OAK_LEAVES, 2), ingr(Blocks.DARK_OAK_LEAVES), 2000));
grassRecipe = BotaniaAPI.registerManaConjurationRecipe(new ItemStack(Blocks.GRASS), ingr(Blocks.GRASS), 800);
IMCSender.send(IMC.REGISTER_MANA_INFUSION, RecipeManaInfusion.conjuration(prefix("grass"), new ItemStack(Blocks.GRASS), ingr(Blocks.GRASS), 800));
}
private static Ingredient ingr(IItemProvider i) {
@@ -140,13 +140,13 @@ public final class LibBlockNames {
public static final String STAIR_SUFFIX = "_stairs";
public static final String WALL_SUFFIX = "_wall";
public static final ResourceLocation SUBTILE_PUREDAISY = prefix("puredaisy");
public static final ResourceLocation SUBTILE_PUREDAISY = prefix("pure_daisy");
public static final ResourceLocation SUBTILE_MANASTAR = prefix("manastar");
public static final ResourceLocation SUBTILE_ENDOFLAME = prefix("endoflame");
public static final ResourceLocation SUBTILE_HYDROANGEAS = prefix("hydroangeas");
public static final ResourceLocation SUBTILE_THERMALILY = prefix("thermalily");
public static final ResourceLocation SUBTILE_ARCANE_ROSE = prefix("arcanerose");
public static final ResourceLocation SUBTILE_ARCANE_ROSE = prefix("rosa_arcana");
public static final ResourceLocation SUBTILE_MUNCHDEW = prefix("munchdew");
public static final ResourceLocation SUBTILE_ENTROPINNYUM = prefix("entropinnyum");
public static final ResourceLocation SUBTILE_KEKIMURUS = prefix("kekimurus");