Skip to content

Commit 0acba63

Browse files
Fix several sound related bugs (#425)
* fix MC-139041, MC-202637, MC-227337, & MC-245394 * fix MC-248223 * remove MC-248223 * remove patch note for MC-248223 --------- Co-authored-by: Xander <xander@isxander.dev>
1 parent e5d4785 commit 0acba63

6 files changed

Lines changed: 86 additions & 0 deletions

File tree

PATCHED.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
| Basic | [MC-121903](https://bugs.mojang.com/browse/MC-121903) | Command block minecarts do not save execution cooldown to NBT |
6161
| Basic | [MC-129909](https://bugs.mojang.com/browse/MC-129909) | Players in spectator mode continue to consume foods and liquids shortly after switching game modes |
6262
| Basic | [MC-132878](https://bugs.mojang.com/browse/MC-132878) | Armor stands destroyed by explosions/lava/fire don't produce particles |
63+
| Basic | [MC-139041](https://bugs.mojang.com/browse/MC-139041) | The sounds of fishing bobbers aren't controlled by the "Players" sound slider |
6364
| Basic | [MC-155509](https://bugs.mojang.com/browse/MC-155509) | Puffed pufferfish can hurt the player while dying |
6465
| Basic | [MC-159283](https://bugs.mojang.com/browse/MC-159283) | The End terrain does not generate in multiple rings centered around the world center |
6566
| Basic | [MC-160095](https://bugs.mojang.com/browse/MC-160095) | End Rods only break Cactus when moved by pistons |
@@ -69,15 +70,18 @@
6970
| Basic | [MC-183990](https://bugs.mojang.com/browse/MC-183990) | Group AI of some mobs breaks when their target dies |
7071
| Basic | [MC-199467](https://bugs.mojang.com/browse/MC-199467) | Certain entity animations stop after they've existed in world for too long |
7172
| Basic | [MC-200418](https://bugs.mojang.com/browse/MC-200418) | Cured baby zombie villagers stay as jockey variant |
73+
| Basic | [MC-202637](https://bugs.mojang.com/browse/MC-202637) | Last sound clip of eating will still play when Players volume is set to 0% |
7274
| Basic | [MC-214147](https://bugs.mojang.com/browse/MC-214147) | Skeletons wearing leather armor still convert to strays in powder snow |
7375
| Basic | [MC-206705](https://bugs.mojang.com/browse/MC-206705) | Spyglasses stay in use in spectator mode |
7476
| Basic | [MC-206922](https://bugs.mojang.com/browse/MC-206922) | Items dropped by entities that are killed by lightning instantly disappear |
7577
| Basic | [MC-215530](https://bugs.mojang.com/browse/MC-215530) | The freezing effect isn't immediately removed when switching into spectator mode |
7678
| Basic | [MC-221257](https://bugs.mojang.com/browse/MC-221257) | Shulker bullets don't produce bubble particles when moving through water |
7779
| Basic | [MC-223153](https://bugs.mojang.com/browse/MC-223153) | Block of Raw Copper uses stone sounds instead of copper sounds |
7880
| Basic | [MC-224729](https://bugs.mojang.com/browse/MC-224729) | Partially generated chunks are not saved in some situations |
81+
| Basic | [MC-227337](https://bugs.mojang.com/browse/MC-227337) | When a shulker bullet hits an entity, the explodes sound is not played and particles are not produced |
7982
| Basic | [MC-231743](https://bugs.mojang.com/browse/MC-231743) | minecraft.used:minecraft.POTTABLE_PLANT doesn't increase when placing plants into flower pots |
8083
| Basic | [MC-232869](https://bugs.mojang.com/browse/MC-232869) | Adult striders can spawn with saddles in peaceful mode |
84+
| Basic | [MC-245394](https://bugs.mojang.com/browse/MC-245394) | The sounds of raid horns blaring aren't controlled by the correct sound slider |
8185
| Basic | [MC-268617](https://bugs.mojang.com/browse/MC-268617) | Structures can't be saved if the game directory is named in a certain way |
8286

8387
## Previously patched
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package dev.isxander.debugify.mixins.basic.mc139041;
2+
3+
import dev.isxander.debugify.fixes.BugFix;
4+
import dev.isxander.debugify.fixes.FixCategory;
5+
import net.minecraft.sounds.SoundSource;
6+
import net.minecraft.world.item.FishingRodItem;
7+
import org.spongepowered.asm.mixin.Mixin;
8+
import org.spongepowered.asm.mixin.injection.At;
9+
import org.spongepowered.asm.mixin.injection.ModifyArg;
10+
11+
@BugFix(id = "MC-139041", category = FixCategory.BASIC, env = BugFix.Env.SERVER, description = "The sounds of fishing bobbers aren't controlled by the \"Players\" sound slider")
12+
@Mixin(FishingRodItem.class)
13+
public class FishingRodItemMixin {
14+
@ModifyArg(method = "use", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/Level;playSound(Lnet/minecraft/world/entity/Entity;DDDLnet/minecraft/sounds/SoundEvent;Lnet/minecraft/sounds/SoundSource;FF)V"), index = 5)
15+
private SoundSource modifyFishingBobberSounds(SoundSource soundSource) {
16+
return SoundSource.PLAYERS;
17+
}
18+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package dev.isxander.debugify.mixins.basic.mc202637;
2+
3+
import dev.isxander.debugify.fixes.BugFix;
4+
import dev.isxander.debugify.fixes.FixCategory;
5+
import net.minecraft.sounds.SoundSource;
6+
import net.minecraft.world.food.FoodProperties;
7+
import org.spongepowered.asm.mixin.Mixin;
8+
import org.spongepowered.asm.mixin.injection.At;
9+
import org.spongepowered.asm.mixin.injection.ModifyArg;
10+
11+
@BugFix(id = "MC-202637", category = FixCategory.BASIC, env = BugFix.Env.SERVER, description = "Last sound clip of eating will still play when Players volume is set to 0%")
12+
@Mixin(FoodProperties.class)
13+
public class FoodPropertiesMixin {
14+
@ModifyArg(method = "onConsume", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/Level;playSound(Lnet/minecraft/world/entity/Entity;DDDLnet/minecraft/sounds/SoundEvent;Lnet/minecraft/sounds/SoundSource;FF)V", ordinal = 0), index = 5)
15+
private SoundSource modifyEatSoundSource(SoundSource soundSource) {
16+
return SoundSource.PLAYERS;
17+
}
18+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package dev.isxander.debugify.mixins.basic.mc227337;
2+
3+
import dev.isxander.debugify.fixes.BugFix;
4+
import dev.isxander.debugify.fixes.FixCategory;
5+
import net.minecraft.core.particles.ParticleTypes;
6+
import net.minecraft.server.level.ServerLevel;
7+
import net.minecraft.sounds.SoundEvents;
8+
import net.minecraft.world.entity.projectile.ShulkerBullet;
9+
import net.minecraft.world.phys.EntityHitResult;
10+
import org.spongepowered.asm.mixin.Mixin;
11+
import org.spongepowered.asm.mixin.injection.At;
12+
import org.spongepowered.asm.mixin.injection.Inject;
13+
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
14+
15+
@BugFix(id = "MC-227337", category = FixCategory.BASIC, env = BugFix.Env.SERVER, description = "When a shulker bullet hits an entity, the explodes sound is not played and particles are not produced")
16+
@Mixin(ShulkerBullet.class)
17+
public class ShulkerBulletMixin {
18+
@Inject(method = "onHitEntity", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/phys/EntityHitResult;getEntity()Lnet/minecraft/world/entity/Entity;"))
19+
private void playSoundAndDisplayParticles(EntityHitResult entityHitResult, CallbackInfo ci) {
20+
ShulkerBullet instance = (ShulkerBullet) (Object) this;
21+
((ServerLevel) instance.level()).sendParticles(ParticleTypes.EXPLOSION, instance.getX(), instance.getY(), instance.getZ(), 2, 0.2D, 0.2D, 0.2D, 0.0D);
22+
instance.playSound(SoundEvents.SHULKER_BULLET_HIT, 1.0F, 1.0F);
23+
}
24+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package dev.isxander.debugify.mixins.basic.mc245394;
2+
3+
import dev.isxander.debugify.fixes.BugFix;
4+
import dev.isxander.debugify.fixes.FixCategory;
5+
import net.minecraft.sounds.SoundSource;
6+
import net.minecraft.world.entity.raid.Raid;
7+
import org.spongepowered.asm.mixin.Mixin;
8+
import org.spongepowered.asm.mixin.injection.At;
9+
import org.spongepowered.asm.mixin.injection.ModifyArg;
10+
11+
@BugFix(id = "MC-245394", category = FixCategory.BASIC, env = BugFix.Env.SERVER, description = "The sounds of raid horns blaring aren't controlled by the correct sound slider")
12+
@Mixin(Raid.class)
13+
public class RaidMixin {
14+
@ModifyArg(method = "playSound", at = @At(value = "INVOKE", target = "Lnet/minecraft/network/protocol/game/ClientboundSoundPacket;<init>(Lnet/minecraft/core/Holder;Lnet/minecraft/sounds/SoundSource;DDDFFJ)V"), index = 1)
15+
private SoundSource modifyRaidSoundSource(SoundSource soundSource) {
16+
return SoundSource.HOSTILE;
17+
}
18+
}

src/main/resources/debugify.mixins.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"basic.mc121903.MinecraftCommandBlockMixin",
1717
"basic.mc129909.ServerPlayerMixin",
1818
"basic.mc132878.ArmorStandMixin",
19+
"basic.mc139041.FishingRodItemMixin",
1920
"basic.mc155509.PufferfishMixin",
2021
"basic.mc159283.DensityFunctionsMixin",
2122
"basic.mc160095.CactusBlockMixin",
@@ -27,14 +28,17 @@
2728
"basic.mc199467.MthMixin",
2829
"basic.mc200418.ZombieVillagerMixin",
2930
"basic.mc2025.EntityMixin",
31+
"basic.mc202637.FoodPropertiesMixin",
3032
"basic.mc206922.EntityMixin",
3133
"basic.mc206922.ItemEntityMixin",
3234
"basic.mc215530.ServerPlayerMixin",
3335
"basic.mc221257.ShulkerBulletMixin",
3436
"basic.mc223153.BlocksMixin",
3537
"basic.mc224729.ChunkMapMixin",
38+
"basic.mc227337.ShulkerBulletMixin",
3639
"basic.mc231743.FlowerPotBlockMixin",
3740
"basic.mc232869.StriderMixin",
41+
"basic.mc245394.RaidMixin",
3842
"basic.mc268617.FileUtilMixin",
3943
"basic.mc30391.LivingEntityMixin",
4044
"basic.mc69216.ServerPlayerMixin",

0 commit comments

Comments
 (0)