summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNathan Adams <dinnerbone@dinnerbone.com>2012-03-01 17:29:05 +0000
committerNathan Adams <dinnerbone@dinnerbone.com>2012-03-01 18:01:40 +0000
commit039088e974f079d44659ae7c404981a6bbb0d10f (patch)
tree55ccecc042d601c7ce8115bf032d6d7a0de60c99 /src
parentb61d208c3c01f10d8ef6a1209978d574c1d2311c (diff)
downloadbukkit-039088e974f079d44659ae7c404981a6bbb0d10f.tar
bukkit-039088e974f079d44659ae7c404981a6bbb0d10f.tar.gz
bukkit-039088e974f079d44659ae7c404981a6bbb0d10f.tar.lz
bukkit-039088e974f079d44659ae7c404981a6bbb0d10f.tar.xz
bukkit-039088e974f079d44659ae7c404981a6bbb0d10f.zip
Added a bunch of new 1.2 entities; this partially resolves BUKKIT-872 and BUKKIT-885.
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/bukkit/entity/EntityType.java3
-rw-r--r--src/main/java/org/bukkit/entity/Golem.java8
-rw-r--r--src/main/java/org/bukkit/entity/IronGolem.java8
-rw-r--r--src/main/java/org/bukkit/entity/Ocelot.java57
-rw-r--r--src/main/java/org/bukkit/entity/Snowman.java2
-rw-r--r--src/main/java/org/bukkit/entity/ThrownExpBottle.java8
6 files changed, 85 insertions, 1 deletions
diff --git a/src/main/java/org/bukkit/entity/EntityType.java b/src/main/java/org/bukkit/entity/EntityType.java
index e6b51e7f..42f2dccd 100644
--- a/src/main/java/org/bukkit/entity/EntityType.java
+++ b/src/main/java/org/bukkit/entity/EntityType.java
@@ -17,6 +17,7 @@ public enum EntityType {
SMALL_FIREBALL("SmallFireball", SmallFireball.class, 13),
ENDER_PEARL("ThrownEnderpearl", EnderPearl.class, 14),
ENDER_SIGNAL("EyeOfEnderSignal", EnderSignal.class, 15),
+ THROWN_EXP_BOTTLE("ThrownExpBottle", ThrownExpBottle.class, 17),
PRIMED_TNT("PrimedTnt", TNTPrimed.class, 20),
FALLING_BLOCK("FallingSand", FallingSand.class, 21, false),
MINECART("Minecart", Minecart.class, 40),
@@ -43,6 +44,8 @@ public enum EntityType {
WOLF("Wolf", Wolf.class, 95),
MUSHROOM_COW("MushroomCow", MushroomCow.class, 96),
SNOWMAN("SnowMan", Snowman.class, 97),
+ OCELOT("Ozelot", Ocelot.class, 98),
+ IRON_GOLEM("VillagerGolem", IronGolem.class, 98),
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/Golem.java b/src/main/java/org/bukkit/entity/Golem.java
new file mode 100644
index 00000000..4165977e
--- /dev/null
+++ b/src/main/java/org/bukkit/entity/Golem.java
@@ -0,0 +1,8 @@
+package org.bukkit.entity;
+
+/**
+ * A mechanical creature that may harm enemies.
+ */
+public interface Golem extends Creature {
+
+}
diff --git a/src/main/java/org/bukkit/entity/IronGolem.java b/src/main/java/org/bukkit/entity/IronGolem.java
new file mode 100644
index 00000000..16a35e68
--- /dev/null
+++ b/src/main/java/org/bukkit/entity/IronGolem.java
@@ -0,0 +1,8 @@
+package org.bukkit.entity;
+
+/**
+ * An iron Golem that protects Villages.
+ */
+public interface IronGolem extends Golem {
+
+}
diff --git a/src/main/java/org/bukkit/entity/Ocelot.java b/src/main/java/org/bukkit/entity/Ocelot.java
new file mode 100644
index 00000000..54bde9c8
--- /dev/null
+++ b/src/main/java/org/bukkit/entity/Ocelot.java
@@ -0,0 +1,57 @@
+
+package org.bukkit.entity;
+
+/**
+ * A wild tameable cat
+ */
+public interface Ocelot extends Animals, Tameable {
+ /**
+ * Gets the current type of this cat.
+ *
+ * @return Type of the cat.
+ */
+ public Type getCatType();
+
+ /**
+ * Sets the current type of this cat.
+ *
+ * @param type New type of this cat.
+ */
+ public void setCatType(Type type);
+
+ /**
+ * Represents the various different cat types there are.
+ */
+ public enum Type {
+ WILD_OCELOT(0),
+ BLACK_CAT(1),
+ RED_CAT(2),
+ SIAMESE_CAT(3);
+
+ private static final Type[] types = new Type[Type.values().length];
+ private final int id;
+
+ private Type(int id) {
+ this.id = id;
+ }
+
+ /**
+ * Gets the ID of this cat type.
+ *
+ * @return Type ID.
+ */
+ public int getId() {
+ return id;
+ }
+
+ /**
+ * Gets a cat type by its ID.
+ *
+ * @param id ID of the cat type to get.
+ * @return Resulting type, or null if not found.
+ */
+ public static final Type getType(int id) {
+ return (id >= types.length) ? null : types[id];
+ }
+ }
+}
diff --git a/src/main/java/org/bukkit/entity/Snowman.java b/src/main/java/org/bukkit/entity/Snowman.java
index 49005ed2..c8070ff2 100644
--- a/src/main/java/org/bukkit/entity/Snowman.java
+++ b/src/main/java/org/bukkit/entity/Snowman.java
@@ -3,6 +3,6 @@ package org.bukkit.entity;
/**
* Represents a snowman entity
*/
-public interface Snowman extends Creature {
+public interface Snowman extends Golem {
}
diff --git a/src/main/java/org/bukkit/entity/ThrownExpBottle.java b/src/main/java/org/bukkit/entity/ThrownExpBottle.java
new file mode 100644
index 00000000..671282ed
--- /dev/null
+++ b/src/main/java/org/bukkit/entity/ThrownExpBottle.java
@@ -0,0 +1,8 @@
+package org.bukkit.entity;
+
+/**
+ * Represents a thrown Experience bottle.
+ */
+public interface ThrownExpBottle extends Projectile {
+
+}