diff options
author | Linnea Gräf <nea@nea.moe> | 2024-10-16 19:24:24 +0200 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2024-10-16 19:24:24 +0200 |
commit | 7de0e8e7e09e3428c17ca9717c21c02469c31b76 (patch) | |
tree | f8c3d32a286521967a27877231c1ee74fa8c87ab /src/main/kotlin/util/render/DrawContextExt.kt | |
parent | 854ec336cc6a0a3bb60f33acfac28ed45b491a15 (diff) | |
download | Firmament-7de0e8e7e09e3428c17ca9717c21c02469c31b76.tar.gz Firmament-7de0e8e7e09e3428c17ca9717c21c02469c31b76.tar.bz2 Firmament-7de0e8e7e09e3428c17ca9717c21c02469c31b76.zip |
Add edit backpacks button to /firm storage
Diffstat (limited to 'src/main/kotlin/util/render/DrawContextExt.kt')
-rw-r--r-- | src/main/kotlin/util/render/DrawContextExt.kt | 8 |
1 files changed, 8 insertions, 0 deletions
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 +} |