Class ReloadableRegistryManager<T>

java.lang.Object
net.neoforged.neoforge.resource.ContextAwareReloadListener
net.minecraft.server.packs.resources.SimplePreparableReloadListener<Map<net.minecraft.resources.ResourceLocation,com.google.gson.JsonElement>>
net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener
com.portingdeadmods.researchd.utils.researches.ReloadableRegistryManager<T>
All Implemented Interfaces:
net.minecraft.server.packs.resources.PreparableReloadListener

public class ReloadableRegistryManager<T> extends net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener
  • Nested Class Summary

    Nested classes/interfaces inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener

    net.minecraft.server.packs.resources.PreparableReloadListener.PreparationBarrier
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.google.gson.Gson
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    ReloadableRegistryManager(net.minecraft.core.HolderLookup.Provider lookup, net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<T>> registry, com.mojang.serialization.Codec<T> codec)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    apply(Map<net.minecraft.resources.ResourceLocation,com.google.gson.JsonElement> registryEntries, net.minecraft.server.packs.resources.ResourceManager resourceManager, net.minecraft.util.profiling.ProfilerFiller profilerFiller)
     
    void
     
    Map<net.minecraft.resources.ResourceLocation,T>
     
    Map<net.minecraft.resources.ResourceKey<T>,T>
     
    boolean
     
    void
    replaceContents(Map<net.minecraft.resources.ResourceLocation,T> contents)
     

    Methods inherited from class net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener

    getPreparedPath, prepare, scanDirectory

    Methods inherited from class net.minecraft.server.packs.resources.SimplePreparableReloadListener

    reload

    Methods inherited from class net.neoforged.neoforge.resource.ContextAwareReloadListener

    getContext, getRegistryLookup, injectContext, makeConditionalOps

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener

    getName
  • Field Details

    • GSON

      public static final com.google.gson.Gson GSON
  • Constructor Details

    • ReloadableRegistryManager

      public ReloadableRegistryManager(net.minecraft.core.HolderLookup.Provider lookup, net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<T>> registry, com.mojang.serialization.Codec<T> codec)
  • Method Details

    • apply

      protected void apply(Map<net.minecraft.resources.ResourceLocation,com.google.gson.JsonElement> registryEntries, net.minecraft.server.packs.resources.ResourceManager resourceManager, net.minecraft.util.profiling.ProfilerFiller profilerFiller)
      Specified by:
      apply in class net.minecraft.server.packs.resources.SimplePreparableReloadListener<Map<net.minecraft.resources.ResourceLocation,com.google.gson.JsonElement>>
    • replaceContents

      public void replaceContents(Map<net.minecraft.resources.ResourceLocation,T> contents)
    • getLookup

      public Map<net.minecraft.resources.ResourceKey<T>,T> getLookup()
    • getByName

      public Map<net.minecraft.resources.ResourceLocation,T> getByName()
    • isFailed

      public boolean isFailed()
    • fail

      public void fail()