diff --git a/PATCHED.md b/PATCHED.md index 5c65c6af..d4f5a19c 100644 --- a/PATCHED.md +++ b/PATCHED.md @@ -60,6 +60,7 @@ | Basic | [MC-121903](https://bugs.mojang.com/browse/MC-121903) | Command block minecarts do not save execution cooldown to NBT | | 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 | | Basic | [MC-132878](https://bugs.mojang.com/browse/MC-132878) | Armor stands destroyed by explosions/lava/fire don't produce particles | +| Basic | [MC-139041](https://bugs.mojang.com/browse/MC-139041) | The sounds of fishing bobbers aren't controlled by the "Players" sound slider | | Basic | [MC-155509](https://bugs.mojang.com/browse/MC-155509) | Puffed pufferfish can hurt the player while dying | | Basic | [MC-159283](https://bugs.mojang.com/browse/MC-159283) | The End terrain does not generate in multiple rings centered around the world center | | Basic | [MC-160095](https://bugs.mojang.com/browse/MC-160095) | End Rods only break Cactus when moved by pistons | @@ -69,6 +70,7 @@ | Basic | [MC-183990](https://bugs.mojang.com/browse/MC-183990) | Group AI of some mobs breaks when their target dies | | Basic | [MC-199467](https://bugs.mojang.com/browse/MC-199467) | Certain entity animations stop after they've existed in world for too long | | Basic | [MC-200418](https://bugs.mojang.com/browse/MC-200418) | Cured baby zombie villagers stay as jockey variant | +| 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% | | Basic | [MC-214147](https://bugs.mojang.com/browse/MC-214147) | Skeletons wearing leather armor still convert to strays in powder snow | | Basic | [MC-206705](https://bugs.mojang.com/browse/MC-206705) | Spyglasses stay in use in spectator mode | | Basic | [MC-206922](https://bugs.mojang.com/browse/MC-206922) | Items dropped by entities that are killed by lightning instantly disappear | @@ -76,8 +78,10 @@ | Basic | [MC-221257](https://bugs.mojang.com/browse/MC-221257) | Shulker bullets don't produce bubble particles when moving through water | | Basic | [MC-223153](https://bugs.mojang.com/browse/MC-223153) | Block of Raw Copper uses stone sounds instead of copper sounds | | Basic | [MC-224729](https://bugs.mojang.com/browse/MC-224729) | Partially generated chunks are not saved in some situations | +| 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 | | Basic | [MC-231743](https://bugs.mojang.com/browse/MC-231743) | minecraft.used:minecraft.POTTABLE_PLANT doesn't increase when placing plants into flower pots | | Basic | [MC-232869](https://bugs.mojang.com/browse/MC-232869) | Adult striders can spawn with saddles in peaceful mode | +| Basic | [MC-245394](https://bugs.mojang.com/browse/MC-245394) | The sounds of raid horns blaring aren't controlled by the correct sound slider | | 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 | ## Previously patched diff --git a/src/main/java/dev/isxander/debugify/mixins/basic/mc139041/FishingRodItemMixin.java b/src/main/java/dev/isxander/debugify/mixins/basic/mc139041/FishingRodItemMixin.java new file mode 100644 index 00000000..d1e1ba70 --- /dev/null +++ b/src/main/java/dev/isxander/debugify/mixins/basic/mc139041/FishingRodItemMixin.java @@ -0,0 +1,18 @@ +package dev.isxander.debugify.mixins.basic.mc139041; + +import dev.isxander.debugify.fixes.BugFix; +import dev.isxander.debugify.fixes.FixCategory; +import net.minecraft.sounds.SoundSource; +import net.minecraft.world.item.FishingRodItem; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.ModifyArg; + +@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") +@Mixin(FishingRodItem.class) +public class FishingRodItemMixin { + @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) + private SoundSource modifyFishingBobberSounds(SoundSource soundSource) { + return SoundSource.PLAYERS; + } +} diff --git a/src/main/java/dev/isxander/debugify/mixins/basic/mc202637/FoodPropertiesMixin.java b/src/main/java/dev/isxander/debugify/mixins/basic/mc202637/FoodPropertiesMixin.java new file mode 100644 index 00000000..21dcbcc1 --- /dev/null +++ b/src/main/java/dev/isxander/debugify/mixins/basic/mc202637/FoodPropertiesMixin.java @@ -0,0 +1,18 @@ +package dev.isxander.debugify.mixins.basic.mc202637; + +import dev.isxander.debugify.fixes.BugFix; +import dev.isxander.debugify.fixes.FixCategory; +import net.minecraft.sounds.SoundSource; +import net.minecraft.world.food.FoodProperties; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.ModifyArg; + +@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%") +@Mixin(FoodProperties.class) +public class FoodPropertiesMixin { + @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) + private SoundSource modifyEatSoundSource(SoundSource soundSource) { + return SoundSource.PLAYERS; + } +} diff --git a/src/main/java/dev/isxander/debugify/mixins/basic/mc227337/ShulkerBulletMixin.java b/src/main/java/dev/isxander/debugify/mixins/basic/mc227337/ShulkerBulletMixin.java new file mode 100644 index 00000000..b00184bb --- /dev/null +++ b/src/main/java/dev/isxander/debugify/mixins/basic/mc227337/ShulkerBulletMixin.java @@ -0,0 +1,24 @@ +package dev.isxander.debugify.mixins.basic.mc227337; + +import dev.isxander.debugify.fixes.BugFix; +import dev.isxander.debugify.fixes.FixCategory; +import net.minecraft.core.particles.ParticleTypes; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.sounds.SoundEvents; +import net.minecraft.world.entity.projectile.ShulkerBullet; +import net.minecraft.world.phys.EntityHitResult; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; + +@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") +@Mixin(ShulkerBullet.class) +public class ShulkerBulletMixin { + @Inject(method = "onHitEntity", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/phys/EntityHitResult;getEntity()Lnet/minecraft/world/entity/Entity;")) + private void playSoundAndDisplayParticles(EntityHitResult entityHitResult, CallbackInfo ci) { + ShulkerBullet instance = (ShulkerBullet) (Object) this; + ((ServerLevel) instance.level()).sendParticles(ParticleTypes.EXPLOSION, instance.getX(), instance.getY(), instance.getZ(), 2, 0.2D, 0.2D, 0.2D, 0.0D); + instance.playSound(SoundEvents.SHULKER_BULLET_HIT, 1.0F, 1.0F); + } +} diff --git a/src/main/java/dev/isxander/debugify/mixins/basic/mc245394/RaidMixin.java b/src/main/java/dev/isxander/debugify/mixins/basic/mc245394/RaidMixin.java new file mode 100644 index 00000000..17755f56 --- /dev/null +++ b/src/main/java/dev/isxander/debugify/mixins/basic/mc245394/RaidMixin.java @@ -0,0 +1,18 @@ +package dev.isxander.debugify.mixins.basic.mc245394; + +import dev.isxander.debugify.fixes.BugFix; +import dev.isxander.debugify.fixes.FixCategory; +import net.minecraft.sounds.SoundSource; +import net.minecraft.world.entity.raid.Raid; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.ModifyArg; + +@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") +@Mixin(Raid.class) +public class RaidMixin { + @ModifyArg(method = "playSound", at = @At(value = "INVOKE", target = "Lnet/minecraft/network/protocol/game/ClientboundSoundPacket;(Lnet/minecraft/core/Holder;Lnet/minecraft/sounds/SoundSource;DDDFFJ)V"), index = 1) + private SoundSource modifyRaidSoundSource(SoundSource soundSource) { + return SoundSource.HOSTILE; + } +} diff --git a/src/main/resources/debugify.mixins.json b/src/main/resources/debugify.mixins.json index 05b2cb99..2e91958b 100644 --- a/src/main/resources/debugify.mixins.json +++ b/src/main/resources/debugify.mixins.json @@ -16,6 +16,7 @@ "basic.mc121903.MinecraftCommandBlockMixin", "basic.mc129909.ServerPlayerMixin", "basic.mc132878.ArmorStandMixin", + "basic.mc139041.FishingRodItemMixin", "basic.mc155509.PufferfishMixin", "basic.mc159283.DensityFunctionsMixin", "basic.mc160095.CactusBlockMixin", @@ -27,14 +28,17 @@ "basic.mc199467.MthMixin", "basic.mc200418.ZombieVillagerMixin", "basic.mc2025.EntityMixin", + "basic.mc202637.FoodPropertiesMixin", "basic.mc206922.EntityMixin", "basic.mc206922.ItemEntityMixin", "basic.mc215530.ServerPlayerMixin", "basic.mc221257.ShulkerBulletMixin", "basic.mc223153.BlocksMixin", "basic.mc224729.ChunkMapMixin", + "basic.mc227337.ShulkerBulletMixin", "basic.mc231743.FlowerPotBlockMixin", "basic.mc232869.StriderMixin", + "basic.mc245394.RaidMixin", "basic.mc268617.FileUtilMixin", "basic.mc30391.LivingEntityMixin", "basic.mc69216.ServerPlayerMixin",