Skip to content

Commit 0c58436

Browse files
committed
Added rule witherSpawnedSoundDisabled
ported from Carpet-TIS-Addition
1 parent 115a6e0 commit 0c58436

2 files changed

Lines changed: 28 additions & 0 deletions

File tree

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
--- a/net/minecraft/entity/boss/EntityWither.java
2+
+++ b/net/minecraft/entity/boss/EntityWither.java
3+
@@ -1,5 +1,6 @@
4+
package net.minecraft.entity.boss;
5+
6+
+import carpet.settings.CarpetSettings;
7+
import com.google.common.collect.ImmutableList;
8+
import java.util.List;
9+
import java.util.function.Predicate;
10+
@@ -246,7 +247,12 @@
11+
if (j1 <= 0)
12+
{
13+
this.world.newExplosion(this, this.posX, this.posY + (double)this.getEyeHeight(), this.posZ, 7.0F, false, this.world.getGameRules().getBoolean("mobGriefing"));
14+
- this.world.playBroadcastSound(1023, new BlockPos(this), 0);
15+
+
16+
+ // TISCM witherSpawnedSoundDisabled wraps the invocation
17+
+ if (!CarpetSettings.witherSpawnedSoundDisabled)
18+
+ {
19+
+ this.world.playBroadcastSound(1023, new BlockPos(this), 0);
20+
+ }
21+
}
22+
23+
this.setInvulTime(j1);

src/main/java/carpet/settings/CarpetSettings.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -661,6 +661,11 @@ public String description()
661661
)
662662
public static int entityTrackerInterval = -1;
663663

664+
@Rule(
665+
desc = "Disable the wither spawned sound emitted when a wither fully reset its health after summoned",
666+
category = {CREATIVE}
667+
)
668+
public static boolean witherSpawnedSoundDisabled = false;
664669

665670
// /$$$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$ /$$ /$$
666671
//|__ $$__/|_ $$_/ /$$__ $$ /$$__ $$| $$$ /$$$

0 commit comments

Comments
 (0)