Class ResearchEffectCategory

java.lang.Object
com.minecolonies.core.research.ResearchEffectCategory

public class ResearchEffectCategory extends Object
This class represents a Type of Research Effect, including its identifier and effect levels.
  • Constructor Summary

    Constructors
    Constructor
    Description
    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.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    get(int level)
    Gets the absolute strength of the effect for a given level
    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.
    net.minecraft.resources.ResourceLocation
    Gets the unique identifier of the effect.
    int
    Gets the maximum registered level for the effect.
    Gets the name identifier of the effect.
    Gets the subtitle of the effect.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

      public String getName()
      Gets the name identifier of the effect.
      Returns:
      the effect's display name, as a human-readable text or translation key.
    • getSubtitle

      public String getSubtitle()
      Gets the subtitle of the effect.
      Returns:
      the effect's display name, as a string.