From 6b19f73c526fc4bbb196b7b547750ebe60feb76d Mon Sep 17 00:00:00 2001 From: Thunderblade73 <85900443+Thunderblade73@users.noreply.github.com> Date: Sun, 10 Mar 2024 19:29:33 +0100 Subject: Debug Feature: Added TrackSoundsCommand (#855) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Linnea Gräf Co-authored-by: hannibal2 <24389977+hannibal002@users.noreply.github.com> Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- src/main/java/at/hannibal2/skyhanni/events/PlaySoundEvent.kt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/main/java/at/hannibal2/skyhanni/events') diff --git a/src/main/java/at/hannibal2/skyhanni/events/PlaySoundEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/PlaySoundEvent.kt index 123d5e881..2f793ff28 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/PlaySoundEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/PlaySoundEvent.kt @@ -1,6 +1,7 @@ package at.hannibal2.skyhanni.events import at.hannibal2.skyhanni.utils.LocationUtils.distanceToPlayer +import at.hannibal2.skyhanni.utils.LorenzUtils.round import at.hannibal2.skyhanni.utils.LorenzVec import net.minecraftforge.fml.common.eventhandler.Cancelable @@ -9,4 +10,11 @@ class PlaySoundEvent(val soundName: String, val location: LorenzVec, val pitch: LorenzEvent() { val distanceToPlayer by lazy { location.distanceToPlayer() } + override fun toString(): String { + return "PlaySoundEvent(soundName='$soundName', pitch=$pitch, volume=$volume, location=${location.round(1)}, distanceToPlayer=${ + distanceToPlayer.round( + 1 + ) + })" + } } -- cgit