From 7de0e8e7e09e3428c17ca9717c21c02469c31b76 Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Wed, 16 Oct 2024 19:24:24 +0200 Subject: Add edit backpacks button to /firm storage --- src/main/kotlin/util/render/DrawContextExt.kt | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 src/main/kotlin/util/render/DrawContextExt.kt (limited to 'src/main/kotlin/util/render') diff --git a/src/main/kotlin/util/render/DrawContextExt.kt b/src/main/kotlin/util/render/DrawContextExt.kt new file mode 100644 index 0000000..48698b4 --- /dev/null +++ b/src/main/kotlin/util/render/DrawContextExt.kt @@ -0,0 +1,8 @@ +package moe.nea.firmament.util.render + +import org.joml.Matrix4f +import net.minecraft.client.gui.DrawContext + +fun DrawContext.isUntranslatedGuiDrawContext(): Boolean { + return (matrices.peek().positionMatrix.properties() and Matrix4f.PROPERTY_IDENTITY.toInt()) != 0 +} -- cgit