diff options
Diffstat (limited to 'patches/server/0969-Fix-DamageSource-API.patch')
-rw-r--r-- | patches/server/0969-Fix-DamageSource-API.patch | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/patches/server/0969-Fix-DamageSource-API.patch b/patches/server/0969-Fix-DamageSource-API.patch index 2f3c828816..5cb5829aa4 100644 --- a/patches/server/0969-Fix-DamageSource-API.patch +++ b/patches/server/0969-Fix-DamageSource-API.patch @@ -7,10 +7,10 @@ Uses the correct entity in the EntityDamageByEntity event Returns the correct entity for API's DamageSource#getCausingEntity diff --git a/src/main/java/net/minecraft/world/damagesource/DamageSource.java b/src/main/java/net/minecraft/world/damagesource/DamageSource.java -index a78fd4f9ce97ebece45979908382de8f5fc14c1b..160dc3216e8f5db5f9b3cce5e2d655f2b35b208a 100644 +index ffb7c966617bdfa2c3f05ec4e753e32996493343..359a2f0492a9b938a4f015c546e100e0092ae1d4 100644 --- a/src/main/java/net/minecraft/world/damagesource/DamageSource.java +++ b/src/main/java/net/minecraft/world/damagesource/DamageSource.java -@@ -28,7 +28,8 @@ public class DamageSource { +@@ -29,7 +29,8 @@ public class DamageSource { private boolean withSweep = false; private boolean melting = false; private boolean poison = false; @@ -20,7 +20,7 @@ index a78fd4f9ce97ebece45979908382de8f5fc14c1b..160dc3216e8f5db5f9b3cce5e2d655f2 public DamageSource sweep() { this.withSweep = true; -@@ -57,18 +58,18 @@ public class DamageSource { +@@ -58,18 +59,18 @@ public class DamageSource { return this.poison; } @@ -139,7 +139,7 @@ index 02931861de955352e71d6f5ffc720a17304815fe..55b4b5ad5f084c9a271a716d07667247 if (flag && entity instanceof LivingEntity) { diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java -index 0a8e46eef6df0bfda663758fc22b1eb4640aaf4e..67c7458619227961e065615853f4ed02559a0723 100644 +index 414297ab9e953049b5f0b091e54d37c6e9edf861..2f9be855815d8db0098f969c2d1bd0c3c25f0892 100644 --- a/src/main/java/net/minecraft/world/level/Explosion.java +++ b/src/main/java/net/minecraft/world/level/Explosion.java @@ -104,7 +104,7 @@ public class Explosion { @@ -190,7 +190,7 @@ index 4c6e15535fa40aad8cf1920f392589404f9ba79c..35eb95ef6fb6a0f7ea63351e90741c48 } } diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 444287fea080182df533198f5c659533de86c5dc..544567e576023709f86abf57963c37a5490ab9f0 100644 +index 31bc4a0408da3bf3b0d8eb56b045e9742a898a39..92a9643a31d3b753c997854a0db0ceabe883fd29 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -1082,7 +1082,7 @@ public class CraftEventFactory { @@ -201,4 +201,4 @@ index 444287fea080182df533198f5c659533de86c5dc..544567e576023709f86abf57963c37a5 + final Entity damager = source.getCustomEventDamager(); // Paper - fix DamageSource API if (source.is(DamageTypeTags.IS_EXPLOSION)) { if (damager == null) { - return CraftEventFactory.callEntityDamageEvent(source.getDirectBlock(), entity, DamageCause.BLOCK_EXPLOSION, bukkitDamageSource, modifiers, modifierFunctions, cancelled, source.explodedBlockState); // Paper - Include BlockState for damage + return CraftEventFactory.callEntityDamageEvent(source.getDirectBlock(), entity, DamageCause.BLOCK_EXPLOSION, bukkitDamageSource, modifiers, modifierFunctions, cancelled, source.blockState); // Paper - Include BlockState for damage |