package de.hessj.environmentex;

import org.bukkit.Material;
import org.bukkit.NamespacedKey;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.server.ServerLoadEvent;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.ShapedRecipe;
import org.bukkit.inventory.ShapelessRecipe;
import org.bukkit.inventory.StonecuttingRecipe;
public class CustomRecipes implements Listener {
    
    @EventHandler
    public void onEnable(ServerLoadEvent e) {
        StonecuttingRecipe scrStoneToCobble = new StonecuttingRecipe(new NamespacedKey(App.main, "R3S_SCR_STONE"), new ItemStack(Material.COBBLESTONE), Material.STONE);
        App.main.getServer().addRecipe(scrStoneToCobble);
        App.main.recipeKeys.add(scrStoneToCobble.getKey());
        ShapelessRecipe srGlowberryToGlowpowder = new ShapelessRecipe(new NamespacedKey(App.main, "R3S_SLR_GLOWBERRY"), new ItemStack(Material.GLOWSTONE_DUST)); 
        srGlowberryToGlowpowder.addIngredient(new ItemStack(Material.GLOW_BERRIES));
        App.main.getServer().addRecipe(srGlowberryToGlowpowder);    
        App.main.recipeKeys.add(srGlowberryToGlowpowder.getKey());
        ShapedRecipe srSoulsoil = new ShapedRecipe(new NamespacedKey(App.main, "R3S_SR_SOULSOIL"), new ItemStack(Material.SOUL_SOIL));
        srSoulsoil.shape("DS ","SD ","   ");
        srSoulsoil.setIngredient('S', Material.SOUL_SAND);
        srSoulsoil.setIngredient('D', Material.DIRT);
        App.main.getServer().addRecipe(srSoulsoil); 
        App.main.recipeKeys.add(srSoulsoil.getKey());
    }
}
