summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2016-06-09 11:43:40 +1000
committermd_5 <git@md-5.net>2016-06-09 11:43:40 +1000
commit6f0f13d56504477dc09adddcae92500cceb91b4f (patch)
treecf891c9ab332cf9eaf34bec0b427cc03f335a453 /src/main
parentc5bf6bc614bfd1e119e7fc067ff30cd8e8221cb2 (diff)
downloadbukkit-6f0f13d56504477dc09adddcae92500cceb91b4f.tar
bukkit-6f0f13d56504477dc09adddcae92500cceb91b4f.tar.gz
bukkit-6f0f13d56504477dc09adddcae92500cceb91b4f.tar.lz
bukkit-6f0f13d56504477dc09adddcae92500cceb91b4f.tar.xz
bukkit-6f0f13d56504477dc09adddcae92500cceb91b4f.zip
Update to Minecraft 1.10
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/bukkit/Material.java14
-rw-r--r--src/main/java/org/bukkit/Particle.java3
-rw-r--r--src/main/java/org/bukkit/Sound.java21
-rw-r--r--src/main/java/org/bukkit/entity/ArmorStand.java16
-rw-r--r--src/main/java/org/bukkit/entity/Entity.java14
-rw-r--r--src/main/java/org/bukkit/entity/EntityType.java1
-rw-r--r--src/main/java/org/bukkit/entity/PolarBear.java6
-rw-r--r--src/main/java/org/bukkit/entity/Skeleton.java41
-rw-r--r--src/main/java/org/bukkit/entity/Villager.java62
9 files changed, 90 insertions, 88 deletions
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
index ac0cc7ea..f962697e 100644
--- a/src/main/java/org/bukkit/Material.java
+++ b/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/src/main/java/org/bukkit/Particle.java b/src/main/java/org/bukkit/Particle.java
index af491f32..ed2c7b2e 100644
--- a/src/main/java/org/bukkit/Particle.java
+++ b/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/src/main/java/org/bukkit/Sound.java b/src/main/java/org/bukkit/Sound.java
index a0386331..f1a3148a 100644
--- a/src/main/java/org/bukkit/Sound.java
+++ b/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/src/main/java/org/bukkit/entity/ArmorStand.java b/src/main/java/org/bukkit/entity/ArmorStand.java
index ad77d590..b4f04517 100644
--- a/src/main/java/org/bukkit/entity/ArmorStand.java
+++ b/src/main/java/org/bukkit/entity/ArmorStand.java
@@ -198,22 +198,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/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
index 2c10ce65..5b70f94b 100644
--- a/src/main/java/org/bukkit/entity/Entity.java
+++ b/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/src/main/java/org/bukkit/entity/EntityType.java b/src/main/java/org/bukkit/entity/EntityType.java
index c4c4ac82..ec4c2a84 100644
--- a/src/main/java/org/bukkit/entity/EntityType.java
+++ b/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/src/main/java/org/bukkit/entity/PolarBear.java b/src/main/java/org/bukkit/entity/PolarBear.java
new file mode 100644
index 00000000..479f7a7c
--- /dev/null
+++ b/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/src/main/java/org/bukkit/entity/Skeleton.java b/src/main/java/org/bukkit/entity/Skeleton.java
index 02b76c36..bea790ec 100644
--- a/src/main/java/org/bukkit/entity/Skeleton.java
+++ b/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,
+ /**
+ * Wither skeleton. Generally found in Nether fortresses.
+ */
+ WITHER,
/**
- * 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
+ * Stray skeleton. Generally found in ice biomes. Shoots tipped arrows.
*/
- @Deprecated
- public static SkeletonType getType(int id) {
- return (id >= types.length) ? null : types[id];
- }
+ STRAY;
}
}
diff --git a/src/main/java/org/bukkit/entity/Villager.java b/src/main/java/org/bukkit/entity/Villager.java
index 6d62079d..92a80096 100644
--- a/src/main/java/org/bukkit/entity/Villager.java
+++ b/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,
+ /**
+ * Farmer profession. Wears a brown robe.
+ */
+ 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,
/**
- * 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
+ * Really a zombie.
*/
- @Deprecated
- public static Profession getProfession(int id) {
- return (id >= professions.length) ? null : professions[id];
- }
+ HUSK;
}
}