Skip to content

Commit 92a6325

Browse files
committed
fix sound issues with axe actionables
1 parent 24bfb3b commit 92a6325

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

patches/server/0186-Tool-actionable-options.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Subject: [PATCH] Tool actionable options
55

66

77
diff --git a/src/main/java/net/minecraft/world/item/AxeItem.java b/src/main/java/net/minecraft/world/item/AxeItem.java
8-
index 2e75fd06e9e379eb95ebfe55086ffc327706ab2f..d491ff163e9da7ddacf1a68e0557cd61169f35f3 100644
8+
index 2e75fd06e9e379eb95ebfe55086ffc327706ab2f..2918b1aca8fae6a319881a631dc727b6d375a33c 100644
99
--- a/src/main/java/net/minecraft/world/item/AxeItem.java
1010
+++ b/src/main/java/net/minecraft/world/item/AxeItem.java
1111
@@ -33,13 +33,15 @@ public class AxeItem extends DiggerItem {
@@ -58,14 +58,14 @@ index 2e75fd06e9e379eb95ebfe55086ffc327706ab2f..d491ff163e9da7ddacf1a68e0557cd61
5858
+ Optional<org.purpurmc.purpur.tool.Actionable> optional = Optional.ofNullable(world.purpurConfig.axeStrippables.get(state.getBlock())); // Purpur
5959
if (optional.isPresent()) {
6060
- world.playSound(player, pos, SoundEvents.AXE_STRIP, SoundSource.BLOCKS, 1.0F, 1.0F);
61-
+ if (!STRIPPABLES.containsKey(state.getBlock())) world.playSound(null, pos, SoundEvents.AXE_STRIP, SoundSource.BLOCKS, 1.0F, 1.0F); // Purpur - force sound
61+
+ world.playSound(STRIPPABLES.containsKey(state.getBlock()) ? player : null, pos, SoundEvents.AXE_STRIP, SoundSource.BLOCKS, 1.0F, 1.0F); // Purpur - force sound
6262
return optional;
6363
} else {
6464
- Optional<BlockState> optional2 = WeatheringCopper.getPrevious(state);
6565
+ Optional<org.purpurmc.purpur.tool.Actionable> optional2 = Optional.ofNullable(world.purpurConfig.axeWeatherables.get(state.getBlock())); // Purpur
6666
if (optional2.isPresent()) {
6767
- world.playSound(player, pos, SoundEvents.AXE_SCRAPE, SoundSource.BLOCKS, 1.0F, 1.0F);
68-
+ if (!HoneycombItem.WAXABLES.get().containsKey(state.getBlock())) world.playSound(null, pos, SoundEvents.AXE_SCRAPE, SoundSource.BLOCKS, 1.0F, 1.0F); // Purpur - force sound
68+
+ world.playSound(WeatheringCopper.getPrevious(state).isPresent() ? player : null, pos, SoundEvents.AXE_SCRAPE, SoundSource.BLOCKS, 1.0F, 1.0F); // Purpur - force sound
6969
world.levelEvent(player, 3005, pos, 0);
7070
return optional2;
7171
} else {
@@ -75,7 +75,7 @@ index 2e75fd06e9e379eb95ebfe55086ffc327706ab2f..d491ff163e9da7ddacf1a68e0557cd61
7575
+ Optional<org.purpurmc.purpur.tool.Actionable> optional3 = Optional.ofNullable(world.purpurConfig.axeWaxables.get(state.getBlock())); // Purpur
7676
if (optional3.isPresent()) {
7777
- world.playSound(player, pos, SoundEvents.AXE_WAX_OFF, SoundSource.BLOCKS, 1.0F, 1.0F);
78-
+ if (!HoneycombItem.WAX_OFF_BY_BLOCK.get().containsKey(state.getBlock())) world.playSound(player, pos, SoundEvents.AXE_WAX_OFF, SoundSource.BLOCKS, 1.0F, 1.0F); // Purpur - force sound
78+
+ world.playSound(HoneycombItem.WAX_OFF_BY_BLOCK.get().containsKey(state.getBlock()) ? player : null, pos, SoundEvents.AXE_WAX_OFF, SoundSource.BLOCKS, 1.0F, 1.0F); // Purpur - force sound
7979
world.levelEvent(player, 3004, pos, 0);
8080
return optional3;
8181
} else {

0 commit comments

Comments
 (0)