Class ResearchGraphCache
java.lang.Object
com.portingdeadmods.researchd.client.cache.ResearchGraphCache
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidadd(net.minecraft.resources.ResourceKey<Research> key, ResearchGraph graph) static voidstatic ResearchGraphcomputeIfAbsent(net.minecraft.resources.ResourceKey<Research> key) static ResearchGraphComputes or retrieves a cached ResearchGraph for the given ResearchPage.static @Nullable ResearchGraphstatic List<ResearchGraph> getAll()static @Nullable ResearchGraphgetForPage(net.minecraft.resources.ResourceLocation pageId)
-
Constructor Details
-
ResearchGraphCache
public ResearchGraphCache()
-
-
Method Details
-
add
-
get
@Nullable public static @Nullable ResearchGraph get(net.minecraft.resources.ResourceKey<Research> key) -
getForPage
@Nullable public static @Nullable ResearchGraph getForPage(net.minecraft.resources.ResourceLocation pageId) -
getAll
-
clearCache
public static void clearCache() -
computeIfAbsent
-
computeIfAbsentForPage
Computes or retrieves a cached ResearchGraph for the given ResearchPage. Currently uses the first root node of the page for graph generation.
-