diff --git a/build.gradle b/build.gradle index 610e8da..9f323bd 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'fabric-loom' version '0.5-SNAPSHOT' + id 'fabric-loom' version '0.8-SNAPSHOT' id 'maven-publish' } @@ -14,7 +14,7 @@ minecraft { } repositories{ - maven { url 'http://server.bbkr.space:8081/artifactory/libs-release' } + maven { url 'https://server.bbkr.space/artifactory/libs-release' } maven { url 'https://jitpack.io' } } @@ -22,38 +22,33 @@ dependencies { //to change the versions see the gradle.properties file minecraft "com.mojang:minecraft:${project.minecraft_version}" mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2" - modCompile "net.fabricmc:fabric-loader:${project.loader_version}" + modImplementation "net.fabricmc:fabric-loader:${project.loader_version}" // Fabric API. This is technically optional, but you probably want it anyway. - modCompile "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}" + modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}" - modCompile "io.github.cottonmc.cotton:cotton-config:1.0.0-rc.7" + modImplementation "io.github.cottonmc.cotton:cotton-config:1.0.0-rc.7" include "io.github.cottonmc:Jankson-Fabric:3.0.0+j1.2.0" include "io.github.cottonmc.cotton:cotton-logging:1.0.0-rc.4" include "io.github.cottonmc.cotton:cotton-config:1.0.0-rc.7" - modCompile "org.apache.commons:commons-compress:1.19" + modImplementation "org.apache.commons:commons-compress:1.19" include "org.apache.commons:commons-compress:1.19" - modCompile "org.tukaani:xz:1.8" + modImplementation "org.tukaani:xz:1.8" include "org.tukaani:xz:1.8" - modCompile 'com.github.shevek:parallelgzip:master-SNAPSHOT' + modImplementation 'com.github.shevek:parallelgzip:master-SNAPSHOT' include 'com.github.shevek:parallelgzip:master-SNAPSHOT' } processResources { inputs.property "version", project.version - from(sourceSets.main.resources.srcDirs) { - include "fabric.mod.json" + filesMatching("fabric.mod.json") { expand "version": project.version } - - from(sourceSets.main.resources.srcDirs) { - exclude "fabric.mod.json" - } } // ensure that the encoding is set to UTF-8, no matter what the system default is @@ -63,18 +58,18 @@ tasks.withType(JavaCompile) { options.encoding = "UTF-8" } -// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task -// if it is present. -// If you remove this task, sources will not be generated. -task sourcesJar(type: Jar, dependsOn: classes) { - classifier = "sources" - from sourceSets.main.allSource +java { + // Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task + // if it is present. + // If you remove this line, sources will not be generated. + withSourcesJar() } jar { - from "LICENSE" + from("LICENSE") { + rename { "${it}_${project.archivesBaseName}"} + } } - // configure the maven publication publishing { publications { @@ -92,7 +87,11 @@ publishing { // select the repositories you want to publish to repositories { // uncomment to publish to the local maven - // mavenLocal() + + maven { + name = 'myRepo' + url = layout.buildDirectory.dir("repo") + } } } diff --git a/gradle.properties b/gradle.properties index f7ab039..4e94c3b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,12 +1,12 @@ # Done to increase the memory available to gradle. org.gradle.jvmargs=-Xmx1G -minecraft_version=1.16.4 -yarn_mappings=1.16.4+build.7 -loader_version=0.10.8 +minecraft_version=1.17 +yarn_mappings=1.17+build.10 +loader_version=0.11.5 #Fabric api -fabric_version=0.26.3+1.16 +fabric_version=0.35.1+1.17 # Mod Properties mod_version = 2.1.0-prev diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 490fda8..e708b1c 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 622ab64..0f80bbf 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-6.5-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/main/java/net/szum123321/textile_backup/core/Utilities.java b/src/main/java/net/szum123321/textile_backup/core/Utilities.java index 5a72687..e85ecae 100644 --- a/src/main/java/net/szum123321/textile_backup/core/Utilities.java +++ b/src/main/java/net/szum123321/textile_backup/core/Utilities.java @@ -20,9 +20,7 @@ package net.szum123321.textile_backup.core; import net.minecraft.server.MinecraftServer; import net.minecraft.server.world.ServerWorld; -import net.minecraft.util.registry.Registry; -import net.minecraft.util.registry.RegistryKey; -import net.minecraft.world.dimension.DimensionType; +import net.minecraft.world.World; import net.szum123321.textile_backup.ConfigHandler; import net.szum123321.textile_backup.Statics; import net.szum123321.textile_backup.mixin.MinecraftServerSessionAccessor; @@ -45,7 +43,7 @@ public class Utilities { public static File getWorldFolder(MinecraftServer server) { return ((MinecraftServerSessionAccessor)server) .getSession() - .getWorldDirectory(RegistryKey.of(Registry.DIMENSION, DimensionType.OVERWORLD_REGISTRY_KEY.getValue())); + .getWorldDirectory(World.OVERWORLD); } public static File getBackupRootPath(String worldName) {