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 Potionabsorption+ The absorption Potion object.static Potionblindness+ The blindness Potion object.static Potionconfusionstatic PotiondamageBooststatic PotiondigSlowdownstatic PotiondigSpeedstatic Potionfield_180143_Dstatic Potionfield_180144_Estatic Potionfield_180145_Fstatic Potionfield_180146_Gstatic Potionfield_180147_Astatic Potionfield_180148_Bstatic Potionfield_180149_Cstatic Potionfield_180151_bstatic Potionfield_180153_zstatic PotionfireResistance+ The fire resistance Potion object.static Potionharmstatic Potionhealstatic PotionhealthBoost+ The health boost Potion object.static Potionhunger+ The hunger Potion object.intidstatic Potioninvisibility+ The invisibility Potion object.static Potionjumpstatic PotionmoveSlowdownstatic PotionmoveSpeedstatic PotionnightVision+ The night vision Potion object.static Potionpoison+ The poison Potion object.static Potion[]potionTypes+ The array of potion types.static Potionregeneration+ The regeneration Potion object.static Potionresistancestatic Potionsaturation+ The saturation Potion object.static PotionwaterBreathing+ The water breathing Potion object.static Potionweakness+ The weakness Potion object.static Potionwither+ The wither Potion object.
-
Constructor Summary
Constructors Modifier Constructor Description protectedPotion(int potionID, ResourceLocation location, boolean badEffect, int potionColor)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaffectEntity(Entity entityLivingBaseIn, Entity parEntity2, EntityLivingBase parEntityLivingBase, int parInt1, double parDouble1)voidapplyAttributesModifiersToEntity(EntityLivingBase var1, BaseAttributeMap baseattributemap, int i)static java.util.Set<ResourceLocation>func_181168_c()doublegetAttributeModifierAmount(int i, AttributeModifier attributemodifier)java.util.Map<IAttribute,AttributeModifier>getAttributeModifierMap()static java.lang.StringgetDurationString(PotionEffect effect)doublegetEffectiveness()intgetId()+ returns the ID of the potionintgetLiquidColor()+ Returns the color of the potion liquid.java.lang.StringgetName()+ returns the name of the potionstatic PotiongetPotionFromResourceLocation(java.lang.String location)intgetStatusIconIndex()+ Returns the index for the icon to display when the potion is active.booleanhasStatusIcon()+ Returns true if the potion has a associated status icon to display in then inventory when active.booleanisBadEffect()+ This method returns true if the potion effect is bad - negative - for the entity.booleanisInstant()+ Returns true if the potion has an instant effect instead of a continuous one (eg Harming)booleanisReady(int i, int j)+ checks if Potion effect is ready to be applied this tick.booleanisUsable()voidperformEffect(EntityLivingBase entityLivingBaseIn, int parInt1)PotionregisterPotionAttributeModifier(IAttribute parIAttribute, java.lang.String parString1, double parDouble1, int parInt1)+ Used by potions to register the attribute they modify.voidremoveAttributesModifiersFromEntity(EntityLivingBase var1, BaseAttributeMap baseattributemap, int var3)protected PotionsetEffectiveness(double effectivenessIn)protected PotionsetIconIndex(int parInt1, int parInt2)+ Sets the index for the icon displayed in the player's inventory when the status is active.PotionsetPotionName(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)
-
-