package moe.nea.firmament.util.render import com.mojang.blaze3d.platform.GlConst import com.mojang.blaze3d.systems.RenderSystem import me.shedaniel.math.Color import net.minecraft.client.render.OverlayTexture import net.minecraft.util.math.ColorHelper import moe.nea.firmament.util.ErrorUtil class TintedOverlayTexture : OverlayTexture() { companion object { val size = 16 } private var lastColor: Color? = null fun setColor(color: Color): TintedOverlayTexture { val image = ErrorUtil.notNullOr(texture.image, "Disposed TintedOverlayTexture written to") { return this } if (color == lastColor) return this lastColor = color for (i in 0..