Skip to content

Commit d8bdf20

Browse files
committed
Bump to OneConfig A70
1 parent a06366f commit d8bdf20

File tree

8 files changed

+19
-19
lines changed

8 files changed

+19
-19
lines changed

build.gradle.kts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
@file:Suppress("UnstableApiUsage", "PropertyName")
22

33
import dev.deftu.gradle.utils.GameSide
4-
import dev.deftu.gradle.utils.MinecraftVersion
54

65
plugins {
76
java
@@ -18,7 +17,7 @@ plugins {
1817

1918
toolkitLoomHelper {
2019
useOneConfig {
21-
version = "1.0.0-alpha.62"
20+
version = "1.0.0-alpha.70"
2221
loaderVersion = "1.1.0-alpha.44"
2322

2423
usePolyMixin = true

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

gradlew

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
# Darwin, MinGW, and NonStop.
5656
#
5757
# (3) This script is generated from the Groovy template
58-
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
58+
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
5959
# within the Gradle project.
6060
#
6161
# You can find Gradle at https://github.com/gradle/gradle/.

settings.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pluginManagement {
2424

2525
plugins {
2626
kotlin("jvm") version("2.0.0")
27-
id("dev.deftu.gradle.multiversion-root") version("2.22.0")
27+
id("dev.deftu.gradle.multiversion-root") version("2.27.1")
2828
}
2929
}
3030

src/main/java/org/polyfrost/colorsaturation/Saturation.java

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

3+
import dev.deftu.omnicore.client.OmniClient;
4+
import dev.deftu.omnicore.client.render.OmniResolution;
5+
import dev.deftu.omnicore.client.render.OmniTextureManager;
36
import net.minecraft.client.shader.Shader;
47
import net.minecraft.client.shader.ShaderGroup;
58
import net.minecraft.client.shader.ShaderUniform;
@@ -8,8 +11,6 @@
811
import org.polyfrost.colorsaturation.mixin.ShaderGroupAccessor;
912
import org.polyfrost.oneconfig.api.event.v1.events.RenderEvent;
1013
import org.polyfrost.oneconfig.api.event.v1.invoke.impl.Subscribe;
11-
import org.polyfrost.universal.UMinecraft;
12-
import org.polyfrost.universal.UResolution;
1314

1415
import java.io.IOException;
1516
import java.util.List;
@@ -20,7 +21,7 @@ public class Saturation {
2021
private static final ResourceLocation phosphorBlur = new ResourceLocation("minecraft:shaders/post/color_convolve.json");
2122

2223
@Subscribe
23-
private void onRenderTick(RenderEvent.End event) {
24+
private void onRenderTick(RenderEvent.Post event) {
2425
// Only update the shader if one is active
2526
if (!isShaderActive() || lastEnabled != ColorSaturation.getConfig().enabled) {
2627
lastEnabled = ColorSaturation.getConfig().enabled;
@@ -29,21 +30,21 @@ private void onRenderTick(RenderEvent.End event) {
2930
}
3031

3132
public static void reloadShader() {
32-
if (UMinecraft.getWorld() == null) {
33+
if (!OmniClient.getHasWorld()) {
3334
return;
3435
}
3536

3637
if (!isShaderActive() && ColorSaturation.getConfig().enabled) {
3738
try {
38-
final ShaderGroup saturationShader = new ShaderGroup(UMinecraft.getMinecraft().getTextureManager(), UMinecraft.getMinecraft().getResourceManager(), UMinecraft.getMinecraft().getFramebuffer(), phosphorBlur);
39-
saturationShader.createBindFramebuffers(UResolution.getWindowWidth(), UResolution.getWindowHeight());
40-
((EntityRendererHook) UMinecraft.getMinecraft().entityRenderer).colorSaturation$setSaturationShader(saturationShader);
39+
final ShaderGroup saturationShader = new ShaderGroup(OmniTextureManager.get(), OmniClient.getInstance().getResourceManager(), OmniClient.getInstance().getFramebuffer(), phosphorBlur);
40+
saturationShader.createBindFramebuffers(OmniResolution.getViewportWidth(), OmniResolution.getViewportHeight());
41+
((EntityRendererHook) OmniClient.getInstance().entityRenderer).colorSaturation$setSaturationShader(saturationShader);
4142
reloadSaturation();
4243
} catch (IOException e) {
4344
e.printStackTrace();
4445
}
4546
} else if (isShaderActive() && !ColorSaturation.getConfig().enabled) {
46-
final EntityRendererHook entityRenderer = (EntityRendererHook) UMinecraft.getMinecraft().entityRenderer;
47+
final EntityRendererHook entityRenderer = (EntityRendererHook) OmniClient.getInstance().entityRenderer;
4748
if (entityRenderer.colorSaturation$getSaturationShader() != null) {
4849
entityRenderer.colorSaturation$getSaturationShader().deleteShaderGroup();
4950
}
@@ -54,7 +55,7 @@ public static void reloadShader() {
5455

5556
public static void reloadSaturation() {
5657
try {
57-
final List<Shader> listShaders = ((ShaderGroupAccessor) ((EntityRendererHook) UMinecraft.getMinecraft().entityRenderer).colorSaturation$getSaturationShader()).getListShaders();
58+
final List<Shader> listShaders = ((ShaderGroupAccessor) ((EntityRendererHook) OmniClient.getInstance().entityRenderer).colorSaturation$getSaturationShader()).getListShaders();
5859

5960
if (listShaders == null) {
6061
return;
@@ -75,7 +76,7 @@ public static void reloadSaturation() {
7576
}
7677

7778
private static boolean isShaderActive() {
78-
return ((EntityRendererHook) UMinecraft.getMinecraft().entityRenderer).colorSaturation$getSaturationShader() != null
79+
return ((EntityRendererHook) OmniClient.getInstance().entityRenderer).colorSaturation$getSaturationShader() != null
7980
//#if MC<=11202
8081
&& net.minecraft.client.renderer.OpenGlHelper.shadersSupported
8182
//#endif

src/main/java/org/polyfrost/colorsaturation/command/SaturationCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import org.polyfrost.oneconfig.api.commands.v1.factories.annotated.Command;
55
import org.polyfrost.oneconfig.utils.v1.dsl.ScreensKt;
66

7-
@Command(value = ColorSaturation.ID, description = "Access the " + ColorSaturation.NAME + " GUI.")
7+
@Command(ColorSaturation.ID)
88
public class SaturationCommand {
99
@Command
1010
private void main() {

src/main/java/org/polyfrost/colorsaturation/mixin/BlurModMixin.java

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

3+
import dev.deftu.omnicore.client.OmniClient;
34
import net.minecraft.client.renderer.EntityRenderer;
45
import org.polyfrost.colorsaturation.EntityRendererHook;
5-
import org.polyfrost.universal.UMinecraft;
66
import org.spongepowered.asm.mixin.Dynamic;
77
import org.spongepowered.asm.mixin.Mixin;
88
import org.spongepowered.asm.mixin.Pseudo;
@@ -21,7 +21,7 @@ private boolean isShaderActive(EntityRenderer er) {
2121
//#else
2222
//$$ true
2323
//#endif
24-
&& ((EntityRendererHook) UMinecraft.getMinecraft().entityRenderer).colorSaturation$getSaturationShader() != null
24+
&& ((EntityRendererHook) OmniClient.getInstance().entityRenderer).colorSaturation$getSaturationShader() != null
2525
) {
2626
return false;
2727
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ object ColorSaturation
3131

3232
fun initialize() {
3333
config = SaturationConfig()
34-
CommandManager.registerCommand(SaturationCommand())
34+
CommandManager.register(SaturationCommand())
3535
EventManager.INSTANCE.register(Saturation())
3636
}
3737

0 commit comments

Comments
 (0)