Add definitions for Minecraft 1.9 gameplay elements

Includes an API for AreaEffectCloud and rework of Sound enum to include new sound values.

By: md_5 <git@md-5.net>
This commit is contained in:
Bukkit/Spigot
2016-03-01 08:30:03 +11:00
parent bbb7d2b8a8
commit de63cae2d7
19 changed files with 1062 additions and 242 deletions

View File

@@ -126,6 +126,26 @@ public abstract class PotionEffectType {
*/
public static final PotionEffectType SATURATION = new PotionEffectTypeWrapper(23);
/**
* Outlines the entity so that it can be seen from afar.
*/
public static final PotionEffectType GLOWING = new PotionEffectTypeWrapper(24);
/**
* Causes the entity to float into the air.
*/
public static final PotionEffectType LEVITATION = new PotionEffectTypeWrapper(25);
/**
* Loot table luck.
*/
public static final PotionEffectType LUCK = new PotionEffectTypeWrapper(26);
/**
* Loot table unluck.
*/
public static final PotionEffectType UNLUCK = new PotionEffectTypeWrapper(27);
private final int id;
protected PotionEffectType(int id) {
@@ -202,7 +222,7 @@ public abstract class PotionEffectType {
return "PotionEffectType[" + id + ", " + getName() + "]";
}
private static final PotionEffectType[] byId = new PotionEffectType[24];
private static final PotionEffectType[] byId = new PotionEffectType[28];
private static final Map<String, PotionEffectType> byName = new HashMap<String, PotionEffectType>();
// will break on updates.
private static boolean acceptingNew = true;

View File

@@ -15,6 +15,11 @@ public enum PotionType {
INSTANT_DAMAGE(12, PotionEffectType.HARM, 2),
WATER_BREATHING(13, PotionEffectType.WATER_BREATHING, 1),
INVISIBILITY(14, PotionEffectType.INVISIBILITY, 1),
/**
* @deprecated not representable with a damage value!
*/
@Deprecated
LUCK(-1, PotionEffectType.LUCK, 1),
;
private final int damageValue, maxLevel;