diff options
author | TonytheMacaroni <[email protected]> | 2024-03-20 17:33:34 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2024-03-20 22:33:34 +0100 |
commit | 41ffa0cf8c26f6137a0d21d45067fee6d5896edf (patch) | |
tree | e69ade6383d83730724af6dff5145093716c9529 /patches/api/0298-Missing-Entity-API.patch | |
parent | de620b8480372e2896633f36e04e15dd01443265 (diff) | |
download | Paper-41ffa0cf8c26f6137a0d21d45067fee6d5896edf.tar.gz Paper-41ffa0cf8c26f6137a0d21d45067fee6d5896edf.zip |
Expose power on fireballs (#10302)
Diffstat (limited to 'patches/api/0298-Missing-Entity-API.patch')
-rw-r--r-- | patches/api/0298-Missing-Entity-API.patch | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/patches/api/0298-Missing-Entity-API.patch b/patches/api/0298-Missing-Entity-API.patch index 2e2d58e8f3..33d18a3ebe 100644 --- a/patches/api/0298-Missing-Entity-API.patch +++ b/patches/api/0298-Missing-Entity-API.patch @@ -9,6 +9,7 @@ Co-authored-by: William Blake Galbreath <[email protected]> Co-authored-by: SoSeDiK <[email protected]> Co-authored-by: booky10 <[email protected]> Co-authored-by: Amin <[email protected]> +Co-authored-by: TrollyLoki <[email protected]> diff --git a/src/main/java/io/papermc/paper/entity/SchoolableFish.java b/src/main/java/io/papermc/paper/entity/SchoolableFish.java new file mode 100644 @@ -413,6 +414,43 @@ index 9e7f42caab1204036f4203354c115fd40c6def92..138d2530de2410f4a9424dabd3e5ce0c + int getLifetimeTicks(); + // Paper end } +diff --git a/src/main/java/org/bukkit/entity/Fireball.java b/src/main/java/org/bukkit/entity/Fireball.java +index 7a44707f2307dc4dbfea4de3f4baf3cc0490dc93..d0e82102425e54274be9c4769634d754319d6196 100644 +--- a/src/main/java/org/bukkit/entity/Fireball.java ++++ b/src/main/java/org/bukkit/entity/Fireball.java +@@ -23,4 +23,32 @@ public interface Fireball extends Projectile, Explosive { + @NotNull + public Vector getDirection(); + ++ // Paper start - Expose power on fireball projectiles ++ /** ++ * {@inheritDoc} ++ * <p> ++ * Note: For fireball entities, their movement is also controlled by their power. ++ * ++ * @param velocity New velocity to travel with ++ * @see #setPower(Vector) ++ */ ++ @Override ++ public void setVelocity(@NotNull Vector velocity); ++ ++ /** ++ * Sets the power of a fireball. The power determines the direction and magnitude of its acceleration. ++ * ++ * @param power the power ++ */ ++ public void setPower(@NotNull Vector power); ++ ++ /** ++ * Gets the power of a fireball. The power determines the direction and magnitude of its acceleration. ++ * ++ * @return the power ++ */ ++ @NotNull ++ public Vector getPower(); ++ // Paper end - Expose power on fireball projectiles ++ + } diff --git a/src/main/java/org/bukkit/entity/Fox.java b/src/main/java/org/bukkit/entity/Fox.java index c61a473453f33f9d10c330fc46cfa9d52251fe49..473a7e36ad64f866d1d2e09e2ecb2e9881668faf 100644 --- a/src/main/java/org/bukkit/entity/Fox.java |