java.lang.Object
com.minecolonies.core.colony.requestsystem.management.manager.StandardRecipeManager
All Implemented Interfaces:
IRecipeManager

public class StandardRecipeManager extends Object implements IRecipeManager
  • Constructor Details

    • StandardRecipeManager

      public StandardRecipeManager()
  • Method Details

    • getRecipes

      public com.google.common.collect.ImmutableMap<IToken<?>,IRecipeStorage> getRecipes()
      Description copied from interface: IRecipeManager
      Get a unmodifiable copy of the recipes map.
      Specified by:
      getRecipes in interface IRecipeManager
      Returns:
      a map of Token, RecipeStorage.
    • getRecipe

      public IRecipeStorage getRecipe(IToken<?> token)
      Description copied from interface: IRecipeManager
      Get a recipe from the storage.
      Specified by:
      getRecipe in interface IRecipeManager
      Parameters:
      token - the unique token.
      Returns:
      the recipe.
    • addRecipe

      public IToken<?> addRecipe(IRecipeStorage storage)
      Description copied from interface: IRecipeManager
      Add a recipe to the map.
      Specified by:
      addRecipe in interface IRecipeManager
      Parameters:
      storage - the recipe to add
      Returns:
      the IToken.
    • checkOrAddRecipe

      public IToken<?> checkOrAddRecipe(IRecipeStorage storage)
      Description copied from interface: IRecipeManager
      Check if recipe is in map already, if not. Add a recipe to the map.
      Specified by:
      checkOrAddRecipe in interface IRecipeManager
      Parameters:
      storage - the recipe to add
      Returns:
      the iToken.
    • getRecipeId

      public IToken<?> getRecipeId(IRecipeStorage storage)
      Description copied from interface: IRecipeManager
      Get the recipe id of a given recipeStorage.
      Specified by:
      getRecipeId in interface IRecipeManager
      Parameters:
      storage - the storage.
      Returns:
      the id or null if inexistent.
    • write

      public void write(@NotNull net.minecraft.core.HolderLookup.Provider provider, @NotNull @NotNull net.minecraft.nbt.CompoundTag compound)
      Description copied from interface: IRecipeManager
      Write colonies to NBT data for saving.
      Specified by:
      write in interface IRecipeManager
      Parameters:
      compound - NBT-Tag.
    • read

      public void read(@NotNull net.minecraft.core.HolderLookup.Provider provider, @NotNull @NotNull net.minecraft.nbt.CompoundTag compound)
      Description copied from interface: IRecipeManager
      Read Colonies from saved NBT data.
      Specified by:
      read in interface IRecipeManager
      Parameters:
      compound - NBT Tag.
    • reset

      public void reset()
      Description copied from interface: IRecipeManager
      Clear the recipe list (used during shutdown)
      Specified by:
      reset in interface IRecipeManager
    • registerUse

      public void registerUse(IToken<?> token)
      Description copied from interface: IRecipeManager
      Register the recipe as used with the recipe manager
      Specified by:
      registerUse in interface IRecipeManager
      Parameters:
      token - the recipe token