Skip to content

Commit 6ae8ea7

Browse files
committed
add sound on open book
1 parent b71a3c7 commit 6ae8ea7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/kotlin/dev/sterner/common/item/GrimBookItem.kt

+3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import dev.sterner.registry.VoidBoundComponentRegistry
77
import net.minecraft.client.Minecraft
88
import net.minecraft.nbt.CompoundTag
99
import net.minecraft.network.chat.Component
10+
import net.minecraft.sounds.SoundEvents
11+
import net.minecraft.sounds.SoundSource
1012
import net.minecraft.world.InteractionHand
1113
import net.minecraft.world.InteractionResult
1214
import net.minecraft.world.InteractionResultHolder
@@ -53,6 +55,7 @@ class GrimBookItem(properties: Properties) : BlockItem(VoidBoundBlockRegistry.GR
5355
}
5456

5557
if (giveAdvancement) {
58+
level.playSound(player, player, SoundEvents.ENCHANTMENT_TABLE_USE, SoundSource.PLAYERS, 1f,1f)
5659
VoidBoundComponentRegistry.VOID_BOUND_REVELATION_COMPONENT.get(player).unlockKnowledge(KnowledgeType.GRIMCULT)
5760
VoidBoundPlayerUtils.addThought(player, Component.translatable("voidbound.grimcultrites"), 20 * 5, 1)
5861
} else if (item.tag!!.getBoolean("open")) {

0 commit comments

Comments
 (0)