Class 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 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)
      • 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.
      • removeAttributesModifiersFromEntity

        public void removeAttributesModifiersFromEntity​(EntityLivingBase var1,
                                                        BaseAttributeMap baseattributemap,
                                                        int var3)
      • getAttributeModifierAmount

        public double getAttributeModifierAmount​(int i,
                                                 AttributeModifier attributemodifier)