aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/util/mc
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2025-11-20 12:49:54 +0100
committerLinnea Gräf <nea@nea.moe>2025-11-20 12:49:54 +0100
commit709c32ed2788c15f9f03a1bcbe6648e533e662c6 (patch)
treea895baaade1b0c01ce51340a63dfb6d0b5777f9e /src/main/kotlin/util/mc
parent5d9b084be9af0f97adad002f3389add22ebf07e5 (diff)
downloadFirmament-709c32ed2788c15f9f03a1bcbe6648e533e662c6.tar.gz
Firmament-709c32ed2788c15f9f03a1bcbe6648e533e662c6.tar.bz2
Firmament-709c32ed2788c15f9f03a1bcbe6648e533e662c6.zip
feat: basic screen recipe renderer
Diffstat (limited to 'src/main/kotlin/util/mc')
-rw-r--r--src/main/kotlin/util/mc/Rectangle.kt11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main/kotlin/util/mc/Rectangle.kt b/src/main/kotlin/util/mc/Rectangle.kt
new file mode 100644
index 0000000..6495c29
--- /dev/null
+++ b/src/main/kotlin/util/mc/Rectangle.kt
@@ -0,0 +1,11 @@
+package moe.nea.firmament.util.mc
+
+import me.shedaniel.math.Rectangle
+import net.minecraft.client.gui.navigation.ScreenAxis
+import net.minecraft.client.gui.navigation.ScreenRectangle
+
+fun Rectangle.asScreenRectangle() =
+ ScreenRectangle.of(
+ ScreenAxis.HORIZONTAL,
+ x, y, width, height
+ )