geforkt von Mirrors/Paper
[Bleeding] Fix support for several entities in World.spawn(). Fixes BUKKIT-3284
Dieser Commit ist enthalten in:
Ursprung
2fc5d59303
Commit
e0da846352
@ -860,6 +860,9 @@ public class CraftWorld implements World {
|
|||||||
} else if (ThrownExpBottle.class.isAssignableFrom(clazz)) {
|
} else if (ThrownExpBottle.class.isAssignableFrom(clazz)) {
|
||||||
entity = new EntityThrownExpBottle(world);
|
entity = new EntityThrownExpBottle(world);
|
||||||
entity.setPositionRotation(x, y, z, 0, 0);
|
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)) {
|
} else if (ThrownPotion.class.isAssignableFrom(clazz)) {
|
||||||
entity = new EntityPotion(world, x, y, z, CraftItemStack.asNMSCopy(new ItemStack(org.bukkit.Material.POTION, 1)));
|
entity = new EntityPotion(world, x, y, z, CraftItemStack.asNMSCopy(new ItemStack(org.bukkit.Material.POTION, 1)));
|
||||||
} else if (Fireball.class.isAssignableFrom(clazz)) {
|
} else if (Fireball.class.isAssignableFrom(clazz)) {
|
||||||
@ -971,7 +974,7 @@ public class CraftWorld implements World {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (entity != null) {
|
if (entity != null) {
|
||||||
entity.setLocation(x, y, z, pitch, yaw);
|
entity.setLocation(x, y, z, yaw, pitch);
|
||||||
}
|
}
|
||||||
} else if (Hanging.class.isAssignableFrom(clazz)) {
|
} else if (Hanging.class.isAssignableFrom(clazz)) {
|
||||||
Block block = getBlockAt(location);
|
Block block = getBlockAt(location);
|
||||||
@ -1020,13 +1023,10 @@ public class CraftWorld implements World {
|
|||||||
entity = new EntityExperienceOrb(world, x, y, z, 0);
|
entity = new EntityExperienceOrb(world, x, y, z, 0);
|
||||||
} else if (Weather.class.isAssignableFrom(clazz)) {
|
} else if (Weather.class.isAssignableFrom(clazz)) {
|
||||||
// not sure what this can do
|
// not sure what this can do
|
||||||
entity = new EntityLightning(world, x, y, z);
|
if (LightningStrike.class.isAssignableFrom(clazz)) {
|
||||||
} else if (LightningStrike.class.isAssignableFrom(clazz)) {
|
entity = new EntityLightning(world, x, y, z);
|
||||||
// what is this, I don't even
|
// 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);
|
|
||||||
} else if (Firework.class.isAssignableFrom(clazz)) {
|
} else if (Firework.class.isAssignableFrom(clazz)) {
|
||||||
entity = new EntityFireworks(world, x, y, z, null);
|
entity = new EntityFireworks(world, x, y, z, null);
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren