Class PotionEffect


  • public class PotionEffect
    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)
    • Constructor Detail

      • PotionEffect

        public PotionEffect​(int id,
                            int effectDuration)
      • PotionEffect

        public PotionEffect​(int id,
                            int effectDuration,
                            int effectAmplifier)
      • PotionEffect

        public PotionEffect​(int id,
                            int effectDuration,
                            int effectAmplifier,
                            boolean ambient,
                            boolean showParticles)
    • Method Detail

      • combine

        public void combine​(PotionEffect other)
        + merges the input PotionEffect into this one if this.amplifier <= tomerge.amplifier. The duration in the supplied potion effect is assumed to be greater.
      • getPotionID

        public int getPotionID()
        + Retrieve the ID of the potion this effect matches.
      • getDuration

        public int getDuration()
      • getAmplifier

        public int getAmplifier()
      • setSplashPotion

        public void setSplashPotion​(boolean splashPotion)
        + Set whether this potion is a splash potion.
      • getIsAmbient

        public boolean getIsAmbient()
        + Gets whether this potion effect originated from a beacon
      • getIsShowParticles

        public boolean getIsShowParticles()
      • getEffectName

        public java.lang.String getEffectName()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object object)
        Overrides:
        equals in class java.lang.Object
      • writeCustomPotionEffectToNBT

        public NBTTagCompound writeCustomPotionEffectToNBT​(NBTTagCompound nbt)
        + Write a custom potion effect to a potion item's NBT data.
      • readCustomPotionEffectFromNBT

        public static PotionEffect readCustomPotionEffectFromNBT​(NBTTagCompound nbt)
        + Read a custom potion effect from a potion item's NBT data.
      • setPotionDurationMax

        public void setPotionDurationMax​(boolean maxDuration)
        + Toggle the isPotionDurationMax field.
      • getIsPotionDurationMax

        public boolean getIsPotionDurationMax()