From 65d8aa75eeeb0e6ff473daf994bcf27c0238ad9f Mon Sep 17 00:00:00 2001 From: Username404 Date: Fri, 28 Apr 2023 16:37:25 +0200 Subject: [PATCH] Remove a null check in SnowyScreen Signed-off-by: Username404 --- .../kotlin/fr/username404/snowygui/gui/SnowyScreen.kt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/common/src/main/kotlin/fr/username404/snowygui/gui/SnowyScreen.kt b/common/src/main/kotlin/fr/username404/snowygui/gui/SnowyScreen.kt index ceccd48..d2e1d62 100644 --- a/common/src/main/kotlin/fr/username404/snowygui/gui/SnowyScreen.kt +++ b/common/src/main/kotlin/fr/username404/snowygui/gui/SnowyScreen.kt @@ -6,11 +6,9 @@ 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 - override fun render(poseStack: PoseStack?, i: Int, j: Int, f: Float) { - if (poseStack != null) { - components.forEach { - it.display(poseStack) - } + override fun render(poseStack: PoseStack, i: Int, j: Int, f: Float) { + components.forEach { + it.display(poseStack) } } override fun isPauseScreen(): Boolean = willPauseScreen