Class IngredientCacheBuster
java.lang.Object
com.blamejared.crafttweaker.api.ingredient.IngredientCacheBuster
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 -
Method Summary
Modifier and TypeMethodDescriptionstatic voidclaim()Starts caching ingredients that are dissolved.static booleanclaimed()Returns true if the cache buster is running.static voidrelease()Stops caching dissolvedIngredients and invalidates theIngredients that were dissolved while claimed.static voidstore(net.minecraft.world.item.crafting.Ingredient ingredient) Stores anIngredientbeing dissolved to be invalidated at a later point.
-
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 dissolvedIngredients and invalidates theIngredients 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 anIngredientbeing dissolved to be invalidated at a later point.- Parameters:
ingredient- The ingredient to invalidate at a later point.
-