Class SidedReloadableCache<T>
java.lang.Object
net.darkhax.bookshelf.common.api.function.SidedReloadableCache<T>
- All Implemented Interfaces:
Function<net.minecraft.world.level.Level,T>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(net.minecraft.world.level.Level level) voidgetCache(net.minecraft.world.level.Level level) voidvoidinvalidate(net.minecraft.world.level.Level level) booleanisCached(net.minecraft.world.level.Level level) <R> Rstatic <T> SidedReloadableCache<T> static <T extends net.minecraft.world.item.crafting.Recipe<?>>
SidedReloadableCache<Map<net.minecraft.resources.ResourceLocation, net.minecraft.world.item.crafting.RecipeHolder<T>>>
-
Constructor Details
-
SidedReloadableCache
-
-
Method Details
-
getCache
-
apply
-
invalidate
public void invalidate(net.minecraft.world.level.Level level) -
isCached
public boolean isCached(net.minecraft.world.level.Level level) -
apply
-
ifPresent
-
map
-
of
-
recipes
public static <T extends net.minecraft.world.item.crafting.Recipe<?>> SidedReloadableCache<Map<net.minecraft.resources.ResourceLocation,net.minecraft.world.item.crafting.RecipeHolder<T>>> recipes(Supplier<net.minecraft.world.item.crafting.RecipeType<T>> type)
-