Package net.minecraft.src
Class Potion
java.lang.Object
net.minecraft.src.Potion
- Direct Known Subclasses:
PotionAbsoption,PotionAttackDamage,PotionHealth,PotionHealthBoost
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PotionThe blindness Potion object.static final Potionstatic final Potionstatic final Potionstatic final Potionstatic final Potionstatic final Potionstatic final Potionstatic final Potionstatic final Potionstatic final Potionstatic final Potionstatic final Potionstatic final Potionstatic final Potionstatic final Potionstatic final Potionstatic final PotionThe fire resistance Potion object.static final Potionstatic final Potionstatic final PotionThe hunger Potion object.final intThe Id of a Potion object.static final PotionThe invisibility Potion object.static final PotionintIs the color of the liquid for this potion.static final Potionstatic final PotionThe name of the Potion.static final PotionThe night vision Potion object.intstatic final PotionThe poison Potion object.static final Potion[]The array of potion types.static final PotionThe regeneration Potion object.static final Potionprotected intstatic final PotionThe water breathing Potion object.static final PotionThe weakness Potion object.static final PotionThe wither Potion object. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaffectEntity(EntityLivingBase par1EntityLivingBase, EntityLivingBase par2EntityLivingBase, int par3, double par4) Hits the provided entity with this potion's instant effect.voidapplyAttributesModifiersToEntity(EntityLivingBase par1EntityLivingBase, BaseAttributeMap par2BaseAttributeMap, int par3) doublefunc_111183_a(int par1, AttributeModifier par2AttributeModifier) func_111184_a(Attribute par1Attribute, String par2Str, double par3, int par5) static StringgetDurationString(PotionEffect par0PotionEffect) doubleintgetId()returns the ID of the potionintReturns the color of the potion liquid.getName()returns the name of the potionintReturns the index for the icon to display when the potion is active.intbooleanReturns true if the potion has a associated status icon to display in then inventory when active.booleanThis method returns true if the potion effect is bad - negative - for the entity.booleanReturns true if the potion has an instant effect instead of a continuous one (eg Harming)booleanisReady(int par1, int par2) checks if Potion effect is ready to be applied this tick.booleanisUsable()voidperformEffect(EntityLivingBase par1EntityLivingBase, int par2) voidremoveAttributesModifiersFromEntity(EntityLivingBase par1EntityLivingBase, BaseAttributeMap par2BaseAttributeMap, int par3) protected PotionsetEffectiveness(double par1) setIconIndex(int par1, int par2) Sets the index for the icon displayed in the player's inventory when the status is active.setPotionName(String par1Str) Set the potion name.
-
Field Details
-
potionTypes
The array of potion types. -
field_76423_b
-
moveSpeed
-
moveSlowdown
-
digSpeed
-
digSlowdown
-
damageBoost
-
heal
-
harm
-
jump
-
confusion
-
regeneration
The regeneration Potion object. -
resistance
-
fireResistance
The fire resistance Potion object. -
waterBreathing
The water breathing Potion object. -
invisibility
The invisibility Potion object. -
blindness
The blindness Potion object. -
nightVision
The night vision Potion object. -
hunger
The hunger Potion object. -
weakness
The weakness Potion object. -
poison
The poison Potion object. -
wither
The wither Potion object. -
field_76434_w
-
field_76444_x
-
field_76443_y
-
field_76442_z
-
field_76409_A
-
field_76410_B
-
field_76411_C
-
field_76405_D
-
field_76406_E
-
field_76407_F
-
field_76408_G
-
id
public final int idThe Id of a Potion object. -
liquidColor
public int liquidColorIs the color of the liquid for this potion. -
name
The name of the Potion. -
origColor
@Environment(CLIENT) public int origColor -
tickEveryBase
protected int tickEveryBase
-
-
Constructor Details
-
Potion
public Potion(int par1, boolean par2, int par3) -
Potion
public Potion(int par1, boolean par2, int par3, int tickEveryBase)
-
-
Method Details
-
setIconIndex
Sets the index for the icon displayed in the player's inventory when the status is active. -
getId
public int getId()returns the ID of the potion -
performEffect
-
affectEntity
public void affectEntity(EntityLivingBase par1EntityLivingBase, EntityLivingBase par2EntityLivingBase, int par3, double par4) Hits the provided entity with this potion's instant effect. -
isInstant
public boolean isInstant()Returns true if the potion has an instant effect instead of a continuous one (eg Harming) -
isReady
public boolean isReady(int par1, int par2) checks if Potion effect is ready to be applied this tick. -
setPotionName
Set the potion name. -
getName
returns the name of the potion -
hasStatusIcon
public boolean hasStatusIcon()Returns true if the potion has a associated status icon to display in then inventory when active. -
getStatusIconIndex
public int getStatusIconIndex()Returns the index for the icon to display when the potion is active. -
isBadEffect
public boolean isBadEffect()This method returns true if the potion effect is bad - negative - for the entity. -
getDurationString
-
setEffectiveness
-
getEffectiveness
public double getEffectiveness() -
isUsable
public boolean isUsable() -
getLiquidColor
public int getLiquidColor()Returns the color of the potion liquid. -
func_111184_a
-
func_111186_k
-
removeAttributesModifiersFromEntity
public void removeAttributesModifiersFromEntity(EntityLivingBase par1EntityLivingBase, BaseAttributeMap par2BaseAttributeMap, int par3) -
applyAttributesModifiersToEntity
public void applyAttributesModifiersToEntity(EntityLivingBase par1EntityLivingBase, BaseAttributeMap par2BaseAttributeMap, int par3) -
func_111183_a
-
getTickEveryBase
public int getTickEveryBase()
-