diff --git a/build.gradle b/build.gradle index d9be415..3cdaa22 100644 --- a/build.gradle +++ b/build.gradle @@ -11,8 +11,7 @@ dependencies { mod "fabric-loader", "net.fabricmc:fabric-loader:$project.loader_version" mod "modmenu", "com.terraformersmc:modmenu:$project.modmenu_version" includeMod "fabric-api", "net.fabricmc.fabric-api:fabric-api:$project.fabric_version" - includeMod "cloth-config-2", "me.shedaniel.cloth:config-2:$project.clothconfig_version" - includeMod "autoconfig", "me.sargunvohra.mcmods:autoconfig1u:$project.autoconfig_version" + includeMod "cloth-config-2", "me.shedaniel.cloth:cloth-config-fabric:$project.clothconfig_version" } repositories { @@ -23,6 +22,9 @@ repositories { name = 'TerraformersMC' url = 'https://maven.terraformersmc.com/' } + maven { + url "https://maven.shedaniel.me/" + } } jar { diff --git a/gradle.properties b/gradle.properties index 1239c9f..198dab5 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,12 +4,11 @@ maven_group=com.terraformersmc archive_name=vistas minecraft_version=1.16.5 -yarn_mappings=1.16.5+build.3 -loader_version=0.11.1 -fabric_version=0.30.0+1.16 -modmenu_version=1.16.1 -clothconfig_version=4.8.3 -autoconfig_version=3.3.1 +yarn_mappings=1.16.5+build.5 +loader_version=0.11.2 +fabric_version=0.31.0+1.16 +modmenu_version=1.16.8 +clothconfig_version=4.11.14 # Project Metadata project_name=Vistas diff --git a/src/main/java/com/terraformersmc/vistas/config/PanoramaConfig.java b/src/main/java/com/terraformersmc/vistas/config/PanoramaConfig.java index dfb5c40..8931bb5 100644 --- a/src/main/java/com/terraformersmc/vistas/config/PanoramaConfig.java +++ b/src/main/java/com/terraformersmc/vistas/config/PanoramaConfig.java @@ -1,25 +1,25 @@ package com.terraformersmc.vistas.config; -import me.sargunvohra.mcmods.autoconfig1u.AutoConfig; -import me.sargunvohra.mcmods.autoconfig1u.ConfigData; -import me.sargunvohra.mcmods.autoconfig1u.annotation.Config; -import me.sargunvohra.mcmods.autoconfig1u.serializer.GsonConfigSerializer; +import me.shedaniel.autoconfig.AutoConfig; +import me.shedaniel.autoconfig.ConfigData; +import me.shedaniel.autoconfig.annotation.Config; +import me.shedaniel.autoconfig.serializer.GsonConfigSerializer; @Config(name = "vistas") public class PanoramaConfig implements ConfigData { - public String panorama = "minecraft"; - public boolean forcePanorama = false; - public boolean randomPerScreen = false; - public boolean hectic = false; - public boolean lockPanoramicScreenshotRotation = true; + public String panorama = "minecraft"; + public boolean forcePanorama = false; + public boolean randomPerScreen = false; + public boolean lockScreenshotPitch = true; + public boolean lockScreenshotYaw = false; - public static void init() { - AutoConfig.register(PanoramaConfig.class, GsonConfigSerializer::new); - } + public static void init() { + AutoConfig.register(PanoramaConfig.class, GsonConfigSerializer::new); + } - public static PanoramaConfig getInstance() { - return AutoConfig.getConfigHolder(PanoramaConfig.class).getConfig(); - } + public static PanoramaConfig getInstance() { + return AutoConfig.getConfigHolder(PanoramaConfig.class).getConfig(); + } } diff --git a/src/main/java/com/terraformersmc/vistas/config/VistasModMenuCompat.java b/src/main/java/com/terraformersmc/vistas/config/VistasModMenuCompat.java index 0f7b10f..c519567 100644 --- a/src/main/java/com/terraformersmc/vistas/config/VistasModMenuCompat.java +++ b/src/main/java/com/terraformersmc/vistas/config/VistasModMenuCompat.java @@ -2,14 +2,15 @@ import com.terraformersmc.modmenu.api.ConfigScreenFactory; import com.terraformersmc.modmenu.api.ModMenuApi; -import me.sargunvohra.mcmods.autoconfig1u.AutoConfig; + +import me.shedaniel.autoconfig.AutoConfig; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; @Environment(EnvType.CLIENT) public class VistasModMenuCompat implements ModMenuApi { - @Override - public ConfigScreenFactory getModConfigScreenFactory() { - return parent -> AutoConfig.getConfigScreen(PanoramaConfig.class, parent).get(); - } + @Override + public ConfigScreenFactory getModConfigScreenFactory() { + return parent -> AutoConfig.getConfigScreen(PanoramaConfig.class, parent).get(); + } } diff --git a/src/main/java/com/terraformersmc/vistas/mixin/GameRendererMixin.java b/src/main/java/com/terraformersmc/vistas/mixin/GameRendererMixin.java index b8219e4..4b2382f 100644 --- a/src/main/java/com/terraformersmc/vistas/mixin/GameRendererMixin.java +++ b/src/main/java/com/terraformersmc/vistas/mixin/GameRendererMixin.java @@ -62,8 +62,10 @@ public abstract class GameRendererMixin { boolean oldFov90 = renderingPanorama; float oldPitch = client.player.pitch; float oldYaw = client.player.yaw; - if (PanoramaConfig.getInstance().lockPanoramicScreenshotRotation) { + if (PanoramaConfig.getInstance().lockScreenshotPitch) { client.player.pitch = 0; + } + if (PanoramaConfig.getInstance().lockScreenshotYaw) { client.player.yaw = 0; } boolean oldCulling = client.chunkCullingEnabled; diff --git a/src/main/java/com/terraformersmc/vistas/mixin/TitleScreenBackgroundMixin.java b/src/main/java/com/terraformersmc/vistas/mixin/TitleScreenBackgroundMixin.java index 28cf856..32a725c 100644 --- a/src/main/java/com/terraformersmc/vistas/mixin/TitleScreenBackgroundMixin.java +++ b/src/main/java/com/terraformersmc/vistas/mixin/TitleScreenBackgroundMixin.java @@ -38,16 +38,6 @@ private void VISTAS_initPanoramaChange(CallbackInfo ci) { updateScreen(); } - @Inject(method = "tick", at = @At("TAIL")) - private void VISTAS_tickPanoramaChange(CallbackInfo ci) { - - if (PanoramaConfig.getInstance().hectic) { - Panoramas.setRandom(); - - updateScreen(); - } - } - @ModifyArg(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/texture/TextureManager;bindTexture(Lnet/minecraft/util/Identifier;)V", ordinal = 0), index = 0) private Identifier VISTAS_overlayMixin(Identifier defaultOverlay) { if (Panoramas.getCurrent() != null) { diff --git a/src/main/resources/assets/vistas/lang/en_us.json b/src/main/resources/assets/vistas/lang/en_us.json index 32cce28..7e541bc 100644 --- a/src/main/resources/assets/vistas/lang/en_us.json +++ b/src/main/resources/assets/vistas/lang/en_us.json @@ -3,8 +3,8 @@ "text.autoconfig.vistas.option.panorama": "Panorama", "text.autoconfig.vistas.option.forcePanorama": "Force Panorama", "text.autoconfig.vistas.option.randomPerScreen": "Random Per Screen", - "text.autoconfig.vistas.option.hectic": "Hectic (Warning, Flashing Colors)", - "text.autoconfig.vistas.option.lockPanoramicScreenshotRotation": "Lock Panoramic Screenshot Rotation to (0 / 0)", + "text.autoconfig.vistas.option.lockScreenshotPitch": "Lock Panoramic Screenshot Pitch (U,D) to 0", + "text.autoconfig.vistas.option.lockScreenshotYaw": "Lock Panoramic Screenshot Yaw (L,R) to 0", "vistas.panoramic_screenshot.saved": "Panorama taken and saved at %s directory", "key.vistas.panoramic_screenshot": "Take Panoramic Screenshot" }