Preserve velocity for fireball (#10934)

This commit is contained in:
Lulu13022002 2024-06-21 20:06:31 +02:00 committed by GitHub
parent 0409a68f50
commit 9cd0201535
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 49 additions and 25 deletions

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Add a consumer parameter to ProjectileSource#launchProjectile
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 7a673ed23eb4aec1dd3d558ad1fd81ceb899ca92..790f274948d5a9563ab222cffa6e6df1410d1cf0 100644
index cc33f39dc31692e9309e62c09463e1cc621e2534..d0601fa54f804059b86cf8d5d459b756308e360b 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -569,8 +569,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@ -25,7 +25,7 @@ index 7a673ed23eb4aec1dd3d558ad1fd81ceb899ca92..790f274948d5a9563ab222cffa6e6df1
Preconditions.checkState(!this.getHandle().generation, "Cannot launch projectile during world generation");
net.minecraft.world.level.Level world = ((CraftWorld) this.getWorld()).getHandle();
@@ -658,6 +665,11 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -659,6 +666,11 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
if (velocity != null) {
((T) launch.getBukkitEntity()).setVelocity(velocity);
}