diff options
author | Linnea Gräf <nea@nea.moe> | 2024-07-10 04:50:31 +0200 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2024-07-10 04:52:04 +0200 |
commit | ca17fe502d2ddee6ba0ae62d0b6e8458c6ded2b9 (patch) | |
tree | ea974d1cca165d541b2444e4ed227e45266b12db /src/main/kotlin/moe/nea/firmament/rei | |
parent | 5a91c407d639cb2224649c2d4875d244321f77f7 (diff) | |
download | firmament-ca17fe502d2ddee6ba0ae62d0b6e8458c6ded2b9.tar.gz firmament-ca17fe502d2ddee6ba0ae62d0b6e8458c6ded2b9.tar.bz2 firmament-ca17fe502d2ddee6ba0ae62d0b6e8458c6ded2b9.zip |
Allow using arrows to navigate in storage overview
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/rei')
-rw-r--r-- | src/main/kotlin/moe/nea/firmament/rei/FirmamentReiPlugin.kt | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/rei/FirmamentReiPlugin.kt b/src/main/kotlin/moe/nea/firmament/rei/FirmamentReiPlugin.kt index 85efd15..4f897bd 100644 --- a/src/main/kotlin/moe/nea/firmament/rei/FirmamentReiPlugin.kt +++ b/src/main/kotlin/moe/nea/firmament/rei/FirmamentReiPlugin.kt @@ -13,16 +13,19 @@ import me.shedaniel.rei.api.client.registry.display.DisplayRegistry import me.shedaniel.rei.api.client.registry.entry.CollapsibleEntryRegistry import me.shedaniel.rei.api.client.registry.entry.EntryRegistry import me.shedaniel.rei.api.client.registry.screen.ExclusionZones +import me.shedaniel.rei.api.client.registry.screen.OverlayDecider import me.shedaniel.rei.api.client.registry.screen.ScreenRegistry import me.shedaniel.rei.api.client.registry.transfer.TransferHandler import me.shedaniel.rei.api.client.registry.transfer.TransferHandlerRegistry import me.shedaniel.rei.api.common.entry.EntryStack import me.shedaniel.rei.api.common.entry.type.EntryTypeRegistry import me.shedaniel.rei.api.common.entry.type.VanillaEntryTypes +import net.minecraft.client.gui.screen.Screen import net.minecraft.client.gui.screen.ingame.GenericContainerScreen import net.minecraft.client.gui.screen.ingame.HandledScreen import net.minecraft.item.ItemStack import net.minecraft.text.Text +import net.minecraft.util.ActionResult import net.minecraft.util.Identifier import moe.nea.firmament.events.HandledScreenPushREIEvent import moe.nea.firmament.features.inventory.CraftingOverlay @@ -99,6 +102,15 @@ class FirmamentReiPlugin : REIClientPlugin { } override fun registerScreens(registry: ScreenRegistry) { + registry.registerDecider(object : OverlayDecider { + override fun <R : Screen?> isHandingScreen(screen: Class<R>?): Boolean { + return screen == StorageOverlayScreen::class.java + } + + override fun <R : Screen?> shouldScreenBeOverlaid(screen: R): ActionResult { + return ActionResult.SUCCESS + } + }) registry.registerFocusedStack(SkyblockItemIdFocusedStackProvider) } |