mirror of
https://hub.spigotmc.org/stash/scm/spigot/bukkit.git
synced 2025-08-31 22:22:49 +00:00
SPIGOT-6993: Allow #setVelocity to change the speed of a fireball and add a note to #setDirection about it
This commit is contained in:
parent
8c7880fb60
commit
035ea14660
1 changed files with 11 additions and 2 deletions
|
@ -9,14 +9,23 @@ import org.jetbrains.annotations.NotNull;
|
|||
public interface Fireball extends Projectile, Explosive {
|
||||
|
||||
/**
|
||||
* Fireballs fly straight and do not take setVelocity(...) well.
|
||||
* Sets the direction the fireball should be flying towards.
|
||||
* The direction vector will be normalized and the default speed will be applied.
|
||||
* <br>
|
||||
* To also change the speed of the fireball, use {@link #setVelocity(Vector)}.
|
||||
* <b>Note:</b> that the client may not respect non-default speeds and will therefore
|
||||
* mispredict the location of the fireball, causing visual stutter.
|
||||
* <br>
|
||||
* <b>Also Note:</b> that this method and {@link #setVelocity(Vector)} will override each other.
|
||||
*
|
||||
* @param direction the direction this fireball is flying toward
|
||||
* @param direction the direction this fireball should be flying towards
|
||||
* @see #setVelocity(Vector)
|
||||
*/
|
||||
public void setDirection(@NotNull Vector direction);
|
||||
|
||||
/**
|
||||
* Retrieve the direction this fireball is heading toward
|
||||
* The returned vector is not normalized.
|
||||
*
|
||||
* @return the direction
|
||||
*/
|
||||
|
|
Loading…
Add table
Reference in a new issue