Skip to content

Commit

Permalink
Backport to 1.17.1
Browse files Browse the repository at this point in the history
  • Loading branch information
StartsMercury committed Jan 2, 2025
1 parent d7af0cf commit 3ad07f7
Show file tree
Hide file tree
Showing 44 changed files with 11 additions and 13 deletions.
12 changes: 5 additions & 7 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ object Constants {
const val VERSION = "0.4.2"

const val VERSION_JAVA = 17
const val VERSION_MINECRAFT = "1.18.2"
const val VERSION_MINECRAFT = "1.17.1"
}

plugins {
Expand All @@ -24,13 +24,11 @@ java {
}

loom {
accessWidenerPath = file("src/client/resources/visual-snowy-leaves.accesswidener")
accessWidenerPath = file("src/main/resources/visual-snowy-leaves.accesswidener")
runtimeOnlyLog4j = true
splitEnvironmentSourceSets()

mods.register("visual-snowy-leaves") {
sourceSet("main")
sourceSet("client")
}
}

Expand All @@ -57,10 +55,10 @@ dependencies {
mappings(loom.officialMojangMappings())
modImplementation("net.fabricmc:fabric-loader:0.16.9")

modImplementation(fabricApi.module("fabric-resource-loader-v0", "0.77.0+1.18.2"))
modImplementation(fabricApi.module("fabric-resource-loader-v0", "0.46.1+1.17"))

modImplementation("com.terraformersmc:modmenu:3.2.5")
modCompileOnly("maven.modrinth:sodium:mc1.18.2-0.4.1")
modImplementation("com.terraformersmc:modmenu:2.0.17")
modCompileOnly("maven.modrinth:sodium:mc1.17.1-0.3.4")
}

tasks.withType<ProcessResources> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParseException;
import com.google.gson.JsonParser;
import com.google.gson.internal.Streams;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import com.mojang.serialization.JsonOps;
import io.github.startsmercury.visual_snowy_leaves.impl.client.config.Config;
Expand All @@ -18,6 +18,7 @@

import java.io.File;
import java.io.IOException;
import java.io.StringReader;
import java.nio.file.Files;
import java.nio.file.NoSuchFileException;
import java.nio.file.Path;
Expand Down Expand Up @@ -136,7 +137,7 @@ private boolean loadConfig() {
}

try{
json = JsonParser.parseString(String.join("\n", lines));
json = Streams.parse(new JsonReader(new StringReader(String.join("\n", lines))));
} catch (final JsonParseException cause) {
this.logger.warn("[{}] Invalid config json syntax", VslConstants.NAME, cause);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,12 @@ public void onInitializeClient() {
}

ResourceManagerHelper.registerBuiltinResourcePack(
new ResourceLocation(MODID, "vsl-jlf"),
new ResourceLocation(MODID, "vsl_jlf"),
fabricLoader.getModContainer(MODID).orElseThrow(() -> new AssertionError(
"Expected this mod ("
+ MODID
+ ") be loaded and recognized by VisualSnowyLeavesFabric"
)),
"Jungle Leaves Fix",
ResourcePackActivationType.NORMAL
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
public interface LevelReaderMixin extends SnowAware {
@Override
default boolean visual_snowy_leaves$coldEnoughToSnow(final BlockPos blockPos) {
return ((LevelReader) this).getBiome(blockPos).value().coldEnoughToSnow(blockPos);
return ((LevelReader) this).getBiome(blockPos).isColdEnoughToSnow(blockPos);
}
}
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pack": {
"pack_format": 8,
"pack_format": 7,
"description": "Fix fruit tint."
}
}

0 comments on commit 3ad07f7

Please sign in to comment.