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 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 @NotNull net.minecraft.nbt.CompoundTag compound)
      Write colonies to NBT data for saving.
      Parameters:
      compound - NBT-Tag.
    • read

      void read(@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)