aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0586-Missing-Entity-API.patch
diff options
context:
space:
mode:
authorTonytheMacaroni <[email protected]>2024-03-20 17:33:34 -0400
committerGitHub <[email protected]>2024-03-20 22:33:34 +0100
commit41ffa0cf8c26f6137a0d21d45067fee6d5896edf (patch)
treee69ade6383d83730724af6dff5145093716c9529 /patches/server/0586-Missing-Entity-API.patch
parentde620b8480372e2896633f36e04e15dd01443265 (diff)
downloadPaper-41ffa0cf8c26f6137a0d21d45067fee6d5896edf.tar.gz
Paper-41ffa0cf8c26f6137a0d21d45067fee6d5896edf.zip
Expose power on fireballs (#10302)
Diffstat (limited to 'patches/server/0586-Missing-Entity-API.patch')
-rw-r--r--patches/server/0586-Missing-Entity-API.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/patches/server/0586-Missing-Entity-API.patch b/patches/server/0586-Missing-Entity-API.patch
index 1d25ac6396..501d3329dd 100644
--- a/patches/server/0586-Missing-Entity-API.patch
+++ b/patches/server/0586-Missing-Entity-API.patch
@@ -36,6 +36,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/com/destroystokyo/paper/entity/ai/MobGoalHelper.java b/src/main/java/com/destroystokyo/paper/entity/ai/MobGoalHelper.java
index 8117578ced94aa6bf01871f6526a388385c4adf2..59699c59fdfc611177fdb3136f84ab539b17d9c9 100644
@@ -666,6 +667,31 @@ index fc0f0e841dc974d080e1abb9bbafb5165801131f..d657fd2c507a5b215aeab0a5f3e9c2ee
+ }
+ // Paper end
}
+diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java
+index 73cb7aa01af3eed71b05b1a539f082b26dcd8d60..e1a2f0924da6ebcdf332040f922226af5d8a2d45 100644
+--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java
++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java
+@@ -59,6 +59,20 @@ public class CraftFireball extends AbstractProjectile implements Fireball {
+ this.update(); // SPIGOT-6579
+ }
+
++ // Paper start - Expose power on fireball projectiles
++ @Override
++ public void setPower(final Vector power) {
++ this.getHandle().xPower = power.getX();
++ this.getHandle().yPower = power.getY();
++ this.getHandle().zPower = power.getZ();
++ }
++
++ @Override
++ public Vector getPower() {
++ return new Vector(this.getHandle().xPower, this.getHandle().yPower, this.getHandle().zPower);
++ }
++ // Paper end - Expose power on fireball projectiles
++
+ @Override
+ public AbstractHurtingProjectile getHandle() {
+ return (AbstractHurtingProjectile) this.entity;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFox.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFox.java
index 17164811bbcf983bef62c47bc99330074762267b..c455deb4fd2a7684bcc01a8212c362a2375c190b 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFox.java