Class ResearchListener

java.lang.Object
net.minecraft.server.packs.resources.SimplePreparableReloadListener<Map<net.minecraft.resources.ResourceLocation,com.google.gson.JsonElement>>
net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener
com.minecolonies.core.datalistener.ResearchListener
All Implemented Interfaces:
net.minecraft.server.packs.resources.PreparableReloadListener

public class ResearchListener extends net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener
Loader for Json-based researches
  • 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 String
    The property name that indicates this recipe describes a research effect.
    static final String
    The property name that indicates this recipe describes a research effect.
    static final String
    The property name for automatic start of research, when its requirements are fulfilled.
    static final String
    The property name that indicates research branch.
    static final String
    The property name of a single research effect its ID.
    static final String
    The property name of a single research effect its level.
    static final String
    The property name for the list of research completion effects
    static final String
    The property name for the research which is only visible when its requirements are fulfilled.
    static final String
    The property name for instant(ish) completion of research, when its requirements are completed.
    static final String
    The property name for Required University Level.
    static final String
    The optional property name that indicates research name, as presented to users, or a translation key to be transformed.
    static final String
    The property name that indicates this recipe removes research.
    static final String
    The property name for the sort order tag.
    static final String
    The property name for the sort order tag.
    static final String
    The optional property name that indicates research subtitle, as presented to users, or a translation key.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Set up the core loading, with the directory in the data pack that contains this data Directory is: namespace/researches/path
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    apply(@NotNull Map<net.minecraft.resources.ResourceLocation,com.google.gson.JsonElement> object, @NotNull net.minecraft.server.packs.resources.ResourceManager resourceManagerIn, @NotNull net.minecraft.util.profiling.ProfilerFiller profilerIn)
     

    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 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

    • EFFECT_PROP

      public static final String EFFECT_PROP
      The property name that indicates this recipe describes a research effect.
      See Also:
    • EFFECT_LEVELS_PROP

      public static final String EFFECT_LEVELS_PROP
      The property name that indicates this recipe describes a research effect.
      See Also:
    • RESEARCH_NAME_PROP

      public static final String RESEARCH_NAME_PROP
      The optional property name that indicates research name, as presented to users, or a translation key to be transformed. If not present, a translation key will be auto-generated from the ResourceLocation.
      See Also:
    • RESEARCH_SUBTITLE_PROP

      public static final String RESEARCH_SUBTITLE_PROP
      The optional property name that indicates research subtitle, as presented to users, or a translation key.
      See Also:
    • RESEARCH_BRANCH_PROP

      public static final String RESEARCH_BRANCH_PROP
      The property name that indicates research branch. Required.
      See Also:
    • RESEARCH_LEVEL_PROP

      public static final String RESEARCH_LEVEL_PROP
      The property name for Required University Level.
      See Also:
    • RESEARCH_SORT_PROP

      public static final String RESEARCH_SORT_PROP
      The property name for the sort order tag. Optional.
      See Also:
    • RESEARCH_REQUIREMENT_TYPE_PROP

      public static final String RESEARCH_REQUIREMENT_TYPE_PROP
      The property name for the sort order tag. Optional.
      See Also:
    • RESEARCH_HIDDEN_PROP

      public static final String RESEARCH_HIDDEN_PROP
      The property name for the research which is only visible when its requirements are fulfilled.
      See Also:
    • RESEARCH_AUTOSTART_PROP

      public static final String RESEARCH_AUTOSTART_PROP
      The property name for automatic start of research, when its requirements are fulfilled. This can temporarily exceed the maximum number of concurrent researches.
      See Also:
    • RESEARCH_INSTANT_PROP

      public static final String RESEARCH_INSTANT_PROP
      The property name for instant(ish) completion of research, when its requirements are completed.
      See Also:
    • RESEARCH_EFFECTS_PROP

      public static final String RESEARCH_EFFECTS_PROP
      The property name for the list of research completion effects
      See Also:
    • RESEARCH_EFFECTS_EFFECT_ID_PROP

      public static final String RESEARCH_EFFECTS_EFFECT_ID_PROP
      The property name of a single research effect its ID.
      See Also:
    • RESEARCH_EFFECTS_LEVEL_PROP

      public static final String RESEARCH_EFFECTS_LEVEL_PROP
      The property name of a single research effect its level.
      See Also:
    • RESEARCH_REMOVE_PROP

      public static final String RESEARCH_REMOVE_PROP
      The property name that indicates this recipe removes research.
      See Also:
  • Constructor Details

    • ResearchListener

      public ResearchListener()
      Set up the core loading, with the directory in the data pack that contains this data Directory is: namespace/researches/path
  • Method Details

    • apply

      protected void apply(@NotNull @NotNull Map<net.minecraft.resources.ResourceLocation,com.google.gson.JsonElement> object, @NotNull @NotNull net.minecraft.server.packs.resources.ResourceManager resourceManagerIn, @NotNull @NotNull net.minecraft.util.profiling.ProfilerFiller profilerIn)
      Specified by:
      apply in class net.minecraft.server.packs.resources.SimplePreparableReloadListener<Map<net.minecraft.resources.ResourceLocation,com.google.gson.JsonElement>>