diff options
author | inglettronald <inglettronald@gmail.com> | 2023-06-29 07:21:41 -0500 |
---|---|---|
committer | inglettronald <inglettronald@gmail.com> | 2023-06-29 07:21:41 -0500 |
commit | 2c022844e58c4a62b09a287f6e71cfb8a3ab1922 (patch) | |
tree | 2cfffc3cba248a48cec1b1abf37b7f2599092d7a /src/main/kotlin/com/dulkirfabric | |
parent | b3b010d6fa09af6152c0bcb1a436718c528da24a (diff) | |
download | DulkirMod-Fabric-2c022844e58c4a62b09a287f6e71cfb8a3ab1922.tar.gz DulkirMod-Fabric-2c022844e58c4a62b09a287f6e71cfb8a3ab1922.tar.bz2 DulkirMod-Fabric-2c022844e58c4a62b09a287f6e71cfb8a3ab1922.zip |
imports/cleanups
Diffstat (limited to 'src/main/kotlin/com/dulkirfabric')
-rw-r--r-- | src/main/kotlin/com/dulkirfabric/Registrations.kt | 6 | ||||
-rw-r--r-- | src/main/kotlin/com/dulkirfabric/features/chat/AbiPhoneDND.kt | 8 |
2 files changed, 2 insertions, 12 deletions
diff --git a/src/main/kotlin/com/dulkirfabric/Registrations.kt b/src/main/kotlin/com/dulkirfabric/Registrations.kt index 55b301a..9346504 100644 --- a/src/main/kotlin/com/dulkirfabric/Registrations.kt +++ b/src/main/kotlin/com/dulkirfabric/Registrations.kt @@ -5,10 +5,7 @@ import com.dulkirfabric.commands.ConfigCommand import com.dulkirfabric.commands.DynamicKeyCommand import com.dulkirfabric.commands.JoinDungeonCommands import com.dulkirfabric.events.* -import com.dulkirfabric.features.CustomBlockOutline -import com.dulkirfabric.features.KeyShortCutImpl -import com.dulkirfabric.features.RenderBoxTest -import com.dulkirfabric.features.TooltipImpl +import com.dulkirfabric.features.* import com.dulkirfabric.features.chat.AbiPhoneDND import net.fabricmc.fabric.api.client.command.v2.ClientCommandRegistrationCallback import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents @@ -51,6 +48,7 @@ object Registrations { EVENT_BUS.subscribe(TooltipImpl) EVENT_BUS.subscribe(CustomBlockOutline) EVENT_BUS.subscribe(AbiPhoneDND) + EVENT_BUS.subscribe(InventoryScale) } fun registerEvents() { diff --git a/src/main/kotlin/com/dulkirfabric/features/chat/AbiPhoneDND.kt b/src/main/kotlin/com/dulkirfabric/features/chat/AbiPhoneDND.kt index 8304bc3..2172c4b 100644 --- a/src/main/kotlin/com/dulkirfabric/features/chat/AbiPhoneDND.kt +++ b/src/main/kotlin/com/dulkirfabric/features/chat/AbiPhoneDND.kt @@ -2,13 +2,10 @@ package com.dulkirfabric.features.chat import com.dulkirfabric.config.DulkirConfig import com.dulkirfabric.events.ChatReceivedEvent -import com.dulkirfabric.events.OverlayReceivedEvent import com.dulkirfabric.events.PlaySoundEvent import com.dulkirfabric.util.TextUtils import com.dulkirfabric.util.TextUtils.unformattedString import meteordevelopment.orbit.EventHandler -import net.minecraft.client.sound.Sound -import net.minecraft.text.Text object AbiPhoneDND { @@ -20,11 +17,6 @@ object AbiPhoneDND { fun onSound(event: PlaySoundEvent) { if (!DulkirConfig.configOptions.abiPhoneDND) return if (System.currentTimeMillis() - lastRing < 5000) { - // TODO: Make this not error out madge - if (event.sound == null) { - event.isCancelled = true - } - if (event.sound.id.path == "block.note_block.pling" && event.sound.volume == 0.69f && event.sound.pitch == 1.6666666f) { event.isCancelled = true } |