diff --git a/.github/workflows/gradlepublish.yml b/.github/workflows/gradlepublish.yml index 10688f9..7723285 100644 --- a/.github/workflows/gradlepublish.yml +++ b/.github/workflows/gradlepublish.yml @@ -8,10 +8,10 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Set up JDK 14 + - name: Set up JDK 8 uses: actions/setup-java@v1 with: - java-version: 14 + java-version: 8 - name: Build with Gradle run: gradle build - name: Upload build artifacts diff --git a/gradle.properties b/gradle.properties index 31702e3..5a62a0a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,14 +3,14 @@ org.gradle.jvmargs = -Xmx1G # Fabric Properties, check these on http://modmuss50.me/fabric.html minecraft_version = 1.16.3 -yarn_mappings = 1.16.3+build.7 +yarn_mappings = 1.16.3+build.12 loader_version = 0.9.3+build.207 # Mod Properties -mod_version = 3.0.0+1.16.3 +mod_version = 3.0.2+1.16.3 maven_group = io.github.joaoh1 archives_base_name = boringbackgrounds # Dependencies -fabric_version = 0.20.2+build.402-1.16 +fabric_version = 0.21.0+build.407-1.16 fiber_version = 0.23.0-2 \ No newline at end of file diff --git a/src/main/java/io/github/joaoh1/boringbackgrounds/BoringBackgroundsLoader.java b/src/main/java/io/github/joaoh1/boringbackgrounds/BoringBackgroundsLoader.java index a1277f8..323d19e 100644 --- a/src/main/java/io/github/joaoh1/boringbackgrounds/BoringBackgroundsLoader.java +++ b/src/main/java/io/github/joaoh1/boringbackgrounds/BoringBackgroundsLoader.java @@ -33,7 +33,7 @@ public class BoringBackgroundsLoader implements SimpleResourceReloadListener, Boolean>> load(ResourceManager manager, Profiler profiler, Executor executor) { return CompletableFuture.supplyAsync(() -> { Gson gson = new GsonBuilder().create(); - Collection resources = manager.findResources("backgrounds", filename -> filename == "background_settings.json"); + Collection resources = manager.findResources("backgrounds", filename -> filename.contentEquals("background_settings.json")); Map map = new HashMap<>(); boolean randomizeOnNewScreen = false; for (Identifier identifier : resources) { @@ -60,7 +60,9 @@ public CompletableFuture, Boolean>> load(ResourceMa BackgroundUtils.logger.error("[Boring Backgrounds] Failed to load the background settings! The following error has been printed: " + e); } } - return Map.of(map, randomizeOnNewScreen); + Map, Boolean> returnedMap = new HashMap<>(); + returnedMap.put(map, randomizeOnNewScreen); + return returnedMap; }, executor); } diff --git a/src/main/java/io/github/joaoh1/boringbackgrounds/mixin/TextureManagerMixin.java b/src/main/java/io/github/joaoh1/boringbackgrounds/mixin/TextureManagerMixin.java index 8a84b40..d9c30f7 100644 --- a/src/main/java/io/github/joaoh1/boringbackgrounds/mixin/TextureManagerMixin.java +++ b/src/main/java/io/github/joaoh1/boringbackgrounds/mixin/TextureManagerMixin.java @@ -25,7 +25,7 @@ public class TextureManagerMixin { ) private void redirectBackgroundTexture(Identifier id, CallbackInfo info, AbstractTexture abstractTexture) { // If the identifier is the same as the background texture, hijack it and change it to the chosen texture - if (id == DrawableHelper.BACKGROUND_TEXTURE) { + if (id == DrawableHelper.OPTIONS_BACKGROUND_TEXTURE) { abstractTexture = new ResourceTexture(BackgroundUtils.backgroundTexture); this.registerTexture(id, abstractTexture); abstractTexture.bindTexture();