public class Effect extends ForgeRegistryEntry<Effect> implements IForgeEffect
delegate
修飾子 | コンストラクタと説明 |
---|---|
protected |
Effect(EffectType typeIn,
int liquidColorIn) |
修飾子とタイプ | メソッドと説明 |
---|---|
Effect |
addAttributesModifier(IAttribute attributeIn,
java.lang.String uuid,
double amount,
AttributeModifier.Operation operation)
Adds an attribute modifier to this effect.
|
void |
affectEntity(Entity source,
Entity indirectSource,
LivingEntity entityLivingBaseIn,
int amplifier,
double health) |
void |
applyAttributesModifiersToEntity(LivingEntity entityLivingBaseIn,
AbstractAttributeMap attributeMapIn,
int amplifier) |
static Effect |
get(int potionID)
Gets a Potion from the potion registry using a numeric Id.
|
double |
getAttributeModifierAmount(int amplifier,
AttributeModifier modifier) |
java.util.Map<IAttribute,AttributeModifier> |
getAttributeModifierMap() |
ITextComponent |
getDisplayName() |
EffectType |
getEffectType() |
static int |
getId(Effect potionIn)
Gets the numeric Id associated with a potion.
|
int |
getLiquidColor()
Returns the color of the potion liquid.
|
java.lang.String |
getName()
returns the name of the potion
|
protected java.lang.String |
getOrCreateDescriptionId() |
boolean |
isBeneficial()
Get if the potion is beneficial to the player.
|
boolean |
isInstant()
Returns true if the potion has an instant effect instead of a continuous one (eg Harming)
|
boolean |
isReady(int duration,
int amplifier)
checks if Potion effect is ready to be applied this tick.
|
void |
performEffect(LivingEntity entityLivingBaseIn,
int amplifier) |
void |
removeAttributesModifiersFromEntity(LivingEntity entityLivingBaseIn,
AbstractAttributeMap attributeMapIn,
int amplifier) |
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCurativeItems, getEffect, getGuiSortColor, renderHUDEffect, renderInventoryEffect, shouldRender, shouldRenderHUD, shouldRenderInvText
protected Effect(EffectType typeIn, int liquidColorIn)
@Nullable public static Effect get(int potionID)
public static int getId(Effect potionIn)
public void performEffect(LivingEntity entityLivingBaseIn, int amplifier)
public void affectEntity(@Nullable Entity source, @Nullable Entity indirectSource, LivingEntity entityLivingBaseIn, int amplifier, double health)
public boolean isReady(int duration, int amplifier)
public boolean isInstant()
protected java.lang.String getOrCreateDescriptionId()
public java.lang.String getName()
public ITextComponent getDisplayName()
public EffectType getEffectType()
public int getLiquidColor()
public Effect addAttributesModifier(IAttribute attributeIn, java.lang.String uuid, double amount, AttributeModifier.Operation operation)
public java.util.Map<IAttribute,AttributeModifier> getAttributeModifierMap()
public void removeAttributesModifiersFromEntity(LivingEntity entityLivingBaseIn, AbstractAttributeMap attributeMapIn, int amplifier)
public void applyAttributesModifiersToEntity(LivingEntity entityLivingBaseIn, AbstractAttributeMap attributeMapIn, int amplifier)
public double getAttributeModifierAmount(int amplifier, AttributeModifier modifier)
public boolean isBeneficial()