diff --git a/patches/server/0192-Toggle-for-Wither-s-spawn-sound.patch b/patches/server/0192-Toggle-for-Wither-s-spawn-sound.patch deleted file mode 100644 index 8e7c52ac4..000000000 --- a/patches/server/0192-Toggle-for-Wither-s-spawn-sound.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: 12emin34 -Date: Sat, 7 Aug 2021 21:27:56 +0200 -Subject: [PATCH] Toggle for Wither's spawn sound - - -diff --git a/net/minecraft/world/entity/boss/wither/WitherBoss.java b/net/minecraft/world/entity/boss/wither/WitherBoss.java -index 5f40d6d5b002f1f098245c3aa1174c85759191ce..9e37864a630151aee431aa4031ecc4033de1766f 100644 ---- a/net/minecraft/world/entity/boss/wither/WitherBoss.java -+++ b/net/minecraft/world/entity/boss/wither/WitherBoss.java -@@ -425,7 +425,7 @@ public class WitherBoss extends Monster implements RangedAttackMob { - } - // CraftBukkit end - -- if (!this.isSilent()) { -+ if (!this.isSilent() && level().purpurConfig.witherPlaySpawnSound) { - // CraftBukkit start - Use relative location for far away sounds - // worldserver.globalLevelEvent(1023, new BlockPosition(this), 0); - int viewDistance = world.getCraftServer().getViewDistance() * 16; -diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -index 1385065c45b817c4677010b9a4968f0987818f0a..71531ec956bf1de473bca192988a26a0a33b0458 100644 ---- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -@@ -2805,6 +2805,7 @@ public class PurpurWorldConfig { - public boolean witherTakeDamageFromWater = false; - public boolean witherCanRideVehicles = false; - public float witherExplosionRadius = 1.0F; -+ public boolean witherPlaySpawnSound = true; - private void witherSettings() { - witherRidable = getBoolean("mobs.wither.ridable", witherRidable); - witherRidableInWater = getBoolean("mobs.wither.ridable-in-water", witherRidableInWater); -@@ -2827,6 +2828,7 @@ public class PurpurWorldConfig { - witherTakeDamageFromWater = getBoolean("mobs.wither.takes-damage-from-water", witherTakeDamageFromWater); - witherCanRideVehicles = getBoolean("mobs.wither.can-ride-vehicles", witherCanRideVehicles); - witherExplosionRadius = (float) getDouble("mobs.wither.explosion-radius", witherExplosionRadius); -+ witherPlaySpawnSound = getBoolean("mobs.wither.play-spawn-sound", witherPlaySpawnSound); - } - - public boolean witherSkeletonRidable = false; diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/boss/wither/WitherBoss.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/boss/wither/WitherBoss.java.patch index dfc885fd0..30e1ffb25 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/boss/wither/WitherBoss.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/entity/boss/wither/WitherBoss.java.patch @@ -42,6 +42,15 @@ } @Override +@@ -269,7 +_,7 @@ + level.explode(this, this.getX(), this.getEyeY(), this.getZ(), event.getRadius(), event.getFire(), Level.ExplosionInteraction.MOB); + } + // CraftBukkit end +- if (!this.isSilent()) { ++ if (!this.isSilent() && level.purpurConfig.witherPlaySpawnSound) { // Purpur - Toggle for Wither's spawn sound + // CraftBukkit start - Use relative location for far away sounds + // level.globalLevelEvent(1023, this.blockPosition(), 0); + int viewDistance = level.getCraftServer().getViewDistance() * 16; @@ -376,8 +_,10 @@ } } diff --git a/purpur-server/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/purpur-server/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java index 96cb4b957..58c575de6 100644 --- a/purpur-server/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/purpur-server/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java @@ -2804,6 +2804,7 @@ public class PurpurWorldConfig { public boolean witherTakeDamageFromWater = false; public boolean witherCanRideVehicles = false; public float witherExplosionRadius = 1.0F; + public boolean witherPlaySpawnSound = true; private void witherSettings() { witherRidable = getBoolean("mobs.wither.ridable", witherRidable); witherRidableInWater = getBoolean("mobs.wither.ridable-in-water", witherRidableInWater); @@ -2826,6 +2827,7 @@ public class PurpurWorldConfig { witherTakeDamageFromWater = getBoolean("mobs.wither.takes-damage-from-water", witherTakeDamageFromWater); witherCanRideVehicles = getBoolean("mobs.wither.can-ride-vehicles", witherCanRideVehicles); witherExplosionRadius = (float) getDouble("mobs.wither.explosion-radius", witherExplosionRadius); + witherPlaySpawnSound = getBoolean("mobs.wither.play-spawn-sound", witherPlaySpawnSound); } public boolean witherSkeletonRidable = false;