mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-28 05:25:42 +01:00
fixed spawn method for projectiles
This commit is contained in:
parent
f1c1e813bf
commit
0a8bd56f16
@ -700,6 +700,16 @@ public class CraftWorld implements World {
|
||||
entity = new EntityBoat(world, x, y, z);
|
||||
} else if (FallingSand.class.isAssignableFrom(clazz)) {
|
||||
entity = new EntityFallingSand(world, x, y, z, 0, 0);
|
||||
} else if (Projectile.class.isAssignableFrom(clazz)) {
|
||||
if (Snowball.class.isAssignableFrom(clazz)) {
|
||||
entity = new EntitySnowball(world, x, y, z);
|
||||
} else if (Egg.class.isAssignableFrom(clazz)) {
|
||||
entity = new EntityEgg(world, x, y, z);
|
||||
} else if (EnderPearl.class.isAssignableFrom(clazz)) {
|
||||
entity = new EntityEnderPearl(world, x, y, z);
|
||||
} else if (Arrow.class.isAssignableFrom(clazz)) {
|
||||
entity = new EntityArrow(world);
|
||||
entity.setPositionRotation(x, y, z, 0, 0);
|
||||
} else if (Fireball.class.isAssignableFrom(clazz)) {
|
||||
if (SmallFireball.class.isAssignableFrom(clazz)) {
|
||||
entity = new EntitySmallFireball(world);
|
||||
@ -709,13 +719,6 @@ public class CraftWorld implements World {
|
||||
((EntityFireball) entity).setPositionRotation(x, y, z, yaw, pitch);
|
||||
Vector direction = location.getDirection().multiply(10);
|
||||
((EntityFireball) entity).setDirection(direction.getX(), direction.getY(), direction.getZ());
|
||||
} else if (Projectile.class.isAssignableFrom(clazz)) {
|
||||
if (Snowball.class.isAssignableFrom(clazz)) {
|
||||
entity = new EntitySnowball(world, x, y, z);
|
||||
} else if (Egg.class.isAssignableFrom(clazz)) {
|
||||
entity = new EntityEgg(world, x, y, z);
|
||||
} else if (EnderPearl.class.isAssignableFrom(clazz)) {
|
||||
entity = new EntityEnderPearl(world, x, y, z);
|
||||
}
|
||||
} else if (Minecart.class.isAssignableFrom(clazz)) {
|
||||
if (PoweredMinecart.class.isAssignableFrom(clazz)) {
|
||||
@ -725,9 +728,6 @@ public class CraftWorld implements World {
|
||||
} else {
|
||||
entity = new EntityMinecart(world, x, y, z, CraftMinecart.Type.Minecart.getId());
|
||||
}
|
||||
} else if (Arrow.class.isAssignableFrom(clazz)) {
|
||||
entity = new EntityArrow(world);
|
||||
entity.setPositionRotation(x, y, z, 0, 0);
|
||||
} else if (EnderSignal.class.isAssignableFrom(clazz)) {
|
||||
entity = new EntityEnderSignal(world, x, y, z);
|
||||
} else if (LivingEntity.class.isAssignableFrom(clazz)) {
|
||||
|
Loading…
Reference in New Issue
Block a user