Class RecipeBase<C extends net.minecraft.world.Container>

java.lang.Object
net.darkhax.bookshelf.api.data.recipes.RecipeBase<C>
Type Parameters:
C - The type of inventory used to craft this recipe.
All Implemented Interfaces:
net.minecraft.world.item.crafting.Recipe<C>
Direct Known Subclasses:
RecipeBaseData

public abstract class RecipeBase<C extends net.minecraft.world.Container> extends Object implements net.minecraft.world.item.crafting.Recipe<C>
A partial implementation of Recipe that provides the necessary ID handling and error detection.

Having a null Recipe.getSerializer() or Recipe.getType() is considered invalid and will raise a IllegalStateException if either are detected as null.

  • Constructor Summary

    Constructors
    Constructor
    Description
    RecipeBase(net.minecraft.resources.ResourceLocation id)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.resources.ResourceLocation
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.minecraft.world.item.crafting.Recipe

    assemble, canCraftInDimensions, getGroup, getIngredients, getRemainingItems, getResultItem, getSerializer, getToastSymbol, getType, isIncomplete, isSpecial, matches, showNotification
  • Constructor Details

    • RecipeBase

      public RecipeBase(net.minecraft.resources.ResourceLocation id)
  • Method Details

    • getId

      public net.minecraft.resources.ResourceLocation getId()
      Specified by:
      getId in interface net.minecraft.world.item.crafting.Recipe<C extends net.minecraft.world.Container>