2018-10-22 00:14:52 +02:00
|
|
|
package de.ellpeck.naturesaura.compat.jei;
|
2018-10-16 21:10:38 +02:00
|
|
|
|
|
|
|
import de.ellpeck.naturesaura.NaturesAura;
|
2018-11-11 13:26:19 +01:00
|
|
|
import de.ellpeck.naturesaura.api.NaturesAuraAPI;
|
2018-10-16 21:10:38 +02:00
|
|
|
import de.ellpeck.naturesaura.blocks.ModBlocks;
|
|
|
|
import mezz.jei.api.IModPlugin;
|
2020-01-21 21:04:44 +01:00
|
|
|
import mezz.jei.api.JeiPlugin;
|
|
|
|
import mezz.jei.api.helpers.IGuiHelper;
|
|
|
|
import mezz.jei.api.registration.IRecipeCatalystRegistration;
|
|
|
|
import mezz.jei.api.registration.IRecipeCategoryRegistration;
|
|
|
|
import mezz.jei.api.registration.IRecipeRegistration;
|
2018-10-16 21:10:38 +02:00
|
|
|
import net.minecraft.item.ItemStack;
|
2020-01-21 21:04:44 +01:00
|
|
|
import net.minecraft.util.ResourceLocation;
|
2018-10-16 21:10:38 +02:00
|
|
|
|
2020-01-21 21:04:44 +01:00
|
|
|
@JeiPlugin
|
2018-10-16 21:10:38 +02:00
|
|
|
public class JEINaturesAuraPlugin implements IModPlugin {
|
|
|
|
|
2020-01-21 21:04:44 +01:00
|
|
|
public static final ResourceLocation TREE_RITUAL = new ResourceLocation(NaturesAura.MOD_ID, "tree_ritual");
|
|
|
|
public static final ResourceLocation ALTAR = new ResourceLocation(NaturesAura.MOD_ID, "altar");
|
|
|
|
public static final ResourceLocation OFFERING = new ResourceLocation(NaturesAura.MOD_ID, "offering");
|
|
|
|
public static final ResourceLocation SPAWNER = new ResourceLocation(NaturesAura.MOD_ID, "animal_spawner");
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ResourceLocation getPluginUid() {
|
|
|
|
return new ResourceLocation(NaturesAura.MOD_ID, "jei_plugin");
|
|
|
|
}
|
2018-10-16 21:10:38 +02:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public void registerCategories(IRecipeCategoryRegistration registry) {
|
|
|
|
IGuiHelper helper = registry.getJeiHelpers().getGuiHelper();
|
|
|
|
registry.addRecipeCategories(
|
2018-10-18 18:00:21 +02:00
|
|
|
new TreeRitualCategory(helper),
|
2018-11-21 01:05:50 +01:00
|
|
|
new AltarCategory(helper),
|
2018-12-31 17:32:38 +01:00
|
|
|
new OfferingCategory(helper),
|
|
|
|
new AnimalSpawnerCategory(helper)
|
2018-10-16 21:10:38 +02:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2020-01-21 21:04:44 +01:00
|
|
|
public void registerRecipeCatalysts(IRecipeCatalystRegistration registration) {
|
|
|
|
registration.addRecipeCatalyst(new ItemStack(ModBlocks.GOLD_POWDER), TREE_RITUAL);
|
|
|
|
registration.addRecipeCatalyst(new ItemStack(ModBlocks.WOOD_STAND), TREE_RITUAL);
|
|
|
|
registration.addRecipeCatalyst(new ItemStack(ModBlocks.NATURE_ALTAR), ALTAR);
|
|
|
|
registration.addRecipeCatalyst(new ItemStack(ModBlocks.CONVERSION_CATALYST), ALTAR);
|
|
|
|
registration.addRecipeCatalyst(new ItemStack(ModBlocks.OFFERING_TABLE), OFFERING);
|
|
|
|
registration.addRecipeCatalyst(new ItemStack(ModBlocks.ANIMAL_SPAWNER), SPAWNER);
|
|
|
|
}
|
2018-10-16 21:10:38 +02:00
|
|
|
|
2020-01-21 21:04:44 +01:00
|
|
|
@Override
|
|
|
|
public void registerRecipes(IRecipeRegistration registration) {
|
|
|
|
registration.addRecipes(NaturesAuraAPI.TREE_RITUAL_RECIPES.values(), TREE_RITUAL);
|
|
|
|
registration.addRecipes(NaturesAuraAPI.ALTAR_RECIPES.values(), ALTAR);
|
|
|
|
registration.addRecipes(NaturesAuraAPI.OFFERING_RECIPES.values(), OFFERING);
|
|
|
|
registration.addRecipes(NaturesAuraAPI.ANIMAL_SPAWNER_RECIPES.values(), SPAWNER);
|
2018-10-16 21:10:38 +02:00
|
|
|
}
|
|
|
|
}
|