aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0674-More-Projectile-API.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0674-More-Projectile-API.patch')
-rw-r--r--patches/server/0674-More-Projectile-API.patch25
1 files changed, 23 insertions, 2 deletions
diff --git a/patches/server/0674-More-Projectile-API.patch b/patches/server/0674-More-Projectile-API.patch
index 120c102c71..97f7eb71ab 100644
--- a/patches/server/0674-More-Projectile-API.patch
+++ b/patches/server/0674-More-Projectile-API.patch
@@ -515,7 +515,7 @@ index 6e2f91423371ead9890095cf4b1e2299c4dcba28..9d8f4b7176e60180565e3134a14ecf19
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-index 097f03c83a90f476b74834407d2dcd0e98fe010a..3210d7c9405a1a335ef92debf4d85957087bfcf3 100644
+index 097f03c83a90f476b74834407d2dcd0e98fe010a..741cc56304005c48b26966f617d282bae7a87ee6 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -596,7 +596,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -527,7 +527,28 @@ index 097f03c83a90f476b74834407d2dcd0e98fe010a..3210d7c9405a1a335ef92debf4d85957
} else if (ThrownPotion.class.isAssignableFrom(projectile)) {
if (LingeringPotion.class.isAssignableFrom(projectile)) {
launch = new net.minecraft.world.entity.projectile.ThrownPotion(world, this.getHandle());
-@@ -650,7 +650,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
+@@ -622,10 +622,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
+ launch = new net.minecraft.world.entity.projectile.WitherSkull(world, this.getHandle(), vec);
+ } else if (DragonFireball.class.isAssignableFrom(projectile)) {
+ launch = new net.minecraft.world.entity.projectile.DragonFireball(world, this.getHandle(), vec);
+- } else if (WindCharge.class.isAssignableFrom(projectile)) {
+- launch = EntityType.WIND_CHARGE.create(world);
+- ((net.minecraft.world.entity.projectile.windcharge.WindCharge) launch).setOwner(this.getHandle());
+- ((net.minecraft.world.entity.projectile.windcharge.WindCharge) launch).assignDirectionalMovement(vec, 0.1D);
++ // Paper start - more projectile API - correctly launch wind charges
++ } else if (org.bukkit.entity.AbstractWindCharge.class.isAssignableFrom(projectile)) {
++ if (org.bukkit.entity.BreezeWindCharge.class.isAssignableFrom(projectile)) {
++ launch = EntityType.BREEZE_WIND_CHARGE.create(world);
++ } else {
++ launch = EntityType.WIND_CHARGE.create(world);
++ }
++ ((net.minecraft.world.entity.projectile.windcharge.AbstractWindCharge) launch).setOwner(this.getHandle());
++ ((net.minecraft.world.entity.projectile.windcharge.AbstractWindCharge) launch).shootFromRotation(this.getHandle(), this.getHandle().getXRot(), this.getHandle().getYRot(), 0.0F, 1.5F, 1.0F); // Paper - copied from net.minecraft.world.item.WindChargeItem.use
++ // Paper end - more projectile API - correctly launch wind charges
+ } else {
+ launch = new LargeFireball(world, this.getHandle(), vec, 1);
+ }
+@@ -650,7 +656,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
} else if (Firework.class.isAssignableFrom(projectile)) {
Location location = this.getEyeLocation();