Expose power on fireballs (#10302)
This commit is contained in:
parent
de620b8480
commit
41ffa0cf8c
112 changed files with 76 additions and 42 deletions
|
@ -6,7 +6,7 @@ Subject: [PATCH] Add PlayerJumpEvent
|
|||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/event/player/PlayerJumpEvent.java b/src/main/java/com/destroystokyo/paper/event/player/PlayerJumpEvent.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..d3c319298d360967b853cf0168c0a1833f094779
|
||||
index 0000000000000000000000000000000000000000..8c2fd2c1120d634052f9bc345365272ad3a67b6f
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/event/player/PlayerJumpEvent.java
|
||||
@@ -0,0 +1,106 @@
|
||||
|
@ -102,7 +102,7 @@ index 0000000000000000000000000000000000000000..d3c319298d360967b853cf0168c0a183
|
|||
+ */
|
||||
+ @NotNull
|
||||
+ public Location getTo() {
|
||||
+ return this.to;
|
||||
+ return this.to.clone();
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
|
|
|
@ -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 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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue