mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-16 14:33:09 +01:00
SPIGOT-6993: Allow #setVelocity to change the speed of a fireball and add a note to #setDirection about it
By: DerFrZocker <derrieple@gmail.com>
This commit is contained in:
parent
92293c1b89
commit
eb7e6bde61
1 changed files with 11 additions and 2 deletions
|
@ -9,14 +9,23 @@ import org.jetbrains.annotations.NotNull;
|
||||||
public interface Fireball extends Projectile, Explosive {
|
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);
|
public void setDirection(@NotNull Vector direction);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve the direction this fireball is heading toward
|
* Retrieve the direction this fireball is heading toward
|
||||||
|
* The returned vector is not normalized.
|
||||||
*
|
*
|
||||||
* @return the direction
|
* @return the direction
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue