From 7241b6ecc690f9d956f998c5a942468b075e05fc Mon Sep 17 00:00:00 2001 From: gniftygnome Date: Fri, 1 Apr 2022 14:04:13 -0700 Subject: [PATCH 1/4] Update for Minecraft 1.18.2 (ReloadableResourceManagerImpl). --- gradle.properties | 8 ++++---- gradle/wrapper/gradle-wrapper.properties | 2 +- .../terraformersmc/vistas/mixin/MinecraftClientMixin.java | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/gradle.properties b/gradle.properties index d97964d..822b5d2 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,10 +3,10 @@ org.gradle.jvmargs=-Xmx1G maven_group=com.terraformersmc archive_name=vistas -minecraft_version=1.18 -yarn_mappings=1.18+build.1 -loader_version=0.12.6 -fabric_version=0.43.1+1.18 +minecraft_version=1.18.2 +yarn_mappings=1.18.2+build.2 +loader_version=0.13.3 +fabric_version=0.48.0+1.18.2 modmenu_version=3.0.0 clothconfig_version=6.0.42 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index e750102..41dfb87 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/main/java/com/terraformersmc/vistas/mixin/MinecraftClientMixin.java b/src/main/java/com/terraformersmc/vistas/mixin/MinecraftClientMixin.java index b229620..90d2728 100644 --- a/src/main/java/com/terraformersmc/vistas/mixin/MinecraftClientMixin.java +++ b/src/main/java/com/terraformersmc/vistas/mixin/MinecraftClientMixin.java @@ -20,7 +20,7 @@ import net.minecraft.client.MinecraftClient; import net.minecraft.client.RunArgs; import net.minecraft.client.network.ClientPlayerEntity; -import net.minecraft.resource.ReloadableResourceManager; +import net.minecraft.resource.ReloadableResourceManagerImpl; import net.minecraft.sound.MusicSound; @Environment(EnvType.CLIENT) @@ -32,13 +32,13 @@ public class MinecraftClientMixin implements MinecraftClientAccess { @Shadow @Final - private ReloadableResourceManager resourceManager; + private ReloadableResourceManagerImpl resourceManager; @Nullable @Shadow public ClientPlayerEntity player; - @Inject(method = "", at = @At(value = "INVOKE", target = "Lnet/minecraft/resource/ReloadableResourceManager;registerReloader(Lnet/minecraft/resource/ResourceReloader;)V", ordinal = 2, shift = Shift.AFTER)) + @Inject(method = "", at = @At(value = "INVOKE", target = "Lnet/minecraft/resource/ReloadableResourceManagerImpl;registerReloader(Lnet/minecraft/resource/ResourceReloader;)V", ordinal = 2, shift = Shift.AFTER)) private void vistas$init$registerPanoramaReloader(RunArgs args, CallbackInfo ci) { this.panoramaResourceReloader = new PanoramaResourceReloader(); this.resourceManager.registerReloader(panoramaResourceReloader); From 3e2981b0ef6e31c771af4adcfc95a96207fd155d Mon Sep 17 00:00:00 2001 From: gniftygnome Date: Wed, 15 Jun 2022 11:24:17 -0700 Subject: [PATCH 2/4] Delegate splash text to vanilla code when there's no vista. --- .../vistas/mixin/SplashTextResourceSupplierMixin.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/terraformersmc/vistas/mixin/SplashTextResourceSupplierMixin.java b/src/main/java/com/terraformersmc/vistas/mixin/SplashTextResourceSupplierMixin.java index f915831..77e4d0e 100644 --- a/src/main/java/com/terraformersmc/vistas/mixin/SplashTextResourceSupplierMixin.java +++ b/src/main/java/com/terraformersmc/vistas/mixin/SplashTextResourceSupplierMixin.java @@ -1,5 +1,7 @@ package com.terraformersmc.vistas.mixin; +import com.terraformersmc.vistas.title.VistasTitle; +import net.minecraft.util.Identifier; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; @@ -30,7 +32,9 @@ public class SplashTextResourceSupplierMixin { private void vistas$get(CallbackInfoReturnable ci) { MinecraftClient client = MinecraftClient.getInstance(); PanoramaResourceReloader resourceReloader = ((MinecraftClientAccess) client).getPanoramaResourceReloader(); - if (resourceReloader != null) { + Identifier panoramaId = VistasTitle.PANORAMAS_INVERT.get(VistasTitle.CURRENT.getValue()); + + if (resourceReloader != null && panoramaId != null) { ci.setReturnValue(resourceReloader.get()); } } From 3251325b60b50adfd2a77a5719f57e98cdffb1c9 Mon Sep 17 00:00:00 2001 From: gniftygnome Date: Sat, 13 Aug 2022 00:33:17 -0700 Subject: [PATCH 3/4] Update config for official builds. --- .github/workflows/release.yml | 2 +- build.gradle | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c131391..6a01e08 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -45,7 +45,7 @@ jobs: if: ${{ runner.os != 'Windows' }} run: chmod +x ./gradlew - name: Build - run: ./gradlew generateChangelog build publish curseforge github publishModrinth --stacktrace --parallel -PlastTag="v${{ github.event.inputs.previousVersion }}" -PcurrentTag="v${{ github.event.inputs.version }}" + run: ./gradlew generateChangelog build publish curseforge github modrinth --stacktrace --parallel -PlastTag="v${{ github.event.inputs.previousVersion }}" -PcurrentTag="v${{ github.event.inputs.version }}" env: MAVEN_URL: ${{ secrets.MAVEN_URL }} MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} diff --git a/build.gradle b/build.gradle index dfa87fa..24a6eed 100644 --- a/build.gradle +++ b/build.gradle @@ -2,7 +2,7 @@ plugins { id 'fabric-loom' version '0.10-SNAPSHOT' } -apply from: 'https://raw.githubusercontent.com/TerraformersMC/GradleScripts/2.1/ferry.gradle' +apply from: 'https://raw.githubusercontent.com/TerraformersMC/GradleScripts/2.5/ferry.gradle' sourceCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_17 From d7a3880ebc429b17ff0f77fcc51db125c5338e54 Mon Sep 17 00:00:00 2001 From: gniftygnome Date: Sat, 13 Aug 2022 00:39:34 -0700 Subject: [PATCH 4/4] Update deps to the latest 1.18.2 versions. --- gradle.properties | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/gradle.properties b/gradle.properties index 822b5d2..73263d6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,11 +4,11 @@ maven_group=com.terraformersmc archive_name=vistas minecraft_version=1.18.2 -yarn_mappings=1.18.2+build.2 -loader_version=0.13.3 -fabric_version=0.48.0+1.18.2 -modmenu_version=3.0.0 -clothconfig_version=6.0.42 +yarn_mappings=1.18.2+build.4 +loader_version=0.14.9 +fabric_version=0.58.0+1.18.2 +modmenu_version=3.2.3 +clothconfig_version=6.2.62 # Project Metadata project_name=Vistas @@ -21,14 +21,14 @@ default_release_type=beta # CurseForge Metadata curseforge_slug=vistas curseforge_id=423659 -curseforge_game_versions=1.18, Fabric +curseforge_game_versions=1.18.2, Fabric curseforge_required_dependencies= curseforge_optional_dependencies= # Modrinth Metadata modrinth_slug=vistas modrinth_id=itzZXRxq -modrinth_game_versions=1.18 +modrinth_game_versions=1.18.2 modrinth_mod_loaders=fabric # Mod Loader Metadata