Skip to content

Commit 36353e0

Browse files
committed
SoundUtil and alias
1 parent 39e6806 commit 36353e0

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package com.lambda.util
2+
3+
import com.lambda.context.SafeContext
4+
import net.minecraft.client.sound.PositionedSoundInstance
5+
import net.minecraft.sound.SoundEvent
6+
7+
object SoundUtils {
8+
fun SafeContext.playSound(event: SoundEvent, pitch: Float = 1.0f) {
9+
mc.soundManager.play(
10+
PositionedSoundInstance.master(event, pitch)
11+
)
12+
}
13+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
package com.lambda.util.primitives.extension
2+
3+
import com.mojang.brigadier.builder.LiteralArgumentBuilder
4+
import net.minecraft.command.CommandSource
5+
6+
typealias CommandBuilder = LiteralArgumentBuilder<CommandSource>

0 commit comments

Comments
 (0)