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
FieldsModifier and TypeFieldDescriptionstatic final StringThe property name that indicates this recipe describes a research effect.static final StringThe property name that indicates this recipe describes a research effect.static final StringThe property name for automatic start of research, when its requirements are fulfilled.static final StringThe property name that indicates research branch.static final StringThe property name of a single research effect its ID.static final StringThe property name of a single research effect its level.static final StringThe property name for the list of research completion effectsstatic final StringThe property name for the research which is only visible when its requirements are fulfilled.static final StringThe property name for instant(ish) completion of research, when its requirements are completed.static final StringThe property name for Required University Level.static final StringThe optional property name that indicates research name, as presented to users, or a translation key to be transformed.static final StringThe property name that indicates this recipe removes research.static final StringThe property name for the sort order tag.static final StringThe property name for the sort order tag.static final StringThe optional property name that indicates research subtitle, as presented to users, or a translation key. -
Constructor Summary
ConstructorsConstructorDescriptionSet up the core loading, with the directory in the data pack that contains this data Directory is: namespace/researches/path -
Method Summary
Methods inherited from class net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener
getPreparedPath, prepare, scanDirectoryMethods inherited from class net.minecraft.server.packs.resources.SimplePreparableReloadListener
reloadMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener
getName
-
Field Details
-
EFFECT_PROP
The property name that indicates this recipe describes a research effect.- See Also:
-
EFFECT_LEVELS_PROP
The property name that indicates this recipe describes a research effect.- See Also:
-
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
The optional property name that indicates research subtitle, as presented to users, or a translation key.- See Also:
-
RESEARCH_BRANCH_PROP
The property name that indicates research branch. Required.- See Also:
-
RESEARCH_LEVEL_PROP
The property name for Required University Level.- See Also:
-
RESEARCH_SORT_PROP
The property name for the sort order tag. Optional.- See Also:
-
RESEARCH_REQUIREMENT_TYPE_PROP
The property name for the sort order tag. Optional.- See Also:
-
RESEARCH_HIDDEN_PROP
The property name for the research which is only visible when its requirements are fulfilled.- See Also:
-
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
The property name for instant(ish) completion of research, when its requirements are completed.- See Also:
-
RESEARCH_EFFECTS_PROP
The property name for the list of research completion effects- See Also:
-
RESEARCH_EFFECTS_EFFECT_ID_PROP
The property name of a single research effect its ID.- See Also:
-
RESEARCH_EFFECTS_LEVEL_PROP
The property name of a single research effect its level.- See Also:
-
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:
applyin classnet.minecraft.server.packs.resources.SimplePreparableReloadListener<Map<net.minecraft.resources.ResourceLocation,com.google.gson.JsonElement>>
-