Sponge icon indicating copy to clipboard operation
Sponge copied to clipboard

UpgradeReceipe does not have method "key"

Open mosemister opened this issue 1 year ago • 0 comments

Is this request specific to one implementation of Sponge?

No

Sponge Version

1.16.5-8.1.0-RC1352

What are you requesting?

A implementation for Recipe#key

Gaining crash of

java.lang.AbstractMethodError: Receiver class net.minecraft.world.item.crafting.UpgradeRecipe does not define or inherit an implementation of the resolved method 'org.spongepowered.api.ResourceKey key()' of interface org.spongepowered.api.item.recipe.Recipe.

Steps to reproduce:

loop though all registered recipes mapping each to its Key

List<ResourceKey> recipeKeys = Sponge
                .server()
                .recipeManager()
                .all()
                .stream()
                .map(recipe -> recipe.key())
               .toList();

mosemister avatar Aug 07 '23 21:08 mosemister