ImbueRecipe#toBukkitRecipe() is not implemented

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Minor
    • None
    • Affects Version/s: None
    • Environment:

      N/A

    • 4608-Spigot-cc5228d-2197f0a (MC: 26.1) (Implementing API version 26.1-R0.1-SNAPSHOT)
    • N/A
    • Yes

      While iterating through Server#recipeIterator(), at some point the following error will occur:

      java.lang.AbstractMethodError: Method net/minecraft/world/item/crafting/ImbueRecipe.toBukkitRecipe(Lorg/bukkit/NamespacedKey;)Lorg/bukkit/inventory/Recipe; is abstract
              at net.minecraft.world.item.crafting.ImbueRecipe.toBukkitRecipe(ImbueRecipe.java)
              at net.minecraft.world.item.crafting.RecipeHolder.toBukkitRecipe(RecipeHolder.java:16)
              at org.bukkit.craftbukkit.inventory.RecipeIterator.next(RecipeIterator.java:24)
              at org.bukkit.craftbukkit.inventory.RecipeIterator.next(RecipeIterator.java:10) 

      This is because ImbueRecipe extends NormalCraftingRecipe which implements CraftingRecipe which extends Recipe<CraftingInput>. Recipe<CraftingInput> defines a the method toBukkitRecipe(), but this is not implemented in any of these extended/implemented classes, causing the given error. 

       

      As a result, you pretty much can't use RecipeIterator at the moment.

            Assignee:
            Unassigned
            Reporter:
            Athlaeos
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: