mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-21 02:17:42 +01:00
Toggle for Wither's spawn sound
This commit is contained in:
@@ -1,39 +0,0 @@
|
|||||||
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/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;
|
|
||||||
@@ -42,6 +42,15 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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 @@
|
@@ -376,8 +_,10 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2804,6 +2804,7 @@ public class PurpurWorldConfig {
|
|||||||
public boolean witherTakeDamageFromWater = false;
|
public boolean witherTakeDamageFromWater = false;
|
||||||
public boolean witherCanRideVehicles = false;
|
public boolean witherCanRideVehicles = false;
|
||||||
public float witherExplosionRadius = 1.0F;
|
public float witherExplosionRadius = 1.0F;
|
||||||
|
public boolean witherPlaySpawnSound = true;
|
||||||
private void witherSettings() {
|
private void witherSettings() {
|
||||||
witherRidable = getBoolean("mobs.wither.ridable", witherRidable);
|
witherRidable = getBoolean("mobs.wither.ridable", witherRidable);
|
||||||
witherRidableInWater = getBoolean("mobs.wither.ridable-in-water", witherRidableInWater);
|
witherRidableInWater = getBoolean("mobs.wither.ridable-in-water", witherRidableInWater);
|
||||||
@@ -2826,6 +2827,7 @@ public class PurpurWorldConfig {
|
|||||||
witherTakeDamageFromWater = getBoolean("mobs.wither.takes-damage-from-water", witherTakeDamageFromWater);
|
witherTakeDamageFromWater = getBoolean("mobs.wither.takes-damage-from-water", witherTakeDamageFromWater);
|
||||||
witherCanRideVehicles = getBoolean("mobs.wither.can-ride-vehicles", witherCanRideVehicles);
|
witherCanRideVehicles = getBoolean("mobs.wither.can-ride-vehicles", witherCanRideVehicles);
|
||||||
witherExplosionRadius = (float) getDouble("mobs.wither.explosion-radius", witherExplosionRadius);
|
witherExplosionRadius = (float) getDouble("mobs.wither.explosion-radius", witherExplosionRadius);
|
||||||
|
witherPlaySpawnSound = getBoolean("mobs.wither.play-spawn-sound", witherPlaySpawnSound);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean witherSkeletonRidable = false;
|
public boolean witherSkeletonRidable = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user