Package cn.nukkit.potion
Class Potion
java.lang.Object
cn.nukkit.potion.Potion
- All Implemented Interfaces:
Cloneable
@PowerNukkitDifference(since="FUTURE",
info="Implements equals() and hashcode() only in PowerNukkit")
public class Potion
extends Object
implements Cloneable
- Author:
- MagicDroidX (Nukkit Project)
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
protected final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
protected final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
protected static Potion[]
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
Deprecated.static final int
static final int
static final int
protected boolean
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
applyPotion
(Entity entity) void
applyPotion
(Entity entity, double health) protected boolean
clone()
boolean
static int
getApplySeconds
(int potionType, boolean isSplash) static Effect
getEffect
(int potionType, boolean isSplash) int
getId()
int
getLevel()
static int
getLevel
(int potionType) getName()
static Potion
getPotion
(int id) static Potion
getPotionByName
(String name) int
hashCode()
static void
init()
static boolean
isInstant
(int potionType) boolean
isSplash()
setSplash
(boolean splash)
-
Field Details
-
NO_EFFECTS
public static final int NO_EFFECTS- See Also:
-
WATER
public static final int WATER- See Also:
-
MUNDANE
public static final int MUNDANE- See Also:
-
MUNDANE_II
public static final int MUNDANE_II- See Also:
-
THICK
public static final int THICK- See Also:
-
AWKWARD
public static final int AWKWARD- See Also:
-
NIGHT_VISION
public static final int NIGHT_VISION- See Also:
-
NIGHT_VISION_LONG
public static final int NIGHT_VISION_LONG- See Also:
-
INVISIBLE
public static final int INVISIBLE- See Also:
-
INVISIBLE_LONG
public static final int INVISIBLE_LONG- See Also:
-
LEAPING
public static final int LEAPING- See Also:
-
LEAPING_LONG
public static final int LEAPING_LONG- See Also:
-
LEAPING_II
public static final int LEAPING_II- See Also:
-
FIRE_RESISTANCE
public static final int FIRE_RESISTANCE- See Also:
-
FIRE_RESISTANCE_LONG
public static final int FIRE_RESISTANCE_LONG- See Also:
-
SPEED
public static final int SPEED- See Also:
-
SPEED_LONG
public static final int SPEED_LONG- See Also:
-
SPEED_II
public static final int SPEED_II- See Also:
-
SLOWNESS
public static final int SLOWNESS- See Also:
-
SLOWNESS_LONG
public static final int SLOWNESS_LONG- See Also:
-
WATER_BREATHING
public static final int WATER_BREATHING- See Also:
-
WATER_BREATHING_LONG
public static final int WATER_BREATHING_LONG- See Also:
-
INSTANT_HEALTH
public static final int INSTANT_HEALTH- See Also:
-
INSTANT_HEALTH_II
public static final int INSTANT_HEALTH_II- See Also:
-
HARMING
public static final int HARMING- See Also:
-
HARMING_II
public static final int HARMING_II- See Also:
-
POISON
public static final int POISON- See Also:
-
POISON_LONG
public static final int POISON_LONG- See Also:
-
POISON_II
public static final int POISON_II- See Also:
-
REGENERATION
public static final int REGENERATION- See Also:
-
REGENERATION_LONG
public static final int REGENERATION_LONG- See Also:
-
REGENERATION_II
public static final int REGENERATION_II- See Also:
-
STRENGTH
public static final int STRENGTH- See Also:
-
STRENGTH_LONG
public static final int STRENGTH_LONG- See Also:
-
STRENGTH_II
public static final int STRENGTH_II- See Also:
-
WEAKNESS
public static final int WEAKNESS- See Also:
-
WEAKNESS_LONG
public static final int WEAKNESS_LONG- See Also:
-
WITHER_II
public static final int WITHER_II- See Also:
-
TURTLE_MASTER
public static final int TURTLE_MASTER- See Also:
-
TURTLE_MASTER_LONG
public static final int TURTLE_MASTER_LONG- See Also:
-
TURTLE_MASTER_II
public static final int TURTLE_MASTER_II- See Also:
-
SLOW_FALLING
public static final int SLOW_FALLING- See Also:
-
SLOW_FALLING_LONG
public static final int SLOW_FALLING_LONG- See Also:
-
SLOWNESS_IV
- See Also:
-
SLOWNESS_LONG_II
@Since("1.4.0.0-PN") @Deprecated @DeprecationDetails(since="FUTURE", by="PowerNukkit", reason="Incorrect name, there is vanilla potion with slowness long 2, the result of potion with slowness 1 + glowstone is slowness 4", replaceWith="SLOWNESS_IV") public static final int SLOWNESS_LONG_IIDeprecated.- See Also:
-
potions
-
id
protected final int id -
level
protected final int level -
splash
protected boolean splash
-
-
Constructor Details
-
Potion
public Potion(int id) -
Potion
public Potion(int id, int level) -
Potion
public Potion(int id, int level, boolean splash)
-
-
Method Details
-
init
public static void init() -
getPotion
-
getPotionByName
-
getEffect
-
getId
public int getId() -
getLevel
public int getLevel() -
isSplash
public boolean isSplash() -
setSplash
-
applyPotion
-
applyPotion
-
clone
-
getEffect
-
getLevel
public static int getLevel(int potionType) -
isInstant
public static boolean isInstant(int potionType) -
getApplySeconds
public static int getApplySeconds(int potionType, boolean isSplash) -
getPotionTypeName
-
getName
-
getRomanLevel
-
equals
-
canEqual
-
hashCode
public int hashCode()
-