diff options
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/chroma')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/chroma/ChromaFontRenderer.kt | 8 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/chroma/ChromaShader.kt | 5 |
2 files changed, 7 insertions, 6 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/chroma/ChromaFontRenderer.kt b/src/main/java/at/hannibal2/skyhanni/features/chroma/ChromaFontRenderer.kt index 981b7b33a..469fc2f3c 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/chroma/ChromaFontRenderer.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/chroma/ChromaFontRenderer.kt @@ -36,7 +36,7 @@ class ChromaFontRenderer(private val baseColor: Int) { } } - fun newChromaEnv() : ChromaFontRenderer { + fun newChromaEnv(): ChromaFontRenderer { if (ShaderHelper.areShadersSupported()) { ChromaShaderManager.begin() GlStateManager.shadeModel(GL11.GL_SMOOTH) @@ -44,7 +44,7 @@ class ChromaFontRenderer(private val baseColor: Int) { return this } - fun bindActualColor() : ChromaFontRenderer { + fun bindActualColor(): ChromaFontRenderer { GlStateManager.color( ColorUtils.getRed(baseColor).toFloat() / 255f, ColorUtils.getGreen(baseColor).toFloat() / 255f, @@ -54,7 +54,7 @@ class ChromaFontRenderer(private val baseColor: Int) { return this } - fun endChromaEnv() : ChromaFontRenderer { + fun endChromaEnv(): ChromaFontRenderer { if (ShaderHelper.areShadersSupported()) { ChromaShaderManager.end() GlStateManager.shadeModel(GL11.GL_FLAT) @@ -63,4 +63,4 @@ class ChromaFontRenderer(private val baseColor: Int) { } fun getChromaState() = chromaOn -}
\ No newline at end of file +} diff --git a/src/main/java/at/hannibal2/skyhanni/features/chroma/ChromaShader.kt b/src/main/java/at/hannibal2/skyhanni/features/chroma/ChromaShader.kt index 00215b032..e7bedbdcd 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/chroma/ChromaShader.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/chroma/ChromaShader.kt @@ -22,7 +22,8 @@ object ChromaShader : Shader("chroma", "chroma") { SkyHanniMod.feature.chroma.chromaSize * (Minecraft.getMinecraft().displayWidth / 100f) } registerUniform(Uniform.UniformType.FLOAT, "timeOffset") { - var ticks = (MinecraftData.totalTicks / 2) + (Minecraft.getMinecraft() as AccessorMinecraft).timer.renderPartialTicks + var ticks = + (MinecraftData.totalTicks / 2) + (Minecraft.getMinecraft() as AccessorMinecraft).timer.renderPartialTicks ticks = when (SkyHanniMod.feature.chroma.chromaDirection) { 0, 2 -> ticks @@ -44,4 +45,4 @@ object ChromaShader : Shader("chroma", "chroma") { } } } -}
\ No newline at end of file +} |