Package net.minecraft.potion
Class PotionEffect
- java.lang.Object
-
- net.minecraft.potion.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 Summary
Constructors Constructor Description PotionEffect(int id, int effectDuration)PotionEffect(int id, int effectDuration, int effectAmplifier)PotionEffect(int id, int effectDuration, int effectAmplifier, boolean ambient, boolean showParticles)PotionEffect(PotionEffect other)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcombine(PotionEffect other)+ merges the input PotionEffect into this one if this.amplifier <= tomerge.amplifier.booleanequals(java.lang.Object object)intgetAmplifier()intgetDuration()java.lang.StringgetEffectName()booleangetIsAmbient()+ Gets whether this potion effect originated from a beaconbooleangetIsPotionDurationMax()booleangetIsShowParticles()intgetPotionID()+ Retrieve the ID of the potion this effect matches.inthashCode()booleanonUpdate(EntityLivingBase entityIn)voidperformEffect(EntityLivingBase entityIn)static PotionEffectreadCustomPotionEffectFromNBT(NBTTagCompound nbt)+ Read a custom potion effect from a potion item's NBT data.voidsetPotionDurationMax(boolean maxDuration)+ Toggle the isPotionDurationMax field.voidsetSplashPotion(boolean splashPotion)+ Set whether this potion is a splash potion.java.lang.StringtoString()NBTTagCompoundwriteCustomPotionEffectToNBT(NBTTagCompound nbt)+ Write a custom potion effect to a potion item's NBT data.
-
-
-
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)
-
PotionEffect
public PotionEffect(PotionEffect other)
-
-
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()
-
onUpdate
public boolean onUpdate(EntityLivingBase entityIn)
-
performEffect
public void performEffect(EntityLivingBase entityIn)
-
getEffectName
public java.lang.String getEffectName()
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object object)
- Overrides:
equalsin classjava.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()
-
-