mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-30 14:33:56 +01:00
SPIGOT-3054: Correct LLamaSpit launching
This commit is contained in:
parent
3c48711c05
commit
a552117725
@ -391,9 +391,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
|||||||
|
|
||||||
((EntityFireball) launch).projectileSource = this;
|
((EntityFireball) launch).projectileSource = this;
|
||||||
launch.setPositionRotation(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch());
|
launch.setPositionRotation(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch());
|
||||||
} else if (LlamaSpit.class.isAssignableFrom(projectile) && getHandle() instanceof EntityLlama) {
|
} else if (LlamaSpit.class.isAssignableFrom(projectile)) {
|
||||||
launch = new EntityLlamaSpit(world, (EntityLlama) getHandle());
|
Location location = getEyeLocation();
|
||||||
((EntityProjectile) launch).a(getHandle(), getHandle().pitch, getHandle().yaw, 0.0F, 1.5F, 10.0F); // EntityLlama
|
Vector direction = location.getDirection();
|
||||||
|
|
||||||
|
launch = new EntityLlamaSpit(world);
|
||||||
|
|
||||||
|
((EntityLlamaSpit) launch).shooter = getHandle();
|
||||||
|
((EntityLlamaSpit) launch).shoot(direction.getX(), direction.getY(), direction.getZ(), 1.5F, 10.0F); // EntityLlama
|
||||||
|
launch.setPositionRotation(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch());
|
||||||
}
|
}
|
||||||
|
|
||||||
Validate.notNull(launch, "Projectile not supported");
|
Validate.notNull(launch, "Projectile not supported");
|
||||||
|
Loading…
Reference in New Issue
Block a user