diff options
Diffstat (limited to 'src/main/kotlin/moe/nea')
-rw-r--r-- | src/main/kotlin/moe/nea/firmament/events/ScreenChangeEvent.kt (renamed from src/main/kotlin/moe/nea/firmament/events/ScreenOpenEvent.kt) | 4 | ||||
-rw-r--r-- | src/main/kotlin/moe/nea/firmament/features/debug/PowerUserTools.kt | 4 | ||||
-rw-r--r-- | src/main/kotlin/moe/nea/firmament/features/inventory/storageoverlay/StorageOverlay.kt | 4 | ||||
-rw-r--r-- | src/main/kotlin/moe/nea/firmament/util/data/IDataHolder.kt | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/events/ScreenOpenEvent.kt b/src/main/kotlin/moe/nea/firmament/events/ScreenChangeEvent.kt index 034fe13..c6b0a7f 100644 --- a/src/main/kotlin/moe/nea/firmament/events/ScreenOpenEvent.kt +++ b/src/main/kotlin/moe/nea/firmament/events/ScreenChangeEvent.kt @@ -8,6 +8,6 @@ package moe.nea.firmament.events import net.minecraft.client.gui.screen.Screen -data class ScreenOpenEvent(val old: Screen?, val new: Screen?) : FirmamentEvent.Cancellable() { - companion object : FirmamentEventBus<ScreenOpenEvent>() +data class ScreenChangeEvent(val old: Screen?, val new: Screen?) : FirmamentEvent.Cancellable() { + companion object : FirmamentEventBus<ScreenChangeEvent>() } diff --git a/src/main/kotlin/moe/nea/firmament/features/debug/PowerUserTools.kt b/src/main/kotlin/moe/nea/firmament/features/debug/PowerUserTools.kt index 52834f3..8c9baf7 100644 --- a/src/main/kotlin/moe/nea/firmament/features/debug/PowerUserTools.kt +++ b/src/main/kotlin/moe/nea/firmament/features/debug/PowerUserTools.kt @@ -15,7 +15,7 @@ import net.minecraft.util.hit.HitResult import moe.nea.firmament.events.CustomItemModelEvent import moe.nea.firmament.events.HandledScreenKeyPressedEvent import moe.nea.firmament.events.ItemTooltipEvent -import moe.nea.firmament.events.ScreenOpenEvent +import moe.nea.firmament.events.ScreenChangeEvent import moe.nea.firmament.events.TickEvent import moe.nea.firmament.events.WorldKeyboardEvent import moe.nea.firmament.features.FirmamentFeature @@ -91,7 +91,7 @@ object PowerUserTools : FirmamentFeature { lastCopiedStack = null lastCopiedStackViewTime = false } - ScreenOpenEvent.subscribe { + ScreenChangeEvent.subscribe { lastCopiedStack = null } HandledScreenKeyPressedEvent.subscribe { diff --git a/src/main/kotlin/moe/nea/firmament/features/inventory/storageoverlay/StorageOverlay.kt b/src/main/kotlin/moe/nea/firmament/features/inventory/storageoverlay/StorageOverlay.kt index 7d1c72e..cb8a8d8 100644 --- a/src/main/kotlin/moe/nea/firmament/features/inventory/storageoverlay/StorageOverlay.kt +++ b/src/main/kotlin/moe/nea/firmament/features/inventory/storageoverlay/StorageOverlay.kt @@ -8,7 +8,7 @@ package moe.nea.firmament.features.inventory.storageoverlay import java.util.* import kotlinx.serialization.serializer -import moe.nea.firmament.events.ScreenOpenEvent +import moe.nea.firmament.events.ScreenChangeEvent import moe.nea.firmament.events.TickEvent import moe.nea.firmament.features.FirmamentFeature import moe.nea.firmament.gui.config.ManagedConfig @@ -36,7 +36,7 @@ object StorageOverlay : FirmamentFeature { var currentHandler: StorageBackingHandle? = StorageBackingHandle.None override fun onLoad() { - ScreenOpenEvent.subscribe { event -> + ScreenChangeEvent.subscribe { event -> currentHandler = StorageBackingHandle.fromScreen(event.new) if (event.old is StorageOverlayScreen && !event.old.isClosing) { event.old.setHandler(currentHandler) diff --git a/src/main/kotlin/moe/nea/firmament/util/data/IDataHolder.kt b/src/main/kotlin/moe/nea/firmament/util/data/IDataHolder.kt index 1e7853c..1643ab1 100644 --- a/src/main/kotlin/moe/nea/firmament/util/data/IDataHolder.kt +++ b/src/main/kotlin/moe/nea/firmament/util/data/IDataHolder.kt @@ -13,7 +13,7 @@ import net.minecraft.client.MinecraftClient import net.minecraft.server.command.CommandOutput import net.minecraft.text.Text import moe.nea.firmament.Firmament -import moe.nea.firmament.events.ScreenOpenEvent +import moe.nea.firmament.events.ScreenChangeEvent interface IDataHolder<T> { companion object { @@ -60,7 +60,7 @@ interface IDataHolder<T> { } fun registerEvents() { - ScreenOpenEvent.subscribe { event -> + ScreenChangeEvent.subscribe { event -> performSaves() val p = MinecraftClient.getInstance().player if (p != null) { |