Package net.minecraft.potion
Class Potion
- java.lang.Object
-
- net.minecraft.potion.Potion
-
- Direct Known Subclasses:
PotionAbsorption
,PotionAttackDamage
,PotionHealth
,PotionHealthBoost
public class Potion extends java.lang.Object
+ This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code. Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!" Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team EaglercraftX 1.8 patch files are (c) 2022-2023 LAX1DUDE. All Rights Reserved. WITH THE EXCEPTION OF PATCH FILES, MINIFIED JAVASCRIPT, AND ALL FILES NORMALLY FOUND IN AN UNMODIFIED MINECRAFT RESOURCE PACK, YOU ARE NOT ALLOWED TO SHARE, DISTRIBUTE, OR REPURPOSE ANY FILE USED BY OR PRODUCED BY THE SOFTWARE IN THIS REPOSITORY WITHOUT PRIOR PERMISSION FROM THE PROJECT AUTHOR. NOT FOR COMMERCIAL OR MALICIOUS USE (please read the 'LICENSE' file this repo's root directory for more info)
-
-
Field Summary
Fields Modifier and Type Field 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
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.
-
Constructor Summary
Constructors Modifier Constructor Description protected
Potion(int potionID, ResourceLocation location, boolean badEffect, int potionColor)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
affectEntity(Entity entityLivingBaseIn, Entity parEntity2, EntityLivingBase parEntityLivingBase, int parInt1, double parDouble1)
void
applyAttributesModifiersToEntity(EntityLivingBase var1, BaseAttributeMap baseattributemap, int i)
static java.util.Set<ResourceLocation>
func_181168_c()
double
getAttributeModifierAmount(int i, AttributeModifier attributemodifier)
java.util.Map<IAttribute,AttributeModifier>
getAttributeModifierMap()
static java.lang.String
getDurationString(PotionEffect effect)
double
getEffectiveness()
int
getId()
+ returns the ID of the potionint
getLiquidColor()
+ Returns the color of the potion liquid.java.lang.String
getName()
+ returns the name of the potionstatic Potion
getPotionFromResourceLocation(java.lang.String location)
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 i, int j)
+ checks if Potion effect is ready to be applied this tick.boolean
isUsable()
void
performEffect(EntityLivingBase entityLivingBaseIn, int parInt1)
Potion
registerPotionAttributeModifier(IAttribute parIAttribute, java.lang.String parString1, double parDouble1, int parInt1)
+ Used by potions to register the attribute they modify.void
removeAttributesModifiersFromEntity(EntityLivingBase var1, BaseAttributeMap baseattributemap, int var3)
protected Potion
setEffectiveness(double effectivenessIn)
protected Potion
setIconIndex(int parInt1, int parInt2)
+ 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.
-
-
-
Field Detail
-
potionTypes
public static final Potion[] potionTypes
+ The array of potion types.
-
field_180151_b
public static final Potion field_180151_b
-
moveSpeed
public static final Potion moveSpeed
-
moveSlowdown
public static final Potion moveSlowdown
-
digSpeed
public static final Potion digSpeed
-
digSlowdown
public static final Potion digSlowdown
-
damageBoost
public static final Potion damageBoost
-
heal
public static final Potion heal
-
harm
public static final Potion harm
-
jump
public static final Potion jump
-
confusion
public static final Potion confusion
-
regeneration
public static final Potion regeneration
+ The regeneration Potion object.
-
resistance
public static final Potion resistance
-
fireResistance
public static final Potion fireResistance
+ The fire resistance Potion object.
-
waterBreathing
public static final Potion waterBreathing
+ The water breathing Potion object.
-
invisibility
public static final Potion invisibility
+ The invisibility Potion object.
-
blindness
public static final Potion blindness
+ The blindness Potion object.
-
nightVision
public static final Potion nightVision
+ The night vision Potion object.
-
hunger
public static final Potion hunger
+ The hunger Potion object.
-
weakness
public static final Potion weakness
+ The weakness Potion object.
-
poison
public static final Potion poison
+ The poison Potion object.
-
wither
public static final Potion wither
+ The wither Potion object.
-
healthBoost
public static final Potion healthBoost
+ The health boost Potion object.
-
absorption
public static final Potion absorption
+ The absorption Potion object.
-
saturation
public static final Potion saturation
+ The saturation Potion object.
-
field_180153_z
public static final Potion field_180153_z
-
field_180147_A
public static final Potion field_180147_A
-
field_180148_B
public static final Potion field_180148_B
-
field_180149_C
public static final Potion field_180149_C
-
field_180143_D
public static final Potion field_180143_D
-
field_180144_E
public static final Potion field_180144_E
-
field_180145_F
public static final Potion field_180145_F
-
field_180146_G
public static final Potion field_180146_G
-
id
public final int id
-
-
Constructor Detail
-
Potion
protected Potion(int potionID, ResourceLocation location, boolean badEffect, int potionColor)
-
-
Method Detail
-
getPotionFromResourceLocation
public static Potion getPotionFromResourceLocation(java.lang.String location)
-
func_181168_c
public static java.util.Set<ResourceLocation> func_181168_c()
-
setIconIndex
protected Potion setIconIndex(int parInt1, int parInt2)
+ 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
public void performEffect(EntityLivingBase entityLivingBaseIn, int parInt1)
-
affectEntity
public void affectEntity(Entity entityLivingBaseIn, Entity parEntity2, EntityLivingBase parEntityLivingBase, int parInt1, double parDouble1)
-
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 i, int j)
+ checks if Potion effect is ready to be applied this tick.
-
setPotionName
public Potion setPotionName(java.lang.String nameIn)
+ Set the potion name.
-
getName
public java.lang.String 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
public static java.lang.String getDurationString(PotionEffect effect)
-
setEffectiveness
protected Potion setEffectiveness(double effectivenessIn)
-
getEffectiveness
public double getEffectiveness()
-
isUsable
public boolean isUsable()
-
getLiquidColor
public int getLiquidColor()
+ Returns the color of the potion liquid.
-
registerPotionAttributeModifier
public Potion registerPotionAttributeModifier(IAttribute parIAttribute, java.lang.String parString1, double parDouble1, int parInt1)
+ Used by potions to register the attribute they modify.
-
getAttributeModifierMap
public java.util.Map<IAttribute,AttributeModifier> getAttributeModifierMap()
-
removeAttributesModifiersFromEntity
public void removeAttributesModifiersFromEntity(EntityLivingBase var1, BaseAttributeMap baseattributemap, int var3)
-
applyAttributesModifiersToEntity
public void applyAttributesModifiersToEntity(EntityLivingBase var1, BaseAttributeMap baseattributemap, int i)
-
getAttributeModifierAmount
public double getAttributeModifierAmount(int i, AttributeModifier attributemodifier)
-
-