Can't register new recipe

Hi guys!

I’ve tried to register a new recipe in my plugin and i got an UnsupportedOperationException at getting the RecipeRegistery Sponge.getGame().getRegistry().getRecipeRegistry() in my GameStartedServerEvent. And this is the code which I used:

    Sponge.getGame().getRegistry().getRecipeRegistry()
            .register(Sponge.getGame().getRegistry().createBuilder(ShapelessRecipe.Builder.class)
            .addIngredient(ItemStack.builder().itemType(ItemTypes.IRON_INGOT).build())
            .addResult(ItemStack.builder().itemType(ItemTypes.STONE).build()).build());

I think theres no error in this code but maybe the RecipeRegistery is not registered in my spongeversion? (4.1.0-BETA-1312).

Hope you can help me^^
~ DerTechNick

I don’t believe recipes are implemented yet. They require a functioning Inventory API which is also not fully implemented.

1 Like

Also, almost every builder can be obtained with the builder() method. For example: ShapedRecipe.builder()

I’ve already tried it with this method but this one where i created the builder was my last try^^

Well, if it says it can’t find a builder, then all that means is it hasn’t been implemented yet.