aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/com/dulkirfabric/features/InventoryScale.kt
blob: 0d2fc4a39a2b839d6e2b95ce3c572ecb81a8c5f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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
    }
}