Package etithespirit.orimod.util
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
ConstructorsModifierConstructorDescriptionprotected
RichEffect
(net.minecraft.world.effect.MobEffectCategory typeIn, int liquidColorIn) -
Method Summary
Modifier and TypeMethodDescriptionabstract net.minecraft.world.effect.MobEffectCategory
Returns the default type for this effect.abstract int
getColor()
Returns the default color for this effect.abstract net.minecraft.resources.ResourceLocation
Returns theResourceLocation
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 classnet.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 classnet.minecraft.world.effect.MobEffect
- Returns:
- The custom color. 0x00RRGGBB
-
getCustomIcon
public abstract net.minecraft.resources.ResourceLocation getCustomIcon()Returns theResourceLocation
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
- Overrides:
getEffectRendererInternal
in classnet.minecraft.world.effect.MobEffect
-