aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/util/mc/Rectangle.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/util/mc/Rectangle.kt')
-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
+ )