Class RichEffect

java.lang.Object
net.minecraft.world.effect.MobEffect
etithespirit.orimod.util.RichEffect
All Implemented Interfaces:
net.minecraftforge.common.extensions.IForgeMobEffect
Direct Known Subclasses:
DecayEffect, RadiantEffect

public abstract class RichEffect extends net.minecraft.world.effect.MobEffect
This class allows for overriding the rendered text color of the status effect. It also allows rendering custom icons trivially easily.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
     
     
    protected
    RichEffect(net.minecraft.world.effect.MobEffectCategory typeIn, int liquidColorIn)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract net.minecraft.world.effect.MobEffectCategory
    Returns the default type for this effect.
    abstract int
    Returns the default color for this effect.
    abstract net.minecraft.resources.ResourceLocation
    Returns the ResourceLocation representing the image to be used as this effect's icon.
     
    int
     
    int
     

    Methods inherited from class net.minecraft.world.effect.MobEffect

    addAttributeModifier, addAttributeModifiers, applyEffectTick, applyInstantenousEffect, byId, createFactorData, getAttributeModifiers, getAttributeModifierValue, getDescriptionId, getDisplayName, getId, getIdFromNullable, getOrCreateDescriptionId, initializeClient, isBeneficial, isDurationEffectTick, isInstantenous, removeAttributeModifiers, setFactorDataFactory

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.minecraftforge.common.extensions.IForgeMobEffect

    getCurativeItems, getSortOrder
  • Constructor Details

    • RichEffect

      public RichEffect()
    • RichEffect

      protected RichEffect(net.minecraft.world.effect.MobEffectCategory typeIn, int liquidColorIn)
  • Method Details

    • getCategory

      public abstract net.minecraft.world.effect.MobEffectCategory getCategory()
      Returns the default type for this effect. This value is cached and this method will only be called once.
      Overrides:
      getCategory in class net.minecraft.world.effect.MobEffect
      Returns:
      The type of effect.
    • getColor

      public abstract int getColor()
      Returns the default color for this effect. This value is cached and this method will only be called once.
      Overrides:
      getColor in class net.minecraft.world.effect.MobEffect
      Returns:
      The custom color. 0x00RRGGBB
    • getCustomIcon

      public abstract net.minecraft.resources.ResourceLocation getCustomIcon()
      Returns the ResourceLocation representing the image to be used as this effect's icon. It may return null if a default icon is used.
      Returns:
      The custom icon, or null to use a vanilla icon as defined by MobEffect.
    • getTextMainColor

      public int getTextMainColor()
      Returns:
      The color of the text foreground.
    • getTextShadowColor

      public int getTextShadowColor()
      Returns:
      The color of the text shadow.
    • getEffectRendererInternal

      public Object getEffectRendererInternal()
      Overrides:
      getEffectRendererInternal in class net.minecraft.world.effect.MobEffect