Skip to content

Commit 9862816

Browse files
committed
Aaaaaand we're done
1 parent cef1eba commit 9862816

File tree

18 files changed

+270
-226
lines changed

18 files changed

+270
-226
lines changed

build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ plugins {
1717

1818
toolkitLoomHelper {
1919
useOneConfig {
20-
version = "1.0.0-alpha.134"
21-
loaderVersion = "1.1.0-alpha.48"
20+
version = "1.0.0-alpha.163"
21+
loaderVersion = "1.1.0-alpha.49"
2222

2323
usePolyMixin = true
24-
polyMixinVersion = "0.8.4+build.2"
24+
polyMixinVersion = "0.8.4+build.7"
2525

2626
applyLoaderTweaker = true
2727

root.gradle.kts

Lines changed: 20 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -9,49 +9,26 @@ preprocess {
99
// "1.12.2-forge"(11202, "srg") {
1010
// "1.8.9-forge"(10809, "srg")
1111
// }
12-
"1.21.5-fabric"(1_21_05, "yarn") {
13-
"1.21.5-neoforge"(1_21_05, "srg") {
14-
"1.21.4-neoforge"(1_21_04, "srg") {
15-
"1.21.4-fabric"(1_21_04, "yarn") {
16-
"1.21.3-fabric"(1_21_04, "yarn") {
17-
"1.21.3-neoforge"(1_21_03, "srg") {
18-
"1.21.2-neoforge"(1_21_02, "srg") {
19-
"1.21.2-fabric"(1_21_02, "yarn") {
20-
"1.21.1-fabric"(1_21_01, "yarn") {
21-
"1.21.1-neoforge"(1_21_01, "srg") {
22-
"1.20.6-neoforge"(1_20_06, "srg") {
23-
"1.20.6-fabric"(1_20_06, "yarn") {
24-
"1.20.4-fabric"(1_20_04, "yarn") {
25-
"1.20.4-neoforge"(1_20_04, "srg") {
26-
"1.20.4-forge"(1_20_04, "srg") {
27-
"1.20.1-forge"(1_20_01, "srg") {
28-
"1.20.1-fabric"(1_20_01, "yarn") {
29-
"1.19.4-fabric"(1_19_04, "yarn") {
30-
"1.19.4-forge"(1_19_04, "srg") {
31-
"1.19.2-forge"(1_19_02, "srg") {
32-
"1.19.2-fabric"(1_19_02, "yarn") {
33-
"1.18.2-fabric"(1_18_02, "yarn") {
34-
"1.18.2-forge"(1_18_02, "srg") {
35-
"1.17.1-forge"(1_17_01, "srg") {
36-
"1.17.1-fabric"(1_17_01, "yarn") {
37-
"1.16.5-fabric"(1_16_05, "yarn"){
38-
"1.16.5-forge"(1_16_05, "srg") {
39-
"1.12.2-forge"(1_12_02, "srg") {
40-
"1.12.2-fabric"(1_12_02, "yarn") {
41-
"1.8.9-fabric"(1_08_09, "yarn") {
42-
"1.8.9-forge"(1_08_09, "srg")
43-
}
44-
}
45-
}
46-
}
47-
}
48-
}
49-
}
50-
}
51-
}
52-
}
53-
}
54-
}
12+
13+
"1.21.8-fabric"(1_21_08, "yarn") {
14+
"1.21.8-neoforge"(1_21_08, "srg") {
15+
"1.21.5-neoforge"(1_21_05, "srg") {
16+
"1.21.5-fabric"(1_21_05, "yarn") {
17+
"1.21.4-fabric"(1_21_04, "yarn") {
18+
"1.21.4-neoforge"(1_21_04, "srg") {
19+
"1.21.1-neoforge"(1_21_01, "srg") {
20+
"1.21.1-fabric"(1_21_01, "yarn") {
21+
"1.20.4-fabric"(1_20_04, "yarn") {
22+
"1.20.4-neoforge"(1_20_04, "srg") {
23+
"1.20.4-forge"(1_20_04, "srg") {
24+
"1.20.1-forge"(1_20_01, "srg") {
25+
"1.20.1-fabric"(1_20_01, "yarn") {
26+
"1.16.5-fabric"(1_16_05, "yarn") {
27+
"1.16.5-forge"(1_16_05, "srg") {
28+
"1.12.2-forge"(1_12_02, "srg") {
29+
"1.12.2-fabric"(1_12_02, "yarn") {
30+
"1.8.9-fabric"(1_08_09, "yarn"){
31+
"1.8.9-forge"(1_08_09, "srg")
5532
}
5633
}
5734
}

settings.gradle.kts

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ pluginManagement {
2323
}
2424

2525
plugins {
26-
kotlin("jvm") version("2.0.10")
27-
id("dev.deftu.gradle.multiversion-root") version("2.35.0")
26+
kotlin("jvm") version("2.2.10")
27+
id("dev.deftu.gradle.multiversion-root") version("2.58.0")
2828
}
2929
}
3030

@@ -49,42 +49,24 @@ listOf(
4949
"1.16.5-forge",
5050
"1.16.5-fabric",
5151

52-
"1.17.1-forge",
53-
"1.17.1-fabric",
54-
55-
"1.18.2-forge",
56-
"1.18.2-fabric",
57-
58-
"1.19.2-forge",
59-
"1.19.2-fabric",
60-
61-
"1.19.4-forge",
62-
"1.19.4-fabric",
63-
6452
"1.20.1-forge",
6553
"1.20.1-fabric",
6654

6755
"1.20.4-forge",
6856
"1.20.4-neoforge",
6957
"1.20.4-fabric",
7058

71-
"1.20.6-neoforge",
72-
"1.20.6-fabric",
73-
7459
"1.21.1-neoforge",
7560
"1.21.1-fabric",
7661

77-
"1.21.2-neoforge",
78-
"1.21.2-fabric",
79-
80-
"1.21.3-neoforge",
81-
"1.21.3-fabric",
82-
8362
"1.21.4-neoforge",
8463
"1.21.4-fabric",
8564

8665
"1.21.5-neoforge",
87-
"1.21.5-fabric"
66+
"1.21.5-fabric",
67+
68+
"1.21.8-neoforge",
69+
"1.21.8-fabric",
8870
).forEach { version ->
8971
include(":$version")
9072
project(":$version").apply {

src/main/java/org/polyfrost/colorsaturation/mixin/client/Mixin_EntityRenderer_SaturationHandler.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package org.polyfrost.colorsaturation.mixin.client;
22

3-
import dev.deftu.omnicore.common.OmniProfiler;
3+
import dev.deftu.omnicore.api.client.OmniClient;
4+
import dev.deftu.omnicore.api.client.OmniClientProfiler;
45
import net.minecraft.client.renderer.EntityRenderer;
56
import org.polyfrost.colorsaturation.client.ColorSaturationConfig;
67
import org.polyfrost.colorsaturation.client.SaturationHandler;
@@ -12,13 +13,13 @@
1213

1314
//#if MC >= 1.21.2
1415
//$$ import com.mojang.blaze3d.systems.RenderSystem;
15-
//$$ import dev.deftu.omnicore.client.OmniClient;
16+
//$$ import dev.deftu.omnicore.api.client.OmniClient;
1617
//$$ import net.minecraft.client.MinecraftClient;
1718
//$$ import net.minecraft.client.util.Pool;
1819
//$$ import org.spongepowered.asm.mixin.Final;
1920
//$$ import org.spongepowered.asm.mixin.Shadow;
2021
//#else
21-
import dev.deftu.omnicore.client.render.OmniGameRendering;
22+
import dev.deftu.omnicore.api.client.render.OmniRenderTicks;
2223
//#endif
2324

2425
//#if MC >= 1.21.1
@@ -79,18 +80,18 @@ public class Mixin_EntityRenderer_SaturationHandler {
7980
}
8081

8182
//#if MC >= 1.21.2
82-
//$$ if (!OmniClient.getInstance().isFinishedLoading() || !OmniClient.hasWorld()) {
83+
//$$ if (!OmniClient.get().isFinishedLoading() || OmniClient.getWorld() == null) {
8384
//$$ return;
8485
//$$ }
8586
//#endif
8687

87-
OmniProfiler.withProfiler("colorsaturation_applier", () -> {
88+
OmniClientProfiler.withProfiler(OmniClient.get(), "colorsaturation_applier", () -> {
8889
//#if MC >= 1.21.2
8990
//$$ RenderSystem.resetTextureMatrix();
9091
//$$ SaturationHandler.render(this.client.getFramebuffer(), this.pool);
9192
//#else
9293
SaturationHandler.update();
93-
float trueTickDelta = OmniGameRendering.getTickDelta(true);
94+
float trueTickDelta = OmniRenderTicks.get();
9495
SaturationHandler.render(trueTickDelta);
9596
//#endif
9697
});

src/main/kotlin/org/polyfrost/colorsaturation/ColorSaturationEntrypoint.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ class ColorSaturationEntrypoint
3939
//$$ : ClientModInitializer
4040
//#endif
4141
{
42-
4342
//#if FORGE && MC >= 1.16.5
4443
//$$ init {
4544
//$$ setupForgeEvents(FMLJavaModLoadingContext.get().modEventBus)
@@ -78,6 +77,4 @@ class ColorSaturationEntrypoint
7877
//$$ modEventBus.addListener(this::onInitializeClient)
7978
//$$ }
8079
//#endif
81-
8280
}
83-

src/main/kotlin/org/polyfrost/colorsaturation/client/ColorSaturationClient.kt

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,17 @@
11
package org.polyfrost.colorsaturation.client
22

3-
import dev.deftu.omnicore.client.OmniClientCommands
4-
import dev.deftu.omnicore.client.OmniClientCommands.command
5-
import dev.deftu.omnicore.client.OmniClientCommands.does
6-
import dev.deftu.omnicore.client.OmniClientCommands.register
3+
import dev.deftu.omnicore.api.client.commands.OmniClientCommands
4+
import dev.deftu.omnicore.api.client.commands.command
75
import org.polyfrost.colorsaturation.ColorSaturationConstants
8-
import org.polyfrost.oneconfig.utils.v1.dsl.openUI
6+
import org.polyfrost.oneconfig.utils.v1.dsl.createScreen
97

108
object ColorSaturationClient {
119
fun initialize() {
1210
ColorSaturationConfig.preload()
1311

1412
OmniClientCommands.command(ColorSaturationConstants.ID) {
15-
does {
16-
ColorSaturationConfig.openUI()
17-
1
13+
runs { ctx ->
14+
ctx.source.openScreen(ColorSaturationConfig.createScreen())
1815
}
1916
}.register()
2017
}

src/main/kotlin/org/polyfrost/colorsaturation/client/ColorSaturationConfig.kt

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,10 @@ object ColorSaturationConfig : KtConfig(
77
id = "${ColorSaturationConstants.ID}.json",
88
title = ColorSaturationConstants.NAME,
99
category = Category.QOL,
10-
icon = "/colorsaturation/colorsaturation_dark.svg"
10+
icon = "/assets/colorsaturation/colorsaturation_dark.svg"
1111
) {
12-
13-
@JvmStatic
14-
var isEnabled by switch(def = true, name = "Enabled")
15-
16-
@JvmStatic
17-
var forceDisableFastRender by switch(def = true, name = "Force Disable Fast Render", description = "Forces OptiFine's Fast Render option to be disabled.")
12+
@JvmStatic var isEnabled by switch(def = true, name = "Enabled")
13+
@JvmStatic var forceDisableFastRender by switch(def = true, name = "Force Disable Fast Render", description = "Forces OptiFine's Fast Render option to be disabled.")
1814

1915
var strength by slider(min = -1f, max = 5f, def = 1f, name = "Saturation Strength")
2016

@@ -27,5 +23,4 @@ object ColorSaturationConfig : KtConfig(
2723
}
2824
//#endif
2925
}
30-
3126
}

src/main/kotlin/org/polyfrost/colorsaturation/client/SaturationHandler.kt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
package org.polyfrost.colorsaturation.client
22

3-
import dev.deftu.omnicore.client.OmniClient
4-
import dev.deftu.omnicore.client.render.OmniRenderEnv
5-
import dev.deftu.omnicore.common.OmniIdentifier
3+
import dev.deftu.omnicore.api.DEFAULT_NAMESPACE
4+
import dev.deftu.omnicore.api.client.client
5+
import dev.deftu.omnicore.api.client.render.GlCapabilities
6+
import dev.deftu.omnicore.api.identifierOrThrow
67
import net.minecraft.client.shader.ShaderGroup
78
import org.apache.logging.log4j.LogManager
89
import org.polyfrost.oneconfig.internal.mixin.Mixin_ShaderListAccessor
910

1011
object SaturationHandler {
1112
private val LOGGER = LogManager.getLogger(SaturationHandler::class.java)
1213

13-
private val LOCATION by lazy { OmniIdentifier.create(OmniIdentifier.MINECRAFT_NAMESPACE, "shaders/post/color_saturation.json") }
14+
private val LOCATION by lazy { identifierOrThrow(DEFAULT_NAMESPACE, "shaders/post/color_saturation.json") }
1415

1516
private var shader: ShaderGroup? = null
1617
private var prevWidth = 0
@@ -19,15 +20,14 @@ object SaturationHandler {
1920

2021
@JvmStatic
2122
val isActive: Boolean
22-
get() = OmniRenderEnv.isShaderSupported && shader != null
23+
get() = GlCapabilities.isShaderSupported && shader != null
2324

2425
@JvmStatic
2526
fun update() {
26-
if (!OmniRenderEnv.isShaderSupported) {
27+
if (!GlCapabilities.isShaderSupported) {
2728
return
2829
}
2930

30-
val client = OmniClient.getInstance()
3131
val mainTarget = client.framebuffer ?: return
3232
val width = mainTarget.framebufferWidth
3333
val height = mainTarget.framebufferHeight

versions/1.21.2-fabric/src/main/resources/assets/colorsaturation/post_effect/color_saturation.json

Lines changed: 0 additions & 30 deletions
This file was deleted.

versions/1.21.2-fabric/src/main/resources/assets/colorsaturation/shaders/post/color_saturation.json

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)