chore: update to 1.20.5
This commit is contained in:
parent
d5766f5e70
commit
a299df6ef3
|
@ -1,5 +1,5 @@
|
||||||
plugins {
|
plugins {
|
||||||
id("jfmod") version "1.5-SNAPSHOT"
|
id("jfmod") version "1.6-SNAPSHOT"
|
||||||
}
|
}
|
||||||
|
|
||||||
loom {
|
loom {
|
||||||
|
@ -10,10 +10,11 @@ allprojects { group = "io.gitlab.jfronny" }
|
||||||
base.archivesName = "slyde"
|
base.archivesName = "slyde"
|
||||||
|
|
||||||
jfMod {
|
jfMod {
|
||||||
minecraftVersion = "1.20.4"
|
minecraftVersion = "1.20.5"
|
||||||
yarn("build.1")
|
yarn("build.1")
|
||||||
loaderVersion = "0.15.0"
|
loaderVersion = "0.15.10"
|
||||||
libJfVersion = "3.14.1"
|
libJfVersion = "3.15.2"
|
||||||
|
fabricApiVersion = "0.97.6+1.20.5"
|
||||||
|
|
||||||
modrinth {
|
modrinth {
|
||||||
projectId = "slyde"
|
projectId = "slyde"
|
||||||
|
@ -32,13 +33,13 @@ repositories {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
modCompileOnly("maven.modrinth:sodium:mc1.20.3-0.5.4")
|
modCompileOnly("maven.modrinth:sodium:mc1.20.5-0.5.8")
|
||||||
|
|
||||||
modImplementation("io.gitlab.jfronny.libjf:libjf-config-core-v2:${jfMod.libJfVersion.get()}")
|
modImplementation("io.gitlab.jfronny.libjf:libjf-config-core-v2")
|
||||||
|
|
||||||
// For testing in dev environment
|
// For testing in dev environment
|
||||||
modLocalRuntime("net.fabricmc.fabric-api:fabric-api:0.91.1+1.20.4")
|
modLocalRuntime("net.fabricmc.fabric-api:fabric-api")
|
||||||
modLocalRuntime("io.gitlab.jfronny.libjf:libjf-devutil:${jfMod.libJfVersion.get()}")
|
modLocalRuntime("io.gitlab.jfronny.libjf:libjf-devutil")
|
||||||
modLocalRuntime("io.gitlab.jfronny.libjf:libjf-config-ui-tiny:${jfMod.libJfVersion.get()}")
|
modLocalRuntime("io.gitlab.jfronny.libjf:libjf-config-ui-tiny")
|
||||||
modLocalRuntime("com.terraformersmc:modmenu:9.0.0-pre.1")
|
modLocalRuntime("com.terraformersmc:modmenu:10.0.0-beta.1")
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
package io.gitlab.jfronny.slyde.mixin;
|
package io.gitlab.jfronny.slyde.mixin;
|
||||||
|
|
||||||
|
import com.mojang.serialization.DataResult;
|
||||||
|
import io.gitlab.jfronny.commons.ref.R;
|
||||||
import net.minecraft.client.*;
|
import net.minecraft.client.*;
|
||||||
import net.minecraft.client.option.*;
|
import net.minecraft.client.option.*;
|
||||||
import org.spongepowered.asm.mixin.*;
|
import org.spongepowered.asm.mixin.*;
|
||||||
|
@ -10,9 +12,9 @@ import java.util.function.*;
|
||||||
|
|
||||||
@Mixin(targets = "net.minecraft.client.option.GameOptions$2")
|
@Mixin(targets = "net.minecraft.client.option.GameOptions$2")
|
||||||
public class GameOptionsMixin {
|
public class GameOptionsMixin {
|
||||||
@Redirect(method = "accept", at = @At(value = "INVOKE", target = "Ljava/util/Optional;ifPresent(Ljava/util/function/Consumer;)V", ordinal = 1))
|
@Redirect(method = "accept", at = @At(value = "INVOKE", target = "Lcom/mojang/serialization/DataResult;ifSuccess(Ljava/util/function/Consumer;)Lcom/mojang/serialization/DataResult;", remap = false))
|
||||||
private <T> void slyde$replaceSetter(Optional<T> value, Consumer<T> originalSetter, String key, SimpleOption<T> option) {
|
private <T> DataResult<T> slyde$replaceSetter(DataResult<T> instance, Consumer<T> consumer, String key, SimpleOption<T> option) {
|
||||||
value.ifPresent(realValue -> {
|
return instance.ifSuccess(realValue -> {
|
||||||
if (option.getCallbacks() instanceof SimpleOption.SliderCallbacks) {
|
if (option.getCallbacks() instanceof SimpleOption.SliderCallbacks) {
|
||||||
if (!MinecraftClient.getInstance().isRunning()) {
|
if (!MinecraftClient.getInstance().isRunning()) {
|
||||||
option.value = realValue;
|
option.value = realValue;
|
||||||
|
@ -24,7 +26,7 @@ public class GameOptionsMixin {
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
originalSetter.accept(realValue);
|
consumer.accept(realValue);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue