SnowyGUI/common/src/main/kotlin/fr/username404/snowygui/gui/SnowyScreen.kt
Username404-59 445053f69d
Update to 26.1
Signed-off-by: Username404-59 <w.iron.zombie@gmail.com>
2026-04-15 22:04:27 +02:00

15 lines
664 B
Kotlin

package fr.username404.snowygui.gui
import net.minecraft.client.gui.GuiGraphicsExtractor as GuiGraphics
import net.minecraft.client.gui.screens.Screen
import net.minecraft.network.chat.Component.translatable
abstract class SnowyScreen(translatableString: String = "screen.snowy.gui", private val willPauseScreen: Boolean = false): Screen(translatable(translatableString)) {
abstract val components: MutableCollection<Element>
override fun extractRenderState(guiGraphics: GuiGraphics, i: Int, j: Int, f: Float) {
components.forEach {
it.display(guiGraphics)
}
}
override fun isPauseScreen(): Boolean = willPauseScreen
}