Package net.minecraft.potion
Class Effect
- java.lang.Object
-
- net.minecraftforge.registries.ForgeRegistryEntry<Effect>
-
- net.minecraft.potion.Effect
-
- All Implemented Interfaces:
IForgeEffect
,IForgeRegistryEntry<Effect>
- Direct Known Subclasses:
AbsorptionEffect
,AttackDamageEffect
,HealthBoostEffect
,InstantEffect
public class Effect extends ForgeRegistryEntry<Effect> implements IForgeEffect
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.minecraftforge.registries.ForgeRegistryEntry
ForgeRegistryEntry.UncheckedRegistryEntry<V extends IForgeRegistryEntry<V>>
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<Attribute,AttributeModifier>
attributeModifiers
private EffectType
category
private int
color
private java.lang.String
descriptionId
-
Fields inherited from class net.minecraftforge.registries.ForgeRegistryEntry
delegate
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Effect(EffectType p_i50391_1_, int p_i50391_2_)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Effect
addAttributeModifier(Attribute p_220304_1_, java.lang.String p_220304_2_, double p_220304_3_, AttributeModifier.Operation p_220304_5_)
void
addAttributeModifiers(LivingEntity p_111185_1_, AttributeModifierManager p_111185_2_, int p_111185_3_)
void
applyEffectTick(LivingEntity p_76394_1_, int p_76394_2_)
void
applyInstantenousEffect(Entity p_180793_1_, Entity p_180793_2_, LivingEntity p_180793_3_, int p_180793_4_, double p_180793_5_)
static Effect
byId(int p_188412_0_)
java.util.Map<Attribute,AttributeModifier>
getAttributeModifiers()
double
getAttributeModifierValue(int p_111183_1_, AttributeModifier p_111183_2_)
EffectType
getCategory()
int
getColor()
java.lang.String
getDescriptionId()
ITextComponent
getDisplayName()
static int
getId(Effect p_188409_0_)
protected java.lang.String
getOrCreateDescriptionId()
boolean
isBeneficial()
boolean
isDurationEffectTick(int p_76397_1_, int p_76397_2_)
boolean
isInstantenous()
void
removeAttributeModifiers(LivingEntity p_111187_1_, AttributeModifierManager p_111187_2_, int p_111187_3_)
-
Methods inherited from class net.minecraftforge.registries.ForgeRegistryEntry
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryName
-
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.IForgeEffect
getCurativeItems, getEffect, getGuiSortColor, renderHUDEffect, renderInventoryEffect, shouldRender, shouldRenderHUD, shouldRenderInvText
-
-
-
-
Field Detail
-
attributeModifiers
private final java.util.Map<Attribute,AttributeModifier> attributeModifiers
-
category
private final EffectType category
-
color
private final int color
-
descriptionId
@Nullable private java.lang.String descriptionId
-
-
Constructor Detail
-
Effect
protected Effect(EffectType p_i50391_1_, int p_i50391_2_)
-
-
Method Detail
-
byId
@Nullable public static Effect byId(int p_188412_0_)
-
getId
public static int getId(Effect p_188409_0_)
-
applyEffectTick
public void applyEffectTick(LivingEntity p_76394_1_, int p_76394_2_)
-
applyInstantenousEffect
public void applyInstantenousEffect(@Nullable Entity p_180793_1_, @Nullable Entity p_180793_2_, LivingEntity p_180793_3_, int p_180793_4_, double p_180793_5_)
-
isDurationEffectTick
public boolean isDurationEffectTick(int p_76397_1_, int p_76397_2_)
-
isInstantenous
public boolean isInstantenous()
-
getOrCreateDescriptionId
protected java.lang.String getOrCreateDescriptionId()
-
getDescriptionId
public java.lang.String getDescriptionId()
-
getDisplayName
public ITextComponent getDisplayName()
-
getCategory
public EffectType getCategory()
-
getColor
public int getColor()
-
addAttributeModifier
public Effect addAttributeModifier(Attribute p_220304_1_, java.lang.String p_220304_2_, double p_220304_3_, AttributeModifier.Operation p_220304_5_)
-
getAttributeModifiers
public java.util.Map<Attribute,AttributeModifier> getAttributeModifiers()
-
removeAttributeModifiers
public void removeAttributeModifiers(LivingEntity p_111187_1_, AttributeModifierManager p_111187_2_, int p_111187_3_)
-
addAttributeModifiers
public void addAttributeModifiers(LivingEntity p_111185_1_, AttributeModifierManager p_111185_2_, int p_111185_3_)
-
getAttributeModifierValue
public double getAttributeModifierValue(int p_111183_1_, AttributeModifier p_111183_2_)
-
isBeneficial
public boolean isBeneficial()
-
-