diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 109db4a..902b2f9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,11 +18,11 @@ jobs: - name: Checkout code uses: actions/checkout@v6 - - name: Set up JDK 21 + - name: Set up JDK 25 uses: actions/setup-java@v5 with: distribution: 'temurin' - java-version: 21 + java-version: 25 - name: Get data from gradle.properties id: mod_data @@ -32,7 +32,7 @@ jobs: properties: 'mod_id version minecraft_version' - name: Setup Gradle - uses: gradle/actions/setup-gradle@v5 + uses: gradle/actions/setup-gradle@v6 - name: Build with Gradle run: ./gradlew build diff --git a/build.gradle b/build.gradle index 9b75397..aa74e08 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,6 @@ plugins { // see https://fabricmc.net/develop/ for new versions - id 'fabric-loom' version '1.13-SNAPSHOT' apply false + id 'net.fabricmc.fabric-loom' version '1.16-SNAPSHOT' apply false // see https://projects.neoforged.net/neoforged/moddevgradle for new versions - id 'net.neoforged.moddev' version '2.0.140' apply false + id 'net.neoforged.moddev' version '2.0.141' apply false } diff --git a/buildSrc/src/main/groovy/multiloader-common.gradle b/buildSrc/src/main/groovy/multiloader-common.gradle index 72b8575..ec5b0d7 100644 --- a/buildSrc/src/main/groovy/multiloader-common.gradle +++ b/buildSrc/src/main/groovy/multiloader-common.gradle @@ -25,19 +25,6 @@ repositories { } filter { includeGroupAndSubgroups('org.spongepowered') } } - exclusiveContent { - forRepositories( - maven { - name = 'ParchmentMC' - url = 'https://maven.parchmentmc.org/' - }, - maven { - name = "NeoForge" - url = 'https://maven.neoforged.net/releases' - } - ) - filter { includeGroup('org.parchmentmc.data') } - } maven { url "https://maven.shedaniel.me/" } maven { url "https://maven.terraformersmc.com/releases/" } } diff --git a/common/build.gradle b/common/build.gradle index 4c9afc2..2c82f2c 100644 --- a/common/build.gradle +++ b/common/build.gradle @@ -10,10 +10,6 @@ neoForge { if (at.exists()) { accessTransformers.add(at.absolutePath) } - parchment { - minecraftVersion = parchment_minecraft - mappingsVersion = parchment_version - } } dependencies { diff --git a/common/src/main/java/me/collinb/dynamicview/DynamicView.java b/common/src/main/java/me/collinb/dynamicview/DynamicView.java index 620de26..3512ad2 100644 --- a/common/src/main/java/me/collinb/dynamicview/DynamicView.java +++ b/common/src/main/java/me/collinb/dynamicview/DynamicView.java @@ -13,15 +13,13 @@ public class DynamicView { private static CameraType previousCameraType; public static void setCameraType(CameraType cameraType) { - if (!isCameraDynamic() && getMC().options.getCameraType() != cameraType) { + if (getMC().options.getCameraType() != cameraType) { previousCameraType = getMC().options.getCameraType(); - Constants.LOG.debug("Setting previousCameraType={}", getMC().options.getCameraType()); if (cameraType != null) { getMC().options.setCameraType(cameraType); } CameraAnimation.INSTANCE.currentDistance = 0.0f; CameraAnimation.INSTANCE.targetDistance = 4.0f; - Constants.LOG.debug("Setting cameraType={}", cameraType); } } @@ -32,7 +30,6 @@ public static void unsetCameraType() { if (config.animationEnabled) { CameraAnimation.INSTANCE.onAnimationComplete = () -> { getMC().options.setCameraType(previousCameraType); - Constants.LOG.debug("Resetting cameraType={}", previousCameraType); previousCameraType = null; }; } else { diff --git a/fabric/build.gradle b/fabric/build.gradle index 1372688..ebac085 100644 --- a/fabric/build.gradle +++ b/fabric/build.gradle @@ -1,23 +1,17 @@ plugins { id 'multiloader-loader' - id 'fabric-loom' + id 'net.fabricmc.fabric-loom' } dependencies { minecraft "com.mojang:minecraft:${minecraft_version}" - mappings loom.layered { - officialMojangMappings() - parchment("org.parchmentmc.data:parchment-${parchment_minecraft}:${parchment_version}@zip") - } - modImplementation "net.fabricmc:fabric-loader:${fabric_loader_version}" - modImplementation "net.fabricmc.fabric-api:fabric-api:${fabric_version}" + implementation "net.fabricmc:fabric-loader:${fabric_loader_version}" + implementation "net.fabricmc.fabric-api:fabric-api:${fabric_version}" - modImplementation("com.terraformersmc:modmenu:${modmenu_version}") { + implementation("com.terraformersmc:modmenu:${modmenu_version}") { exclude module: "fabric-api" } - modApi("me.shedaniel.cloth:cloth-config-fabric:${cloth_config_version}") { - exclude(group: "net.fabricmc.fabric-api") - } + implementation "me.shedaniel.cloth:cloth-config-fabric:${cloth_config_version}" include "me.shedaniel.cloth:cloth-config-fabric:${cloth_config_version}" } @@ -26,9 +20,6 @@ loom { if (aw.exists()) { accessWidenerPath.set(aw) } - mixin { - defaultRefmapName.set("${mod_id}.refmap.json") - } runs { client { client() @@ -61,11 +52,4 @@ sourceSets.configureEach { } } } -} -loom.remapConfigurations.configureEach { - configurations.named(it.name) { - attributes { - attribute(loaderAttribute, 'fabric') - } - } } \ No newline at end of file diff --git a/fabric/src/main/resources/dynamicview.fabric.mixins.json b/fabric/src/main/resources/dynamicview.fabric.mixins.json index 9f0dc84..c45d588 100644 --- a/fabric/src/main/resources/dynamicview.fabric.mixins.json +++ b/fabric/src/main/resources/dynamicview.fabric.mixins.json @@ -3,7 +3,7 @@ "minVersion": "0.8", "package": "me.collinb.dynamicview.mixin", "refmap": "${mod_id}.refmap.json", - "compatibilityLevel": "JAVA_21", + "compatibilityLevel": "JAVA_25", "mixins": [], "client": [], "server": [], diff --git a/fabric/src/main/resources/fabric.mod.json b/fabric/src/main/resources/fabric.mod.json index 5d938a4..4ad4f10 100644 --- a/fabric/src/main/resources/fabric.mod.json +++ b/fabric/src/main/resources/fabric.mod.json @@ -29,7 +29,7 @@ "depends": { "fabricloader": ">=${fabric_loader_version}", "fabric-api": "*", - "minecraft": "${minecraft_version}", + "minecraft": "~${minecraft_version}", "java": ">=${java_version}" }, "suggests": { diff --git a/gradle.properties b/gradle.properties index 22c52bc..8341855 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,31 +1,28 @@ # Important Notes: # Every field you add must be added to the root build.gradle expandProps map. # Project -version=1.0.0 +version=1.1.0 group=me.collinb -java_version=21 +java_version=25 # Common -minecraft_version=1.21.11 +minecraft_version=26.1 mod_name=Dynamic View mod_author=collin-b1 mod_id=dynamicview license=GPL-3.0 credits= description=Automatically switches player perspective in specific contexts. -minecraft_version_range=[1.21.11, 1.22) -neo_form_version=1.21.11-20251209.172050 -# The version of ParchmentMC that is used, see https://parchmentmc.org/docs/getting-started#choose-a-version for new versions -parchment_minecraft=1.21.10 -parchment_version=2025.10.12 +minecraft_version_range=[26.1, 26.2) +neo_form_version=26.1-1 # Fabric, see https://fabricmc.net/develop/ for new versions -fabric_version=0.139.5+1.21.11 -fabric_loader_version=0.18.2 +fabric_version=0.145.1+26.1 +fabric_loader_version=0.18.6 # NeoForge, see https://projects.neoforged.net/neoforged/neoforge for new versions -neoforge_version=21.11.3-beta +neoforge_version=26.1.2.7-beta neoforge_loader_version_range=[4,) # Configs -modmenu_version=17.0.0-beta.2 -cloth_config_version=21.11.153 +modmenu_version=18.0.0-alpha.8 +cloth_config_version=26.1.154 # Gradle org.gradle.jvmargs=-Xmx3G org.gradle.daemon=false diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index bad7c24..dbc3ce4 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.0-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.0-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/neoforge/build.gradle b/neoforge/build.gradle index 7aaeadc..3f4a380 100644 --- a/neoforge/build.gradle +++ b/neoforge/build.gradle @@ -15,10 +15,6 @@ neoForge { if (at.exists()) { accessTransformers.add(at.absolutePath) } - parchment { - minecraftVersion = parchment_minecraft - mappingsVersion = parchment_version - } runs { configureEach { systemProperty('neoforge.enabledGameTestNamespaces', mod_id) diff --git a/neoforge/src/main/resources/dynamicview.neoforge.mixins.json b/neoforge/src/main/resources/dynamicview.neoforge.mixins.json index 9ea9ca7..3ff014b 100644 --- a/neoforge/src/main/resources/dynamicview.neoforge.mixins.json +++ b/neoforge/src/main/resources/dynamicview.neoforge.mixins.json @@ -2,7 +2,7 @@ "required": true, "minVersion": "0.8", "package": "me.collinb.dynamicview.mixin", - "compatibilityLevel": "JAVA_21", + "compatibilityLevel": "JAVA_25", "mixins": [], "client": [], "server": [], diff --git a/settings.gradle b/settings.gradle index 181e16e..52e82c3 100644 --- a/settings.gradle +++ b/settings.gradle @@ -10,20 +10,7 @@ pluginManagement { } } filter { - includeGroup('net.fabricmc') - includeGroup('net.fabricmc.unpick') - includeGroup('fabric-loom') - } - } - exclusiveContent { - forRepository { - maven { - name = 'Sponge' - url = uri('https://repo.spongepowered.org/repository/maven-public') - } - } - filter { - includeGroupAndSubgroups("org.spongepowered") + includeGroupAndSubgroups('net.fabricmc') } } }