Provide the 1.4.2 potions. Adds BUKKIT-2727.

Two potion types were missing from the 1.4.2 update. Invisibility and
night vision are now in the potion type enum.

Fixes an erroneous use of PotionEffectType.SPEED where it should have
been WEAKNESS.

Removed deprecation for the PotionEffectType relating to certain effects
that are now active in 1.4.2.

Fixes BUKKIT-2677, BUKKIT-2758.

By: Wesley Wolfe <weswolf@aol.com>
This commit is contained in:
Bukkit/Spigot
2012-10-31 04:12:53 -05:00
parent 4b23d98b72
commit 80c98cb5d4
2 changed files with 7 additions and 6 deletions

View File

@@ -77,8 +77,7 @@ public abstract class PotionEffectType {
/** /**
* Grants invisibility. * Grants invisibility.
*/ */
@Deprecated public static final PotionEffectType INVISIBILITY = new PotionEffectTypeWrapper(14);
public static final PotionEffectType INVISIBILITY = new PotionEffectTypeWrapper(14); // unimplemented
/** /**
* Blinds an entity. * Blinds an entity.
@@ -88,8 +87,7 @@ public abstract class PotionEffectType {
/** /**
* Allows an entity to see in the dark. * Allows an entity to see in the dark.
*/ */
@Deprecated public static final PotionEffectType NIGHT_VISION = new PotionEffectTypeWrapper(16);
public static final PotionEffectType NIGHT_VISION = new PotionEffectTypeWrapper(16); // unimplemented
/** /**
* Increases hunger. * Increases hunger.

View File

@@ -7,10 +7,13 @@ public enum PotionType {
FIRE_RESISTANCE(3, PotionEffectType.FIRE_RESISTANCE, 1), FIRE_RESISTANCE(3, PotionEffectType.FIRE_RESISTANCE, 1),
POISON(4, PotionEffectType.POISON, 2), POISON(4, PotionEffectType.POISON, 2),
INSTANT_HEAL(5, PotionEffectType.HEAL, 2), INSTANT_HEAL(5, PotionEffectType.HEAL, 2),
WEAKNESS(8, PotionEffectType.SPEED, 1), NIGHT_VISION(6, PotionEffectType.NIGHT_VISION, 1),
WEAKNESS(8, PotionEffectType.WEAKNESS, 1),
STRENGTH(9, PotionEffectType.INCREASE_DAMAGE, 2), STRENGTH(9, PotionEffectType.INCREASE_DAMAGE, 2),
SLOWNESS(10, PotionEffectType.SLOW, 1), SLOWNESS(10, PotionEffectType.SLOW, 1),
INSTANT_DAMAGE(12, PotionEffectType.HARM, 2); INSTANT_DAMAGE(12, PotionEffectType.HARM, 2),
INVISIBILTY(14, PotionEffectType.INVISIBILITY, 1),
;
private final int damageValue, maxLevel; private final int damageValue, maxLevel;
private final PotionEffectType effect; private final PotionEffectType effect;