Interface IRecipeManager

All Known Implementing Classes:
StandardRecipeManager

public interface IRecipeManager
The Interface describing the recipeManager which takes care of the recipes discovered by the colonies in this world.
  • Method Summary

    Modifier and Type
    Method
    Description
    Add a recipe to the map.
    Check if recipe is in map already, if not.
    getRecipe(IToken<?> token)
    Get a recipe from the storage.
    Get the recipe id of a given recipeStorage.
    com.google.common.collect.ImmutableMap<IToken<?>,IRecipeStorage>
    Get a unmodifiable copy of the recipes map.
    void
    read(net.minecraft.core.HolderLookup.Provider provider, @NotNull net.minecraft.nbt.CompoundTag compound)
    Read Colonies from saved NBT data.
    void
    registerUse(IToken<?> token)
    Register the recipe as used with the recipe manager
    void
    Clear the recipe list (used during shutdown)
    void
    write(net.minecraft.core.HolderLookup.Provider provider, @NotNull net.minecraft.nbt.CompoundTag compound)
    Write colonies to NBT data for saving.
  • Method Details

    • getRecipes

      com.google.common.collect.ImmutableMap<IToken<?>,IRecipeStorage> getRecipes()
      Get a unmodifiable copy of the recipes map.
      Returns:
      a map of Token, RecipeStorage.
    • getRecipe

      IRecipeStorage getRecipe(IToken<?> token)
      Get a recipe from the storage.
      Parameters:
      token - the unique token.
      Returns:
      the recipe.
    • addRecipe

      IToken<?> addRecipe(IRecipeStorage storage)
      Add a recipe to the map.
      Parameters:
      storage - the recipe to add
      Returns:
      the IToken.
    • checkOrAddRecipe

      IToken<?> checkOrAddRecipe(IRecipeStorage storage)
      Check if recipe is in map already, if not. Add a recipe to the map.
      Parameters:
      storage - the recipe to add
      Returns:
      the iToken.
    • getRecipeId

      IToken<?> getRecipeId(IRecipeStorage storage)
      Get the recipe id of a given recipeStorage.
      Parameters:
      storage - the storage.
      Returns:
      the id or null if inexistent.
    • registerUse

      void registerUse(IToken<?> token)
      Register the recipe as used with the recipe manager
      Parameters:
      token - the recipe token
    • write

      void write(@NotNull net.minecraft.core.HolderLookup.Provider provider, @NotNull @NotNull net.minecraft.nbt.CompoundTag compound)
      Write colonies to NBT data for saving.
      Parameters:
      compound - NBT-Tag.
    • read

      void read(@NotNull net.minecraft.core.HolderLookup.Provider provider, @NotNull @NotNull net.minecraft.nbt.CompoundTag compound)
      Read Colonies from saved NBT data.
      Parameters:
      compound - NBT Tag.
    • reset

      void reset()
      Clear the recipe list (used during shutdown)