geforkt von Mirrors/Paper
fixed spawn method for projectiles
Dieser Commit ist enthalten in:
Ursprung
f1c1e813bf
Commit
0a8bd56f16
@ -700,6 +700,16 @@ public class CraftWorld implements World {
|
|||||||
entity = new EntityBoat(world, x, y, z);
|
entity = new EntityBoat(world, x, y, z);
|
||||||
} else if (FallingSand.class.isAssignableFrom(clazz)) {
|
} else if (FallingSand.class.isAssignableFrom(clazz)) {
|
||||||
entity = new EntityFallingSand(world, x, y, z, 0, 0);
|
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)) {
|
} else if (Fireball.class.isAssignableFrom(clazz)) {
|
||||||
if (SmallFireball.class.isAssignableFrom(clazz)) {
|
if (SmallFireball.class.isAssignableFrom(clazz)) {
|
||||||
entity = new EntitySmallFireball(world);
|
entity = new EntitySmallFireball(world);
|
||||||
@ -709,13 +719,6 @@ public class CraftWorld implements World {
|
|||||||
((EntityFireball) entity).setPositionRotation(x, y, z, yaw, pitch);
|
((EntityFireball) entity).setPositionRotation(x, y, z, yaw, pitch);
|
||||||
Vector direction = location.getDirection().multiply(10);
|
Vector direction = location.getDirection().multiply(10);
|
||||||
((EntityFireball) entity).setDirection(direction.getX(), direction.getY(), direction.getZ());
|
((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)) {
|
} else if (Minecart.class.isAssignableFrom(clazz)) {
|
||||||
if (PoweredMinecart.class.isAssignableFrom(clazz)) {
|
if (PoweredMinecart.class.isAssignableFrom(clazz)) {
|
||||||
@ -725,9 +728,6 @@ public class CraftWorld implements World {
|
|||||||
} else {
|
} else {
|
||||||
entity = new EntityMinecart(world, x, y, z, CraftMinecart.Type.Minecart.getId());
|
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)) {
|
} else if (EnderSignal.class.isAssignableFrom(clazz)) {
|
||||||
entity = new EntityEnderSignal(world, x, y, z);
|
entity = new EntityEnderSignal(world, x, y, z);
|
||||||
} else if (LivingEntity.class.isAssignableFrom(clazz)) {
|
} else if (LivingEntity.class.isAssignableFrom(clazz)) {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren