Solved Hot to see if Recipe is Shaped or Shapeless?

Discussion in 'Plugin Development' started by The_Nesko, Mar 7, 2016.

Thread Status:
Not open for further replies.
  1. Offline

    The_Nesko

    Hello i need help with one little thing how do i check if the recipe being crafted is shaped or shapeless it's probably easy but i just can't figure it out. :p

    Code:
    @EventHandler
    public void itemCraft(CraftItemEvent e) {
        
        if (e.getRecipe == ?) {
    
        }
    }
    
    
     
    Last edited: Mar 7, 2016
  2. try:
    Code:
    if (recipe instanceof ShapedRecipe) {
    
    } else if (recipe instanceof ShapelessRecipe) {
    
    }
     
    The_Nesko and Konato_K like this.
  3. Offline

    The_Nesko

    @FisheyLP

    Oh right i completely forgot about the instanceof thing thanks for the help. :)
     
Thread Status:
Not open for further replies.

Share This Page