mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@6d63005 Fix setEggCount method from TurtleLayEggEvent (#8385) PaperMC/Paper@abe53a7 Fix typos in isTickingWorlds API javadocs (#8382) PaperMC/Paper@01a1387 Rewrite chunk system (#8177)
40 lines
2.5 KiB
Diff
40 lines
2.5 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: 12emin34 <macanovic.emin@gmail.com>
|
|
Date: Sat, 7 Aug 2021 21:27:56 +0200
|
|
Subject: [PATCH] Toggle for Wither's spawn sound
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
|
|
index bf608c0bad8f1cd99f27b610c0d6dfa4d638374d..3f0b62c733c62b8d1a9fc6494d787c9865fefadb 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
|
|
@@ -430,7 +430,7 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
|
|
}
|
|
// CraftBukkit end
|
|
|
|
- if (!this.isSilent()) {
|
|
+ if (!this.isSilent() && level.purpurConfig.witherPlaySpawnSound) {
|
|
// CraftBukkit start - Use relative location for far away sounds
|
|
// this.world.globalLevelEvent(1023, new BlockPosition(this), 0);
|
|
int viewDistance = ((ServerLevel) this.level).getCraftServer().getViewDistance() * 16;
|
|
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
|
index d7c5764ac50f313c691667bd8beb6f7067da67d0..0c21e0ca6da3819d41f55fe4b2f1539efb5eaec1 100644
|
|
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
|
@@ -2554,6 +2554,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);
|
|
@@ -2575,6 +2576,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;
|