From eace54f36a9a4678dd5156332afb0e6193925918 Mon Sep 17 00:00:00 2001 From: Sollace Date: Sun, 10 Sep 2023 18:53:32 +0100 Subject: [PATCH] Fixed anvil sound not playing when hitting celestia on the head --- .../minelittlepony/unicopia/item/DragonBreathScrollItem.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/minelittlepony/unicopia/item/DragonBreathScrollItem.java b/src/main/java/com/minelittlepony/unicopia/item/DragonBreathScrollItem.java index 7c5713cf..0ba0e21f 100644 --- a/src/main/java/com/minelittlepony/unicopia/item/DragonBreathScrollItem.java +++ b/src/main/java/com/minelittlepony/unicopia/item/DragonBreathScrollItem.java @@ -11,6 +11,7 @@ import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.server.world.ServerWorld; +import net.minecraft.sound.SoundCategory; import net.minecraft.util.Hand; import net.minecraft.util.TypedActionResult; import net.minecraft.world.World; @@ -37,7 +38,7 @@ public class DragonBreathScrollItem extends Item { if (count == 1 && "dings_on_celestias_head".equals(counterName)) { UnicopiaWorldProperties properties = UnicopiaWorldProperties.forWorld((ServerWorld)world); properties.setTangentalSkyAngle(properties.getTangentalSkyAngle() + 15); - player.playSound(USounds.Vanilla.BLOCK_ANVIL_HIT, 0.3F, 1); + world.playSound(null, player.getBlockPos(), USounds.Vanilla.BLOCK_ANVIL_HIT, SoundCategory.NEUTRAL, 0.3F, 1); } }); DragonBreathStore.get(world).put(recipient, payload.split(1));