diff options
Diffstat (limited to 'src/main/kotlin')
4 files changed, 9 insertions, 17 deletions
diff --git a/src/main/kotlin/com/dulkirfabric/DulkirModFabric.kt b/src/main/kotlin/com/dulkirfabric/DulkirModFabric.kt index e32e50a..112bf2a 100644 --- a/src/main/kotlin/com/dulkirfabric/DulkirModFabric.kt +++ b/src/main/kotlin/com/dulkirfabric/DulkirModFabric.kt @@ -15,7 +15,6 @@ package com.dulkirfabric import com.dulkirfabric.config.DulkirConfig import meteordevelopment.orbit.EventBus -import meteordevelopment.orbit.EventHandler import net.fabricmc.api.ModInitializer import net.minecraft.client.MinecraftClient import org.slf4j.LoggerFactory @@ -28,7 +27,6 @@ object DulkirModFabric : ModInitializer { val EVENT_BUS = EventBus() @JvmField val mc: MinecraftClient = MinecraftClient.getInstance() - var widgetLoadTime = 0L override fun onInitialize() { logger.info("Initializing DulkirMod...") @@ -46,19 +44,6 @@ object DulkirModFabric : ModInitializer { DulkirConfig.loadConfig() } - - @EventHandler - fun onPreInit(event: WidgetInitEvent) { - if (!event.initialized) println("have not initialized widgets yet!!!!") - widgetLoadTime = System.nanoTime() - } - - @EventHandler - fun onPostInit(event: WidgetInitEvent) { - val time = System.nanoTime() - widgetLoadTime - if (event.initialized) println("widgets initialized!!!!!, took: $time ns") - } - //!this.client.options.getPerspective().isFirstPerson(), this.client.options.getPerspective().isFrontView() }
\ No newline at end of file diff --git a/src/main/kotlin/com/dulkirfabric/events/InventoryKeyPressEvent.kt b/src/main/kotlin/com/dulkirfabric/events/InventoryKeyPressEvent.kt index f4f9e13..6ba0667 100644 --- a/src/main/kotlin/com/dulkirfabric/events/InventoryKeyPressEvent.kt +++ b/src/main/kotlin/com/dulkirfabric/events/InventoryKeyPressEvent.kt @@ -2,4 +2,5 @@ package com.dulkirfabric.events import com.dulkirfabric.events.base.CancellableEvent -data class InventoryKeyPressEvent(val keyCode: Int, val scanCode: Int, val modifiers: Int): CancellableEvent()
\ No newline at end of file +data class +InventoryKeyPressEvent(val keyCode: Int, val scanCode: Int, val modifiers: Int): CancellableEvent()
\ No newline at end of file diff --git a/src/main/kotlin/com/dulkirfabric/events/WorldKeyPressEvent.kt b/src/main/kotlin/com/dulkirfabric/events/WorldKeyPressEvent.kt new file mode 100644 index 0000000..2e6545b --- /dev/null +++ b/src/main/kotlin/com/dulkirfabric/events/WorldKeyPressEvent.kt @@ -0,0 +1,6 @@ +package com.dulkirfabric.events + +import com.dulkirfabric.events.base.Event + +data class +WorldKeyPressEvent(val key: Int, val scancode: Int, val modifiers: Int): Event()
\ No newline at end of file diff --git a/src/main/kotlin/com/dulkirfabric/events/base/CancellableEvent.kt b/src/main/kotlin/com/dulkirfabric/events/base/CancellableEvent.kt index 1c1ddcd..09027ed 100644 --- a/src/main/kotlin/com/dulkirfabric/events/base/CancellableEvent.kt +++ b/src/main/kotlin/com/dulkirfabric/events/base/CancellableEvent.kt @@ -4,7 +4,7 @@ import com.dulkirfabric.DulkirModFabric import meteordevelopment.orbit.ICancellable abstract class CancellableEvent: ICancellable { - + @JvmField var cancelled: Boolean = false override fun isCancelled(): Boolean { |