aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/com/dulkirfabric/features
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/com/dulkirfabric/features')
-rw-r--r--src/main/kotlin/com/dulkirfabric/features/InventoryScale.kt17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/main/kotlin/com/dulkirfabric/features/InventoryScale.kt b/src/main/kotlin/com/dulkirfabric/features/InventoryScale.kt
new file mode 100644
index 0000000..0d2fc4a
--- /dev/null
+++ b/src/main/kotlin/com/dulkirfabric/features/InventoryScale.kt
@@ -0,0 +1,17 @@
+package com.dulkirfabric.features
+
+import com.dulkirfabric.DulkirModFabric.mc
+import com.dulkirfabric.config.DulkirConfig
+import net.minecraft.client.gui.screen.ingame.HandledScreen
+
+object InventoryScale {
+
+ /**
+ * Called every render frame, so don't put anything expensive in here.
+ */
+ fun getScale(): Float {
+ if (DulkirConfig.configOptions.invScaleBool && mc.currentScreen is HandledScreen<*>)
+ return DulkirConfig.configOptions.inventoryScale
+ return 1f
+ }
+} \ No newline at end of file