aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/firmament/rei
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-07-10 01:34:37 +0200
committerLinnea Gräf <nea@nea.moe>2024-07-10 03:14:55 +0200
commit986ce538f123cdec7e0da12ed89ba7225539df0a (patch)
treedd4a3448878c2af26be3bca81bbc8aa710bdc112 /src/main/kotlin/moe/nea/firmament/rei
parent4e1cda1d64ce60719f6ff6e60c6af4881d81fdd2 (diff)
downloadfirmament-986ce538f123cdec7e0da12ed89ba7225539df0a.tar.gz
firmament-986ce538f123cdec7e0da12ed89ba7225539df0a.tar.bz2
firmament-986ce538f123cdec7e0da12ed89ba7225539df0a.zip
Add interactive storage overlay
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/rei')
-rw-r--r--src/main/kotlin/moe/nea/firmament/rei/FirmamentReiPlugin.kt18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/rei/FirmamentReiPlugin.kt b/src/main/kotlin/moe/nea/firmament/rei/FirmamentReiPlugin.kt
index a916b3e..85efd15 100644
--- a/src/main/kotlin/moe/nea/firmament/rei/FirmamentReiPlugin.kt
+++ b/src/main/kotlin/moe/nea/firmament/rei/FirmamentReiPlugin.kt
@@ -19,20 +19,21 @@ 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.ingame.GenericContainerScreen
+import net.minecraft.client.gui.screen.ingame.HandledScreen
+import net.minecraft.item.ItemStack
+import net.minecraft.text.Text
+import net.minecraft.util.Identifier
import moe.nea.firmament.events.HandledScreenPushREIEvent
import moe.nea.firmament.features.inventory.CraftingOverlay
+import moe.nea.firmament.features.inventory.storageoverlay.StorageOverlayScreen
import moe.nea.firmament.rei.recipes.SBCraftingRecipe
import moe.nea.firmament.rei.recipes.SBForgeRecipe
+import moe.nea.firmament.rei.recipes.SBMobDropRecipe
import moe.nea.firmament.repo.RepoManager
import moe.nea.firmament.util.SkyblockId
import moe.nea.firmament.util.skyblockId
import moe.nea.firmament.util.unformattedString
-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.Identifier
-import moe.nea.firmament.rei.recipes.SBMobDropRecipe
class FirmamentReiPlugin : REIClientPlugin {
@@ -44,6 +45,7 @@ class FirmamentReiPlugin : REIClientPlugin {
val SKYBLOCK_ITEM_TYPE_ID = Identifier.of("firmament", "skyblockitems")
}
+
override fun registerTransferHandlers(registry: TransferHandlerRegistry) {
registry.register(TransferHandler { context ->
val screen = context.containerScreen
@@ -69,6 +71,7 @@ class FirmamentReiPlugin : REIClientPlugin {
override fun registerExclusionZones(zones: ExclusionZones) {
zones.register(HandledScreen::class.java) { HandledScreenPushREIEvent.publish(HandledScreenPushREIEvent(it)).rectangles }
+ zones.register(StorageOverlayScreen::class.java) { it.getBounds() }
}
override fun registerDisplays(registry: DisplayRegistry) {
@@ -80,7 +83,8 @@ class FirmamentReiPlugin : REIClientPlugin {
SBForgeRecipe.Category.categoryIdentifier,
SkyblockForgeRecipeDynamicGenerator
)
- registry.registerDisplayGenerator(SBMobDropRecipe.Category.categoryIdentifier, SkyblockMobDropRecipeDynamicGenerator)
+ registry.registerDisplayGenerator(SBMobDropRecipe.Category.categoryIdentifier,
+ SkyblockMobDropRecipeDynamicGenerator)
}
override fun registerCollapsibleEntries(registry: CollapsibleEntryRegistry) {