From 2c022844e58c4a62b09a287f6e71cfb8a3ab1922 Mon Sep 17 00:00:00 2001 From: inglettronald Date: Thu, 29 Jun 2023 07:21:41 -0500 Subject: imports/cleanups --- src/main/kotlin/com/dulkirfabric/Registrations.kt | 6 ++---- src/main/kotlin/com/dulkirfabric/features/chat/AbiPhoneDND.kt | 8 -------- 2 files changed, 2 insertions(+), 12 deletions(-) (limited to 'src/main/kotlin/com/dulkirfabric') 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 } -- cgit