13
0
geforkt von Mirrors/Paper

Correctly shoot arrows with the spawnArrow Method. Fixes BUKKIT-3116

Dieser Commit ist enthalten in:
Dark Arc 2012-12-06 20:38:23 -05:00 committet von feildmaster
Ursprung 9973e7cdec
Commit 090c1a60bd

Datei anzeigen

@ -304,10 +304,13 @@ public class CraftWorld implements World {
}
public Arrow spawnArrow(Location loc, Vector velocity, float speed, float spread) {
Validate.notNull(loc, "Can not spawn arrow with a null location");
Validate.notNull(velocity, "Can not spawn arrow with a null velocity");
EntityArrow arrow = new EntityArrow(world);
arrow.setPositionRotation(loc.getX(), loc.getY(), loc.getZ(), 0, 0);
world.addEntity(arrow);
arrow.setPositionRotation(loc.getX(), loc.getY(), loc.getZ(), loc.getPitch(), loc.getYaw());
arrow.shoot(velocity.getX(), velocity.getY(), velocity.getZ(), speed, spread);
world.addEntity(arrow);
return (Arrow) arrow.getBukkitEntity();
}