public class Potion
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static Potion |
absorption
The absorption Potion object.
|
static Potion |
blindness
The blindness Potion object.
|
static Potion |
confusion |
static Potion |
damageBoost |
static Potion |
digSlowdown |
static Potion |
digSpeed |
static Potion |
field_180143_D |
static Potion |
field_180144_E |
static Potion |
field_180145_F |
static Potion |
field_180146_G |
static Potion |
field_180147_A |
static Potion |
field_180148_B |
static Potion |
field_180149_C |
static Potion |
field_180151_b |
static Potion |
field_180153_z |
static Potion |
fireResistance
The fire resistance Potion object.
|
static Potion |
harm |
static Potion |
heal |
static Potion |
healthBoost
The health boost Potion object.
|
static Potion |
hunger
The hunger Potion object.
|
int |
id
The Id of a Potion object.
|
static Potion |
invisibility
The invisibility Potion object.
|
static Potion |
jump |
static Potion |
moveSlowdown |
static Potion |
moveSpeed |
static Potion |
nightVision
The night vision Potion object.
|
static Potion |
poison
The poison Potion object.
|
static Potion[] |
potionTypes
The array of potion types.
|
static Potion |
regeneration
The regeneration Potion object.
|
static Potion |
resistance |
static Potion |
saturation
The saturation Potion object.
|
static Potion |
waterBreathing
The water breathing Potion object.
|
static Potion |
weakness
The weakness Potion object.
|
static Potion |
wither
The wither Potion object.
|
Modifier | Constructor and Description |
---|---|
protected |
Potion(int potionID,
ResourceLocation location,
boolean badEffect,
int potionColor)
Deprecated.
|
protected |
Potion(ResourceLocation location,
boolean badEffect,
int potionColor) |
Modifier and Type | Method and Description |
---|---|
void |
affectEntity(Entity p_180793_1_,
Entity p_180793_2_,
EntityLivingBase entityLivingBaseIn,
int p_180793_4_,
double p_180793_5_) |
void |
applyAttributesModifiersToEntity(EntityLivingBase entityLivingBaseIn,
BaseAttributeMap p_111185_2_,
int amplifier) |
double |
getAttributeModifierAmount(int p_111183_1_,
AttributeModifier modifier) |
java.util.Map<IAttribute,AttributeModifier> |
getAttributeModifierMap() |
static java.lang.String |
getDurationString(PotionEffect effect) |
double |
getEffectiveness() |
int |
getId()
returns the ID of the potion
|
int |
getLiquidColor()
Returns the color of the potion liquid.
|
java.lang.String |
getName()
returns the name of the potion
|
static Potion |
getPotionFromResourceLocation(java.lang.String location) |
static java.util.Set<ResourceLocation> |
getPotionLocations() |
int |
getStatusIconIndex()
Returns the index for the icon to display when the potion is active.
|
boolean |
hasStatusIcon()
Returns true if the potion has a associated status icon to display in then inventory when active.
|
boolean |
isBadEffect()
This method returns true if the potion effect is bad - negative - for the entity.
|
boolean |
isInstant()
Returns true if the potion has an instant effect instead of a continuous one (eg Harming)
|
boolean |
isReady(int p_76397_1_,
int p_76397_2_)
checks if Potion effect is ready to be applied this tick.
|
boolean |
isUsable() |
void |
performEffect(EntityLivingBase entityLivingBaseIn,
int p_76394_2_) |
Potion |
registerPotionAttributeModifier(IAttribute p_111184_1_,
java.lang.String p_111184_2_,
double p_111184_3_,
int p_111184_5_)
Used by potions to register the attribute they modify.
|
void |
removeAttributesModifiersFromEntity(EntityLivingBase entityLivingBaseIn,
BaseAttributeMap p_111187_2_,
int amplifier) |
void |
renderInventoryEffect(int x,
int y,
PotionEffect effect,
Minecraft mc)
Called to draw the this Potion onto the player's inventory when it's active.
|
protected Potion |
setEffectiveness(double effectivenessIn) |
protected Potion |
setIconIndex(int p_76399_1_,
int p_76399_2_)
Sets the index for the icon displayed in the player's inventory when the status is active.
|
Potion |
setPotionName(java.lang.String nameIn)
Set the potion name.
|
boolean |
shouldRender(PotionEffect effect)
If the Potion effect should be displayed in the players inventory
|
boolean |
shouldRenderInvText(PotionEffect effect)
If the standard PotionEffect text (name and duration) should be drawn when this potion is active.
|
public static final Potion[] potionTypes
public static final Potion field_180151_b
public static final Potion moveSpeed
public static final Potion moveSlowdown
public static final Potion digSpeed
public static final Potion digSlowdown
public static final Potion damageBoost
public static final Potion heal
public static final Potion harm
public static final Potion jump
public static final Potion confusion
public static final Potion regeneration
public static final Potion resistance
public static final Potion fireResistance
public static final Potion waterBreathing
public static final Potion invisibility
public static final Potion blindness
public static final Potion nightVision
public static final Potion hunger
public static final Potion weakness
public static final Potion poison
public static final Potion wither
public static final Potion healthBoost
public static final Potion absorption
public static final Potion saturation
public static final Potion field_180153_z
public static final Potion field_180147_A
public static final Potion field_180148_B
public static final Potion field_180149_C
public static final Potion field_180143_D
public static final Potion field_180144_E
public static final Potion field_180145_F
public static final Potion field_180146_G
public int id
@Deprecated protected Potion(int potionID, ResourceLocation location, boolean badEffect, int potionColor)
protected Potion(ResourceLocation location, boolean badEffect, int potionColor)
public static Potion getPotionFromResourceLocation(java.lang.String location)
public static java.util.Set<ResourceLocation> getPotionLocations()
protected Potion setIconIndex(int p_76399_1_, int p_76399_2_)
public int getId()
public void performEffect(EntityLivingBase entityLivingBaseIn, int p_76394_2_)
public void affectEntity(Entity p_180793_1_, Entity p_180793_2_, EntityLivingBase entityLivingBaseIn, int p_180793_4_, double p_180793_5_)
public boolean isInstant()
public boolean isReady(int p_76397_1_, int p_76397_2_)
public Potion setPotionName(java.lang.String nameIn)
public java.lang.String getName()
protected Potion setEffectiveness(double effectivenessIn)
public boolean hasStatusIcon()
public int getStatusIconIndex()
public boolean isBadEffect()
public static java.lang.String getDurationString(PotionEffect effect)
public double getEffectiveness()
public boolean isUsable()
public int getLiquidColor()
public Potion registerPotionAttributeModifier(IAttribute p_111184_1_, java.lang.String p_111184_2_, double p_111184_3_, int p_111184_5_)
public void removeAttributesModifiersFromEntity(EntityLivingBase entityLivingBaseIn, BaseAttributeMap p_111187_2_, int amplifier)
public java.util.Map<IAttribute,AttributeModifier> getAttributeModifierMap()
public void applyAttributesModifiersToEntity(EntityLivingBase entityLivingBaseIn, BaseAttributeMap p_111185_2_, int amplifier)
public double getAttributeModifierAmount(int p_111183_1_, AttributeModifier modifier)
public boolean shouldRender(PotionEffect effect)
effect
- the active PotionEffectpublic boolean shouldRenderInvText(PotionEffect effect)
effect
- the active PotionEffectpublic void renderInventoryEffect(int x, int y, PotionEffect effect, Minecraft mc)
x
- the x coordinatey
- the y coordinateeffect
- the active PotionEffectmc
- the Minecraft instance, for convenience