summaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorDinnerbone <dinnerbone@dinnerbone.com>2011-09-15 02:33:50 +0100
committerDinnerbone <dinnerbone@dinnerbone.com>2011-09-15 02:33:50 +0100
commitca4810e8d40c9c47fd12e656754483536f1330b8 (patch)
tree70fc3f836948a4f157bf466ac1e2b76c1d2617b8 /src/main/java
parenta9b3a90dc93c6ae1b7cf12854c6e19ee1e113cc6 (diff)
downloadcraftbukkit-ca4810e8d40c9c47fd12e656754483536f1330b8.tar
craftbukkit-ca4810e8d40c9c47fd12e656754483536f1330b8.tar.gz
craftbukkit-ca4810e8d40c9c47fd12e656754483536f1330b8.tar.lz
craftbukkit-ca4810e8d40c9c47fd12e656754483536f1330b8.tar.xz
craftbukkit-ca4810e8d40c9c47fd12e656754483536f1330b8.zip
Implemented new entities
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftCaveSpider.java16
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftEnderman.java16
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java8
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java17
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftSilverfish.java16
5 files changed, 72 insertions, 1 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftCaveSpider.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftCaveSpider.java
new file mode 100644
index 00000000..6822e52e
--- /dev/null
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftCaveSpider.java
@@ -0,0 +1,16 @@
+package org.bukkit.craftbukkit.entity;
+
+import net.minecraft.server.EntityCaveSpider;
+import org.bukkit.craftbukkit.CraftServer;
+import org.bukkit.entity.CaveSpider;
+
+public class CraftCaveSpider extends CraftSpider implements CaveSpider {
+ public CraftCaveSpider(CraftServer server, EntityCaveSpider entity) {
+ super(server, entity);
+ }
+
+ @Override
+ public EntityCaveSpider getHandle() {
+ return (EntityCaveSpider) super.getHandle();
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderman.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderman.java
new file mode 100644
index 00000000..b68a524d
--- /dev/null
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderman.java
@@ -0,0 +1,16 @@
+package org.bukkit.craftbukkit.entity;
+
+import net.minecraft.server.EntityEnderman;
+import org.bukkit.craftbukkit.CraftServer;
+import org.bukkit.entity.Enderman;
+
+public class CraftEnderman extends CraftMonster implements Enderman {
+ public CraftEnderman(CraftServer server, EntityEnderman entity) {
+ super(server, entity);
+ }
+
+ @Override
+ public EntityEnderman getHandle() {
+ return (EntityEnderman) super.getHandle();
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 7c97c845..36760e94 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -50,9 +50,14 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
else { return new CraftZombie(server, (EntityZombie) entity); }
}
else if (entity instanceof EntityCreeper) { return new CraftCreeper(server, (EntityCreeper) entity); }
+ else if (entity instanceof EntityEnderman) { return new CraftEnderman(server, (EntityEnderman) entity); }
+ else if (entity instanceof EntitySilverfish) { return new CraftSilverfish(server, (EntitySilverfish) entity); }
else if (entity instanceof EntityGiantZombie) { return new CraftGiant(server, (EntityGiantZombie) entity); }
else if (entity instanceof EntitySkeleton) { return new CraftSkeleton(server, (EntitySkeleton) entity); }
- else if (entity instanceof EntitySpider) { return new CraftSpider(server, (EntitySpider) entity); }
+ else if (entity instanceof EntitySpider) {
+ if (entity instanceof EntityCaveSpider) { return new CraftCaveSpider(server, (EntityCaveSpider) entity); }
+ else { return new CraftSpider(server, (EntitySpider) entity); }
+ }
else { return new CraftMonster(server, (EntityMonster) entity); }
}
@@ -72,6 +77,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
}
else { return new CraftLivingEntity(server, (EntityLiving) entity); }
}
+ else if (entity instanceof EntityExperienceOrb) { return new CraftExperienceOrb(server, (EntityExperienceOrb) entity); }
else if (entity instanceof EntityArrow) { return new CraftArrow(server, (EntityArrow) entity); }
else if (entity instanceof EntityBoat) { return new CraftBoat(server, (EntityBoat) entity); }
else if (entity instanceof EntityEgg) { return new CraftEgg(server, (EntityEgg) entity); }
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java
new file mode 100644
index 00000000..3981bf32
--- /dev/null
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java
@@ -0,0 +1,17 @@
+
+package org.bukkit.craftbukkit.entity;
+
+import net.minecraft.server.EntityExperienceOrb;
+import org.bukkit.craftbukkit.CraftServer;
+import org.bukkit.entity.ExperienceOrb;
+
+public class CraftExperienceOrb extends CraftEntity implements ExperienceOrb {
+ public CraftExperienceOrb(CraftServer server, EntityExperienceOrb entity) {
+ super(server, entity);
+ }
+
+ @Override
+ public EntityExperienceOrb getHandle() {
+ return (EntityExperienceOrb) super.getHandle();
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSilverfish.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSilverfish.java
new file mode 100644
index 00000000..8f6d3c23
--- /dev/null
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSilverfish.java
@@ -0,0 +1,16 @@
+package org.bukkit.craftbukkit.entity;
+
+import net.minecraft.server.EntitySilverfish;
+import org.bukkit.craftbukkit.CraftServer;
+import org.bukkit.entity.Silverfish;
+
+public class CraftSilverfish extends CraftMonster implements Silverfish {
+ public CraftSilverfish(CraftServer server, EntitySilverfish entity) {
+ super(server, entity);
+ }
+
+ @Override
+ public EntitySilverfish getHandle() {
+ return (EntitySilverfish) super.getHandle();
+ }
+}