diff options
author | nea <nea@nea.moe> | 2023-10-28 04:07:47 +0200 |
---|---|---|
committer | nea <nea@nea.moe> | 2023-10-28 04:07:47 +0200 |
commit | ad490f2ea7967cb6bb97cb797b33aa3554de46a5 (patch) | |
tree | c45cf7f4b8a6d60399fcc46f793c75bd8387211d /src/main/kotlin/moe/nea | |
parent | 9e7da2829cdc949d211ef5021131b4a48ddc3054 (diff) | |
download | Firmament-ad490f2ea7967cb6bb97cb797b33aa3554de46a5.tar.gz Firmament-ad490f2ea7967cb6bb97cb797b33aa3554de46a5.tar.bz2 Firmament-ad490f2ea7967cb6bb97cb797b33aa3554de46a5.zip |
Rename mixins after what they do, rather than where they do it
[no changelog]
Mixins are now named after what they do, and mixins for the same class that do different things should be in two
separate mixins now.
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) { |