Skip to content

Commit de80b3d

Browse files
committed
Play sound in MsgSplicingTableNewStaffPatternS2C
1 parent 40b9d9e commit de80b3d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Common/src/main/kotlin/gay/object/hexdebug/networking/handler/ClientMessageHandler.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package gay.`object`.hexdebug.networking.handler
22

33
import at.petrak.hexcasting.api.casting.eval.ExecutionClientView
44
import at.petrak.hexcasting.client.gui.GuiSpellcasting
5+
import at.petrak.hexcasting.common.lib.hex.HexEvalSounds
56
import at.petrak.hexcasting.common.msgs.MsgNewSpellPatternS2C
67
import dev.architectury.networking.NetworkManager.PacketContext
78
import gay.`object`.hexdebug.adapter.proxy.DebugProxyClient
@@ -82,6 +83,9 @@ fun HexDebugMessageS2C.applyOnClient(ctx: PacketContext) = ctx.queue {
8283
is MsgSplicingTableNewStaffPatternS2C -> {
8384
val info = ExecutionClientView(false, resolutionType, listOf(), null)
8485
SplicingTableScreen.getInstance()?.guiSpellcasting?.recvServerUpdate(info, index)
86+
87+
val sound = if (resolutionType.success) HexEvalSounds.NORMAL_EXECUTE else HexEvalSounds.MISHAP
88+
sound.sound?.let { ctx.player.playSound(it, 1f, 1f) }
8589
}
8690

8791
is MsgSyncConfigS2C -> {

0 commit comments

Comments
 (0)