Interface CustomRecipe

All Known Implementing Classes:
CustomBlastingRecipe, CustomCampfireRecipe, CustomFurnaceRecipe, CustomPotionMix, CustomShapedRecipe, CustomShapelessRecipe, CustomSmithingTransformRecipe, CustomSmokingRecipe, CustomStonecuttingRecipe, CustomTransmuteRecipe, DisabledRecipe

public interface CustomRecipe
Represents a custom recipe structure defining the transformation of inputs to an output.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Codec<CustomRecipe>
    Polymorphic codec for serializing and deserializing custom recipes.
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull net.kyori.adventure.key.Key
     
    Retrieves the structural type format associated with this recipe variant.
    default boolean
    Determines whether this custom recipe should silently override and replace a pre-existing recipe with the same key.
  • Field Details

    • CODEC

      static final Codec<CustomRecipe> CODEC
      Polymorphic codec for serializing and deserializing custom recipes. It uses the "type" field to delegate serialization logic to the registered RecipeType.
  • Method Details

    • getKey

      @NotNull @NotNull net.kyori.adventure.key.Key getKey()
      Returns:
      The unique namespaced identifier representing this recipe instance.
    • replace

      default boolean replace()
      Determines whether this custom recipe should silently override and replace a pre-existing recipe with the same key.
      Returns:
      True if the recipe acts as a replacement, false otherwise.
    • getType

      RecipeType<?> getType()
      Retrieves the structural type format associated with this recipe variant.
      Returns:
      The bound RecipeType.