diff options
Diffstat (limited to 'src/main/kotlin/util/render')
-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 +} |