diff options
author | Esoteric Enderman <[email protected]> | 2024-09-28 20:32:56 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2024-09-28 21:32:56 +0200 |
commit | 355b1cbaf6f0d6331476cb6e45291da647493dd1 (patch) | |
tree | 7c9976e61893fac5d41106a31513f6653ccf1947 /patches/server/0597-Improve-and-expand-AsyncCatcher.patch | |
parent | 7b031414984efcfe74e9aeb9db10a78e7af63b1a (diff) | |
download | Paper-355b1cbaf6f0d6331476cb6e45291da647493dd1.tar.gz Paper-355b1cbaf6f0d6331476cb6e45291da647493dd1.zip |
Add API for explosions to damage the explosion cause (#11180)
This intends to give plugin developers more control over explosions created using the World#createExplosion method, specifically by adding the option for explosions to damage the explosion cause (not the default behavior, and previously impossible to do, as far as I know). This is done by overloading existing methods with an extra `excludeSourceFromDamage` parameter.
Co-authored-by: Bjarne Koll <[email protected]>
Diffstat (limited to 'patches/server/0597-Improve-and-expand-AsyncCatcher.patch')
-rw-r--r-- | patches/server/0597-Improve-and-expand-AsyncCatcher.patch | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/patches/server/0597-Improve-and-expand-AsyncCatcher.patch b/patches/server/0597-Improve-and-expand-AsyncCatcher.patch index 08143bc4aa..302d89f6e7 100644 --- a/patches/server/0597-Improve-and-expand-AsyncCatcher.patch +++ b/patches/server/0597-Improve-and-expand-AsyncCatcher.patch @@ -166,10 +166,10 @@ index 1cfc906317f07a44f06a4adf021c44e34a2f1d07..6baa313b8201ed23193d7885c85606b0 PersistentEntitySectionManager.LOGGER.warn("Entity {} wasn't found in section {} (destroying due to {})", new Object[]{this.entity, SectionPos.of(this.currentSectionKey), reason}); } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 390cacc7916d1322a7e1e8bff004d415e9fa5622..786a3722f3a50d828e5abe2ff9d415b0e10995ce 100644 +index e165199e30c96e0402c581d389eaae4c0869385f..654935df9dcc80de31caeccdfbeb11010f9dde4b 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1758,6 +1758,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1760,6 +1760,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public void playSound(Location loc, Sound sound, org.bukkit.SoundCategory category, float volume, float pitch, long seed) { @@ -177,7 +177,7 @@ index 390cacc7916d1322a7e1e8bff004d415e9fa5622..786a3722f3a50d828e5abe2ff9d415b0 if (loc == null || sound == null || category == null) return; double x = loc.getX(); -@@ -1769,6 +1770,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1771,6 +1772,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public void playSound(Location loc, String sound, org.bukkit.SoundCategory category, float volume, float pitch, long seed) { @@ -185,7 +185,7 @@ index 390cacc7916d1322a7e1e8bff004d415e9fa5622..786a3722f3a50d828e5abe2ff9d415b0 if (loc == null || sound == null || category == null) return; double x = loc.getX(); -@@ -1801,6 +1803,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1803,6 +1805,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public void playSound(Entity entity, Sound sound, org.bukkit.SoundCategory category, float volume, float pitch, long seed) { @@ -193,7 +193,7 @@ index 390cacc7916d1322a7e1e8bff004d415e9fa5622..786a3722f3a50d828e5abe2ff9d415b0 if (!(entity instanceof CraftEntity craftEntity) || entity.getWorld() != this || sound == null || category == null) return; ClientboundSoundEntityPacket packet = new ClientboundSoundEntityPacket(CraftSound.bukkitToMinecraftHolder(sound), net.minecraft.sounds.SoundSource.valueOf(category.name()), craftEntity.getHandle(), volume, pitch, seed); -@@ -1812,6 +1815,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1814,6 +1817,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public void playSound(Entity entity, String sound, org.bukkit.SoundCategory category, float volume, float pitch, long seed) { |