Package com.minecolonies.core.research
Class ResearchEffectCategory
java.lang.Object
com.minecolonies.core.research.ResearchEffectCategory
This class represents a Type of Research Effect, including its identifier and effect levels.
-
Constructor Summary
ConstructorsConstructorDescriptionResearchEffectCategory(net.minecraft.resources.ResourceLocation effectId, String effectName, String subtitle, List<Double> levels) Constructor for the research effect Category, including effect id, display name, effect type. -
Method Summary
Modifier and TypeMethodDescriptiondoubleget(int level) Gets the absolute strength of the effect for a given leveldoublegetDisplay(int level) Gets the relative strength of the effect for a given level of effect compared to the strength of the previous level.net.minecraft.resources.ResourceLocationgetId()Gets the unique identifier of the effect.intGets the maximum registered level for the effect.getName()Gets the name identifier of the effect.Gets the subtitle of the effect.
-
Constructor Details
-
ResearchEffectCategory
public ResearchEffectCategory(net.minecraft.resources.ResourceLocation effectId, String effectName, String subtitle, List<Double> levels) Constructor for the research effect Category, including effect id, display name, effect type.- Parameters:
effectId- the unique identifier of the effect category.effectName- the display name of the effect category.subtitle- the optional subtitle.
-
-
Method Details
-
getDisplay
public double getDisplay(int level) Gets the relative strength of the effect for a given level of effect compared to the strength of the previous level. Generally used for display purposes.- Parameters:
level- the level of effect.- Returns:
- the relative strength of the effect at that level.
-
get
public double get(int level) Gets the absolute strength of the effect for a given level- Parameters:
level- the level of effect.- Returns:
- the absolute strength of the effect at that level.
-
getMaxLevel
public int getMaxLevel()Gets the maximum registered level for the effect.- Returns:
- the maximum level of the effect.
-
getId
public net.minecraft.resources.ResourceLocation getId()Gets the unique identifier of the effect.- Returns:
- the effect id, as a
ResourceLocation.
-
getName
Gets the name identifier of the effect.- Returns:
- the effect's display name, as a human-readable text or translation key.
-
getSubtitle
Gets the subtitle of the effect.- Returns:
- the effect's display name, as a string.
-