summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorNathan Adams <dinnerbone@dinnerbone.com>2011-11-21 22:39:33 +0000
committerNathan Adams <dinnerbone@dinnerbone.com>2011-11-21 22:39:33 +0000
commita83fc1d6a2510af0a4ce20b4f3adc0f7f1355bb4 (patch)
tree1570735066402639f5918c78028064785302d787 /src/main
parent0a8bd56f160c37d4d7be24f09b1b566c00396111 (diff)
downloadcraftbukkit-a83fc1d6a2510af0a4ce20b4f3adc0f7f1355bb4.tar
craftbukkit-a83fc1d6a2510af0a4ce20b4f3adc0f7f1355bb4.tar.gz
craftbukkit-a83fc1d6a2510af0a4ce20b4f3adc0f7f1355bb4.tar.lz
craftbukkit-a83fc1d6a2510af0a4ce20b4f3adc0f7f1355bb4.tar.xz
craftbukkit-a83fc1d6a2510af0a4ce20b4f3adc0f7f1355bb4.zip
Implemented new EnderCrystal entity class
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/bukkit/craftbukkit/CraftWorld.java3
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftEnderCrystal.java16
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java1
3 files changed, 20 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 70b4fbca..b22653be 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -730,6 +730,9 @@ public class CraftWorld implements World {
}
} else if (EnderSignal.class.isAssignableFrom(clazz)) {
entity = new EntityEnderSignal(world, x, y, z);
+ } else if (EnderCrystal.class.isAssignableFrom(clazz)) {
+ entity = new EntityEnderCrystal(world);
+ entity.setPositionRotation(x, y, z, 0, 0);
} else if (LivingEntity.class.isAssignableFrom(clazz)) {
if (Chicken.class.isAssignableFrom(clazz)) {
entity = new EntityChicken(world);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderCrystal.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderCrystal.java
new file mode 100644
index 00000000..c27b3a5d
--- /dev/null
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderCrystal.java
@@ -0,0 +1,16 @@
+package org.bukkit.craftbukkit.entity;
+
+import net.minecraft.server.Entity;
+import org.bukkit.craftbukkit.CraftServer;
+import org.bukkit.entity.EnderSignal;
+
+public class CraftEnderCrystal extends CraftEntity implements EnderSignal {
+ public CraftEnderCrystal(CraftServer server, Entity entity) {
+ super(server, entity);
+ }
+
+ @Override
+ public String toString() {
+ return "CraftEnderSignal";
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 9827d97f..16cb35b3 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -110,6 +110,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
else { return new CraftFireball(server, (EntityFireball) entity); }
}
else if (entity instanceof EntityEnderSignal) { return new CraftEnderSignal(server, (EntityEnderSignal) entity); }
+ else if (entity instanceof EntityEnderCrystal) { return new CraftEnderCrystal(server, (EntityEnderCrystal) entity); }
else if (entity instanceof EntityFishingHook) { return new CraftFish(server, (EntityFishingHook) entity); }
else if (entity instanceof EntityItem) { return new CraftItem(server, (EntityItem) entity); }
else if (entity instanceof EntityWeather) {