mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-01 12:42:05 -07:00
Expose power on fireballs (#10302)
This commit is contained in:
@@ -9,6 +9,7 @@ Co-authored-by: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Co-authored-by: SoSeDiK <mrsosedik@gmail.com>
|
||||
Co-authored-by: booky10 <boooky10@gmail.com>
|
||||
Co-authored-by: Amin <amin.haddou@frg.wwschool.de>
|
||||
Co-authored-by: TrollyLoki <trollyloki@gmail.com>
|
||||
|
||||
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 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Fireball.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Fireball.java
|
||||
@@ -0,0 +0,0 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Fox.java
|
||||
|
Reference in New Issue
Block a user