From 72369d4f4086f6aae8104124bf37ceaec913a5b9 Mon Sep 17 00:00:00 2001 From: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com> Date: Sat, 19 Nov 2022 03:14:52 +0100 Subject: [PATCH] Reorder bukkit damage source entity for explosion (#8553) --- ...amage-source-entity-for-explosion-to.patch | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 patches/server/Reorder-bukkit-damage-source-entity-for-explosion-to.patch diff --git a/patches/server/Reorder-bukkit-damage-source-entity-for-explosion-to.patch b/patches/server/Reorder-bukkit-damage-source-entity-for-explosion-to.patch new file mode 100644 index 0000000000..2d440e116f --- /dev/null +++ b/patches/server/Reorder-bukkit-damage-source-entity-for-explosion-to.patch @@ -0,0 +1,32 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com> +Date: Fri, 11 Nov 2022 11:49:40 +0100 +Subject: [PATCH] Reorder bukkit damage source entity for explosion to exclude + enderdragon part + + +diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/net/minecraft/world/level/Explosion.java ++++ b/src/main/java/net/minecraft/world/level/Explosion.java +@@ -0,0 +0,0 @@ public class Explosion { + double d13 = (1.0D - d7) * d12; + + // CraftBukkit start +- CraftEventFactory.entityDamage = this.source; +- entity.lastDamageCancelled = false; + + // Special case ender dragon only give knockback if no damage is cancelled + // Thinks to note: +@@ -0,0 +0,0 @@ public class Explosion { + continue; + } + ++ // Paper start - moved from above ++ CraftEventFactory.entityDamage = this.source; ++ entity.lastDamageCancelled = false; ++ // Paper end ++ + if (entity instanceof EnderDragon) { + for (EnderDragonPart entityComplexPart : ((EnderDragon) entity).subEntities) { + if (list.contains(entityComplexPart)) {