Class CommonResearchCache

java.lang.Object
com.portingdeadmods.researchd.cache.CommonResearchCache

public final class CommonResearchCache extends Object
  • Field Details

    • globalResearches

      public static Map<net.minecraft.resources.ResourceKey<Research>,GlobalResearch> globalResearches
    • researchPages

      public static Map<net.minecraft.resources.ResourceLocation,ResearchPage> researchPages
    • pageRoots

      public static Map<net.minecraft.resources.ResourceLocation,List<GlobalResearch>> pageRoots
      Map of ResearchPage id to list of root nodes (GlobalResearches with no parents within that page)
    • rootResearch

      @Deprecated @Nullable public static GlobalResearch rootResearch
      Deprecated.
  • Constructor Details

    • CommonResearchCache

      public CommonResearchCache()
  • Method Details

    • initialize

      public static void initialize(net.minecraft.world.level.Level level)
    • rlPageOf

      @Nullable public static net.minecraft.resources.ResourceLocation rlPageOf(GlobalResearch res)
      Returns:
      ResourceLocation of the page that contains the researchPack, null if no page contains it
    • pageOf

      @Nullable public static ResearchPage pageOf(GlobalResearch res)
      Returns:
      ResearchPage that contains the researchPack, null if no page contains it
    • allChildrenOf

      public static List<GlobalResearch> allChildrenOf(net.minecraft.resources.ResourceKey<Research> key)
    • allParentsOf

      public static List<GlobalResearch> allParentsOf(net.minecraft.resources.ResourceKey<Research> key)
    • reset

      public static void reset()