Class IngredientCacheBuster

java.lang.Object
com.blamejared.crafttweaker.api.ingredient.IngredientCacheBuster

public class IngredientCacheBuster extends Object
Used to bust the Ingredient#itemStacks cache when the Ingredient was resolved during a Server reload (When an instance of TagManager is available.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    Starts caching ingredients that are dissolved.
    static boolean
    Returns true if the cache buster is running.
    static void
    Stops caching dissolved Ingredients and invalidates the Ingredients that were dissolved while claimed.
    static void
    store(net.minecraft.world.item.crafting.Ingredient ingredient)
    Stores an Ingredient being dissolved to be invalidated at a later point.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • IngredientCacheBuster

      public IngredientCacheBuster()
  • Method Details

    • claim

      public static void claim()
      Starts caching ingredients that are dissolved.
    • release

      public static void release()
      Stops caching dissolved Ingredients and invalidates the Ingredients that were dissolved while claimed.
    • claimed

      public static boolean claimed()
      Returns true if the cache buster is running.
      Returns:
      true if the cache buster is running, false otherwise.
    • store

      public static void store(net.minecraft.world.item.crafting.Ingredient ingredient)
      Stores an Ingredient being dissolved to be invalidated at a later point.
      Parameters:
      ingredient - The ingredient to invalidate at a later point.