summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authort00thpick1 <t00thpick1dirko@gmail.com>2014-01-21 22:50:15 -0500
committerNate Mortensen <nate.richard.mortensen@gmail.com>2014-01-30 21:47:44 -0700
commite0da846352e330180fea65721ade847d7422ddca (patch)
treee3faa62c086f5c348dc52306780e764b1b8b80a1 /src
parent2fc5d5930387b4abe2e7c34fa64df72402d049fe (diff)
downloadcraftbukkit-e0da846352e330180fea65721ade847d7422ddca.tar
craftbukkit-e0da846352e330180fea65721ade847d7422ddca.tar.gz
craftbukkit-e0da846352e330180fea65721ade847d7422ddca.tar.lz
craftbukkit-e0da846352e330180fea65721ade847d7422ddca.tar.xz
craftbukkit-e0da846352e330180fea65721ade847d7422ddca.zip
[Bleeding] Fix support for several entities in World.spawn(). Fixes BUKKIT-3284
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/bukkit/craftbukkit/CraftWorld.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index fc209215..2c1fbb53 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -860,6 +860,9 @@ public class CraftWorld implements World {
} else if (ThrownExpBottle.class.isAssignableFrom(clazz)) {
entity = new EntityThrownExpBottle(world);
entity.setPositionRotation(x, y, z, 0, 0);
+ } else if (EnderPearl.class.isAssignableFrom(clazz)) {
+ entity = new EntityEnderPearl(world);
+ entity.setPositionRotation(x, y, z, 0, 0);
} else if (ThrownPotion.class.isAssignableFrom(clazz)) {
entity = new EntityPotion(world, x, y, z, CraftItemStack.asNMSCopy(new ItemStack(org.bukkit.Material.POTION, 1)));
} else if (Fireball.class.isAssignableFrom(clazz)) {
@@ -971,7 +974,7 @@ public class CraftWorld implements World {
}
if (entity != null) {
- entity.setLocation(x, y, z, pitch, yaw);
+ entity.setLocation(x, y, z, yaw, pitch);
}
} else if (Hanging.class.isAssignableFrom(clazz)) {
Block block = getBlockAt(location);
@@ -1020,13 +1023,10 @@ public class CraftWorld implements World {
entity = new EntityExperienceOrb(world, x, y, z, 0);
} else if (Weather.class.isAssignableFrom(clazz)) {
// not sure what this can do
- entity = new EntityLightning(world, x, y, z);
- } else if (LightningStrike.class.isAssignableFrom(clazz)) {
- // what is this, I don't even
- } else if (Fish.class.isAssignableFrom(clazz)) {
- // this is not a fish, it's a bobber, and it's probably useless
- entity = new EntityFishingHook(world);
- entity.setLocation(x, y, z, pitch, yaw);
+ if (LightningStrike.class.isAssignableFrom(clazz)) {
+ entity = new EntityLightning(world, x, y, z);
+ // what is this, I don't even
+ }
} else if (Firework.class.isAssignableFrom(clazz)) {
entity = new EntityFireworks(world, x, y, z, null);
}