diff --git a/paper-api/pom.xml b/paper-api/pom.xml index 345a2161ac..7215bd162d 100644 --- a/paper-api/pom.xml +++ b/paper-api/pom.xml @@ -11,7 +11,7 @@ org.bukkit bukkit - 1.9.4-R0.1-SNAPSHOT + 1.10-R0.1-SNAPSHOT jar Bukkit diff --git a/paper-api/src/main/java/org/bukkit/Material.java b/paper-api/src/main/java/org/bukkit/Material.java index ac0cc7eac7..f962697e78 100644 --- a/paper-api/src/main/java/org/bukkit/Material.java +++ b/paper-api/src/main/java/org/bukkit/Material.java @@ -282,6 +282,11 @@ public enum Material { COMMAND_REPEATING(210, Command.class), COMMAND_CHAIN(211, Command.class), FROSTED_ICE(212), + MAGMA(213), + NETHER_WART_BLOCK(214), + RED_NETHER_BRICK(215), + BONE_BLOCK(216), + STRUCTURE_VOID(217), STRUCTURE_BLOCK(255), // ----- Item Separator ----- IRON_SPADE(256, 1, 250), @@ -901,6 +906,10 @@ public enum Material { case COMMAND_REPEATING: case COMMAND_CHAIN: case FROSTED_ICE: + case MAGMA: + case NETHER_WART_BLOCK: + case RED_NETHER_BRICK: + case BONE_BLOCK: return true; default: return false; @@ -966,6 +975,7 @@ public enum Material { case CHORUS_FLOWER: case BEETROOT_BLOCK: case END_GATEWAY: + case STRUCTURE_VOID: return true; default: return false; @@ -1182,6 +1192,10 @@ public enum Material { case STRUCTURE_BLOCK: case COMMAND_REPEATING: case COMMAND_CHAIN: + case MAGMA: + case NETHER_WART_BLOCK: + case RED_NETHER_BRICK: + case BONE_BLOCK: return true; default: return false; diff --git a/paper-api/src/main/java/org/bukkit/Particle.java b/paper-api/src/main/java/org/bukkit/Particle.java index af491f3223..ed2c7b2ee9 100644 --- a/paper-api/src/main/java/org/bukkit/Particle.java +++ b/paper-api/src/main/java/org/bukkit/Particle.java @@ -49,7 +49,8 @@ public enum Particle { DRAGON_BREATH, END_ROD, DAMAGE_INDICATOR, - SWEEP_ATTACK; + SWEEP_ATTACK, + FALLING_DUST; private final Class dataType; diff --git a/paper-api/src/main/java/org/bukkit/Sound.java b/paper-api/src/main/java/org/bukkit/Sound.java index a0386331a9..f1a3148aab 100644 --- a/paper-api/src/main/java/org/bukkit/Sound.java +++ b/paper-api/src/main/java/org/bukkit/Sound.java @@ -33,6 +33,7 @@ public enum Sound { BLOCK_DISPENSER_DISPENSE, BLOCK_DISPENSER_FAIL, BLOCK_DISPENSER_LAUNCH, + BLOCK_ENCHANTMENT_TABLE_USE, BLOCK_ENDERCHEST_CLOSE, BLOCK_ENDERCHEST_OPEN, BLOCK_END_GATEWAY_SPAWN, @@ -257,6 +258,10 @@ public enum Sound { ENTITY_HOSTILE_SMALL_FALL, ENTITY_HOSTILE_SPLASH, ENTITY_HOSTILE_SWIM, + ENTITY_HUSK_AMBIENT, + ENTITY_HUSK_DEATH, + ENTITY_HUSK_HURT, + ENTITY_HUSK_STEP, ENTITY_IRONGOLEM_ATTACK, ENTITY_IRONGOLEM_DEATH, ENTITY_IRONGOLEM_HURT, @@ -305,6 +310,12 @@ public enum Sound { ENTITY_PLAYER_SMALL_FALL, ENTITY_PLAYER_SPLASH, ENTITY_PLAYER_SWIM, + ENTITY_POLAR_BEAR_AMBIENT, + ENTITY_POLAR_BEAR_BABY_AMBIENT, + ENTITY_POLAR_BEAR_DEATH, + ENTITY_POLAR_BEAR_HURT, + ENTITY_POLAR_BEAR_STEP, + ENTITY_POLAR_BEAR_WARNING, ENTITY_RABBIT_AMBIENT, ENTITY_RABBIT_ATTACK, ENTITY_RABBIT_DEATH, @@ -363,6 +374,10 @@ public enum Sound { ENTITY_SQUID_AMBIENT, ENTITY_SQUID_DEATH, ENTITY_SQUID_HURT, + ENTITY_STRAY_AMBIENT, + ENTITY_STRAY_DEATH, + ENTITY_STRAY_HURT, + ENTITY_STRAY_STEP, ENTITY_TNT_PRIMED, ENTITY_VILLAGER_AMBIENT, ENTITY_VILLAGER_DEATH, @@ -380,6 +395,10 @@ public enum Sound { ENTITY_WITHER_DEATH, ENTITY_WITHER_HURT, ENTITY_WITHER_SHOOT, + ENTITY_WITHER_SKELETON_AMBIENT, + ENTITY_WITHER_SKELETON_DEATH, + ENTITY_WITHER_SKELETON_HURT, + ENTITY_WITHER_SKELETON_STEP, ENTITY_WITHER_SPAWN, ENTITY_WOLF_AMBIENT, ENTITY_WOLF_DEATH, @@ -452,5 +471,5 @@ public enum Sound { RECORD_WARD, UI_BUTTON_CLICK, WEATHER_RAIN, - WEATHER_RAIN_ABOVE, + WEATHER_RAIN_ABOVE; } diff --git a/paper-api/src/main/java/org/bukkit/entity/ArmorStand.java b/paper-api/src/main/java/org/bukkit/entity/ArmorStand.java index ad77d59009..b4f045178a 100644 --- a/paper-api/src/main/java/org/bukkit/entity/ArmorStand.java +++ b/paper-api/src/main/java/org/bukkit/entity/ArmorStand.java @@ -197,22 +197,6 @@ public interface ArmorStand extends LivingEntity { */ void setBasePlate(boolean basePlate); - /** - * Returns whether gravity applies to - * this armor stand - * - * @return whether gravity applies - */ - boolean hasGravity(); - - /** - * Sets whether gravity applies to - * this armor stand - * - * @param gravity whether gravity should apply - */ - void setGravity(boolean gravity); - /** * Returns whether the armor stand should be * visible or not diff --git a/paper-api/src/main/java/org/bukkit/entity/Entity.java b/paper-api/src/main/java/org/bukkit/entity/Entity.java index 2c10ce657a..5b70f94bef 100644 --- a/paper-api/src/main/java/org/bukkit/entity/Entity.java +++ b/paper-api/src/main/java/org/bukkit/entity/Entity.java @@ -389,4 +389,18 @@ public interface Entity extends Metadatable, CommandSender { * @param flag if the entity is silent */ public void setSilent(boolean flag); + + /** + * Returns whether gravity applies to this entity. + * + * @return whether gravity applies + */ + boolean hasGravity(); + + /** + * Sets whether gravity applies to this entity. + * + * @param gravity whether gravity should apply + */ + void setGravity(boolean gravity); } diff --git a/paper-api/src/main/java/org/bukkit/entity/EntityType.java b/paper-api/src/main/java/org/bukkit/entity/EntityType.java index c4c4ac82f9..ec4c2a849e 100644 --- a/paper-api/src/main/java/org/bukkit/entity/EntityType.java +++ b/paper-api/src/main/java/org/bukkit/entity/EntityType.java @@ -169,6 +169,7 @@ public enum EntityType { IRON_GOLEM("VillagerGolem", IronGolem.class, 99), HORSE("EntityHorse", Horse.class, 100), RABBIT("Rabbit", Rabbit.class, 101), + POLAR_BEAR("PolarBear", PolarBear.class, 102), VILLAGER("Villager", Villager.class, 120), ENDER_CRYSTAL("EnderCrystal", EnderCrystal.class, 200), // These don't have an entity ID in nms.EntityTypes. diff --git a/paper-api/src/main/java/org/bukkit/entity/PolarBear.java b/paper-api/src/main/java/org/bukkit/entity/PolarBear.java new file mode 100644 index 0000000000..479f7a7c54 --- /dev/null +++ b/paper-api/src/main/java/org/bukkit/entity/PolarBear.java @@ -0,0 +1,6 @@ +package org.bukkit.entity; + +/** + * Represents a polar bear. + */ +public interface PolarBear extends Animals {} diff --git a/paper-api/src/main/java/org/bukkit/entity/Skeleton.java b/paper-api/src/main/java/org/bukkit/entity/Skeleton.java index 02b76c361d..bea790ecce 100644 --- a/paper-api/src/main/java/org/bukkit/entity/Skeleton.java +++ b/paper-api/src/main/java/org/bukkit/entity/Skeleton.java @@ -23,43 +23,18 @@ public interface Skeleton extends Monster { * Represents the various different Skeleton types. */ public enum SkeletonType { - NORMAL(0), - WITHER(1); - - private static final SkeletonType[] types = new SkeletonType[SkeletonType.values().length]; - private final int id; - - static { - for (SkeletonType type : values()) { - types[type.getId()] = type; - } - } - - private SkeletonType(int id) { - this.id = id; - } /** - * Gets the ID of this skeleton type. - * - * @return Skeleton type ID - * @deprecated Magic value + * Standard skeleton type. */ - @Deprecated - public int getId() { - return id; - } - + NORMAL, /** - * Gets a skeleton type by its ID. - * - * @param id ID of the skeleton type to get. - * @return Resulting skeleton type, or null if not found. - * @deprecated Magic value + * Wither skeleton. Generally found in Nether fortresses. */ - @Deprecated - public static SkeletonType getType(int id) { - return (id >= types.length) ? null : types[id]; - } + WITHER, + /** + * Stray skeleton. Generally found in ice biomes. Shoots tipped arrows. + */ + STRAY; } } diff --git a/paper-api/src/main/java/org/bukkit/entity/Villager.java b/paper-api/src/main/java/org/bukkit/entity/Villager.java index 6d62079dea..92a80096b1 100644 --- a/paper-api/src/main/java/org/bukkit/entity/Villager.java +++ b/paper-api/src/main/java/org/bukkit/entity/Villager.java @@ -111,48 +111,36 @@ public interface Villager extends Ageable, NPC, InventoryHolder { /** * Represents the various different Villager professions there may be. + * Villagers have different trading options depending on their profession, */ public enum Profession { - FARMER(0), - LIBRARIAN(1), - PRIEST(2), - BLACKSMITH(3), - BUTCHER(4); - - private static final Profession[] professions = new Profession[Profession.values().length]; - private final int id; - - static { - for (Profession type : values()) { - professions[type.getId()] = type; - } - } - - private Profession(int id) { - this.id = id; - } - /** - * Gets the ID of this profession. - * - * @return Profession ID. - * @deprecated Magic value + * Villager without a profession. */ - @Deprecated - public int getId() { - return id; - } - + NORMAL, /** - * Gets a profession by its ID. - * - * @param id ID of the profession to get. - * @return Resulting profession, or null if not found. - * @deprecated Magic value + * Farmer profession. Wears a brown robe. */ - @Deprecated - public static Profession getProfession(int id) { - return (id >= professions.length) ? null : professions[id]; - } + FARMER, + /** + * Librarian profession. Wears a white robe. + */ + LIBRARIAN, + /** + * Priest profession. Wears a purple robe. + */ + PRIEST, + /** + * Blacksmith profession. Wears a black apron. + */ + BLACKSMITH, + /** + * Butcher profession. Wears a white apron. + */ + BUTCHER, + /** + * Really a zombie. + */ + HUSK; } }