Skip to content

Commit 2bf9544

Browse files
committed
Fix playSound crash with reflective drop cancel (1.21.8 change)
1 parent f6b1079 commit 2bf9544

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/main/java/dev/lycanea/mwonmod/mixin/ItemDropMixin.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import dev.lycanea.mwonmod.Config;
44
import dev.lycanea.mwonmod.Mwonmod;
5-
import net.kyori.adventure.sound.Sound;
65
import net.minecraft.client.MinecraftClient;
76
import net.minecraft.client.network.ClientPlayerEntity;
87
import net.minecraft.item.Item;
@@ -29,7 +28,7 @@ public void dropSelectedItem(boolean entireStack, CallbackInfoReturnable<Boolean
2928
.map(Text::getString)
3029
.forEach(str -> {
3130
if (Config.HANDLER.instance().preventDroppingReflectives && "Reflection".equals(str)) {
32-
player.playSound((Sound) SoundEvents.ITEM_SHIELD_BLOCK);
31+
player.playSound(SoundEvents.ITEM_SHIELD_BLOCK.value());
3332
cir.setReturnValue(false);
3433
cir.cancel();
3534
}

0 commit comments

Comments
 (0)