Interface IGlobalResearchFactory
- All Superinterfaces:
IFactory<FactoryVoidInput,IGlobalResearch>
- All Known Implementing Classes:
GlobalResearchFactory
Interface for the IResearchFactory which is responsible for creating and maintaining Research objects.
-
Method Summary
Modifier and TypeMethodDescriptiondefault @NotNull IGlobalResearchgetNewInstance(@NotNull IFactoryController factoryController, @NotNull FactoryVoidInput token, @NotNull Object... context) Method to get a new instance of the output given the input and additional context data.@NotNull IGlobalResearchgetNewInstance(net.minecraft.resources.ResourceLocation id, net.minecraft.resources.ResourceLocation parent, net.minecraft.resources.ResourceLocation branch, net.minecraft.network.chat.contents.TranslatableContents name, net.minecraft.network.chat.contents.TranslatableContents subtitle, int depth, int sortOrder, boolean onlyChild, boolean hidden, boolean autostart, boolean instant, boolean immutable) Method to get a new Instance of research.Methods inherited from interface com.minecolonies.api.colony.requestsystem.factory.IFactory
deserialize, deserialize, getFactoryInputType, getFactoryOutputType, getSerializationId, serialize, serialize
-
Method Details
-
getNewInstance
@NotNull default @NotNull IGlobalResearch getNewInstance(@NotNull @NotNull IFactoryController factoryController, @NotNull @NotNull FactoryVoidInput token, @NotNull @NotNull Object... context) Description copied from interface:IFactoryMethod to get a new instance of the output given the input and additional context data.- Specified by:
getNewInstancein interfaceIFactory<FactoryVoidInput,IGlobalResearch> - Parameters:
factoryController- The controller calling this factory method.token- The input to build a new output for.context- The context of the request.- Returns:
- The new output instance for a given input.
-
getNewInstance
@NotNull @NotNull IGlobalResearch getNewInstance(net.minecraft.resources.ResourceLocation id, net.minecraft.resources.ResourceLocation parent, net.minecraft.resources.ResourceLocation branch, net.minecraft.network.chat.contents.TranslatableContents name, net.minecraft.network.chat.contents.TranslatableContents subtitle, int depth, int sortOrder, boolean onlyChild, boolean hidden, boolean autostart, boolean instant, boolean immutable) Method to get a new Instance of research.- Parameters:
id- its id.parent- the research's parent, if one is present, or null if not.branch- the branch it is on.name- the optional name of the research. If empty, a key generated from the id will be used instead.subtitle- the optional short description of the research, in plaintext or as a translation key.depth- the depth in the tree.sortOrder- the relative vertical order of the research's display, in relation to its siblings.onlyChild- if the research allows only one child research to be completed.hidden- if the research is only visible when eligible to be researched.autostart- if the research should begin automatically, or notify the player, when it is eligible.instant- if the research should be completed instantly (ish) from when begun.immutable- if the research can not be reset once unlocked.- Returns:
- a new instance of research.
-