From 9bb6731cc4e2158f4acd5572740b32895b154206 Mon Sep 17 00:00:00 2001 From: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com> Date: Sun, 15 Dec 2024 23:24:28 +0100 Subject: [PATCH] readd potion splash effect cause --- .../world/entity/projectile/ThrownEnderpearl.java.patch | 4 +++- .../minecraft/world/entity/projectile/ThrownPotion.java.patch | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/paper-server/patches/sources/net/minecraft/world/entity/projectile/ThrownEnderpearl.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/projectile/ThrownEnderpearl.java.patch index 36963eb6e5..8fdaf1cd3c 100644 --- a/paper-server/patches/sources/net/minecraft/world/entity/projectile/ThrownEnderpearl.java.patch +++ b/paper-server/patches/sources/net/minecraft/world/entity/projectile/ThrownEnderpearl.java.patch @@ -20,7 +20,7 @@ } } -@@ -138,15 +_,15 @@ +@@ -138,15 +_,17 @@ owner.setPortalCooldown(); } @@ -29,11 +29,13 @@ - serverLevel, vec3, Vec3.ZERO, 0.0F, 0.0F, Relative.union(Relative.ROTATION, Relative.DELTA), TeleportTransition.DO_NOTHING - ) - ); ++ // CraftBukkit start - moved up + // ServerPlayer serverPlayer1 = serverPlayer.teleport( + // new TeleportTransition( + // serverLevel, vec3, Vec3.ZERO, 0.0F, 0.0F, Relative.union(Relative.ROTATION, Relative.DELTA), TeleportTransition.DO_NOTHING + // ) + // ); ++ // CraftBukkit end - moved up if (serverPlayer1 != null) { serverPlayer1.resetFallDistance(); serverPlayer1.resetCurrentImpulseContext(); diff --git a/paper-server/patches/sources/net/minecraft/world/entity/projectile/ThrownPotion.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/projectile/ThrownPotion.java.patch index 254faacccd..0fbeafb100 100644 --- a/paper-server/patches/sources/net/minecraft/world/entity/projectile/ThrownPotion.java.patch +++ b/paper-server/patches/sources/net/minecraft/world/entity/projectile/ThrownPotion.java.patch @@ -33,7 +33,7 @@ - this.applySplash( - serverLevel, potionContents.getAllEffects(), result.getType() == HitResult.Type.ENTITY ? ((EntityHitResult)result).getEntity() : null + showParticles = this.applySplash( -+ serverLevel, potionContents.getAllEffects(), result != null && result.getType() == HitResult.Type.ENTITY ? ((EntityHitResult)result).getEntity() : null, result // CraftBukkit - Pass MovingObjectPosition // Paper - More projectile API ++ serverLevel, potionContents.getAllEffects(), result != null && result.getType() == HitResult.Type.ENTITY ? ((EntityHitResult)result).getEntity() : null, result // CraftBukkit - Pass MovingObjectPosition // Paper - More projectile API ); } } @@ -172,7 +172,7 @@ + effect, i, mobEffectInstance.getAmplifier(), mobEffectInstance.isAmbient(), mobEffectInstance.isVisible() + ); + if (!mobEffectInstance1.endsWithin(20)) { -+ livingEntity.addEffect(mobEffectInstance1, effectSource); ++ livingEntity.addEffect(mobEffectInstance1, effectSource, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.POTION_SPLASH); // CraftBukkit + } + } + }