Package com.minecolonies.api.research
Interface ILocalResearch
- All Known Implementing Classes:
LocalResearch
public interface ILocalResearch
Interface defining how a local research at a colony is. This represents how a colony stores researches they finished or started.
-
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.resources.ResourceLocationGet the identifier of the branch.intgetDepth()Getter for the research depth.net.minecraft.resources.ResourceLocationgetId()Getter of the id of the research.intGetter for the progress of the research.getState()Get the ResearchState of the research.booleanresearch(IResearchEffectManager effects, ILocalResearchTree tree) Tick the research to execute it.voidsetProgress(int progress) Set the research progress.voidsetState(ResearchState value) Set the current research state.
-
Method Details
-
getProgress
int getProgress()Getter for the progress of the research.- Returns:
- the progress in ticks.
-
getId
net.minecraft.resources.ResourceLocation getId()Getter of the id of the research.- Returns:
- the research id, as a ResourceLocation
-
getState
ResearchState getState()Get the ResearchState of the research.- Returns:
- the current state.
-
getBranch
net.minecraft.resources.ResourceLocation getBranch()Get the identifier of the branch.- Returns:
- the branch id, as a ResourceLocation.
-
getDepth
int getDepth()Getter for the research depth.- Returns:
- the depth.
-
setState
Set the current research state.- Parameters:
value- the state to set.
-
setProgress
void setProgress(int progress) Set the research progress.- Parameters:
progress- the progress to set.
-
research
Tick the research to execute it.- Parameters:
effects- the research effects class which holds the information of the colony.tree- the research tree which holds the currently explored tree.- Returns:
- true if effective.
-