1.17 update

2.x-1.16
szymon 2021-06-13 19:12:26 +02:00
parent c80ddfc5b3
commit b172df6c0f
6 changed files with 26 additions and 28 deletions

View File

@ -1,5 +1,5 @@
plugins { plugins {
id 'fabric-loom' version '0.5-SNAPSHOT' id 'fabric-loom' version '0.8-SNAPSHOT'
id 'maven-publish' id 'maven-publish'
} }
@ -14,7 +14,7 @@ minecraft {
} }
repositories{ 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' } maven { url 'https://jitpack.io' }
} }
@ -22,38 +22,33 @@ dependencies {
//to change the versions see the gradle.properties file //to change the versions see the gradle.properties file
minecraft "com.mojang:minecraft:${project.minecraft_version}" minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2" 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. // 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: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-logging:1.0.0-rc.4"
include "io.github.cottonmc.cotton:cotton-config:1.0.0-rc.7" 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" 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" 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' include 'com.github.shevek:parallelgzip:master-SNAPSHOT'
} }
processResources { processResources {
inputs.property "version", project.version inputs.property "version", project.version
from(sourceSets.main.resources.srcDirs) { filesMatching("fabric.mod.json") {
include "fabric.mod.json"
expand "version": project.version 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 // ensure that the encoding is set to UTF-8, no matter what the system default is
@ -63,16 +58,18 @@ tasks.withType(JavaCompile) {
options.encoding = "UTF-8" options.encoding = "UTF-8"
} }
java {
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task // Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present. // if it is present.
// If you remove this task, sources will not be generated. // If you remove this line, sources will not be generated.
task sourcesJar(type: Jar, dependsOn: classes) { withSourcesJar()
classifier = "sources"
from sourceSets.main.allSource
} }
jar { jar {
from "LICENSE" from("LICENSE") {
rename { "${it}_${project.archivesBaseName}"}
}
} }
// configure the maven publication // configure the maven publication

View File

@ -1,12 +1,12 @@
# Done to increase the memory available to gradle. # Done to increase the memory available to gradle.
org.gradle.jvmargs=-Xmx1G org.gradle.jvmargs=-Xmx1G
minecraft_version=1.16.3 minecraft_version=1.17
yarn_mappings=1.16.3+build.47 yarn_mappings=1.17+build.10
loader_version=0.10.5+build.213 loader_version=0.11.5
#Fabric api #Fabric api
fabric_version=0.24.3+build.414-1.16 fabric_version=0.35.1+1.17
# Mod Properties # Mod Properties
mod_version = 2.0.2 mod_version = 2.0.2

Binary file not shown.

View File

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists 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 zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists

View File

@ -22,6 +22,7 @@ import net.minecraft.server.MinecraftServer;
import net.minecraft.server.world.ServerWorld; import net.minecraft.server.world.ServerWorld;
import net.minecraft.util.registry.Registry; import net.minecraft.util.registry.Registry;
import net.minecraft.util.registry.RegistryKey; import net.minecraft.util.registry.RegistryKey;
import net.minecraft.world.World;
import net.minecraft.world.dimension.DimensionType; import net.minecraft.world.dimension.DimensionType;
import net.szum123321.textile_backup.ConfigHandler; import net.szum123321.textile_backup.ConfigHandler;
import net.szum123321.textile_backup.Statics; import net.szum123321.textile_backup.Statics;
@ -47,7 +48,7 @@ public class Utilities {
public static File getWorldFolder(MinecraftServer server) { public static File getWorldFolder(MinecraftServer server) {
return ((MinecraftServerSessionAccessor)server) return ((MinecraftServerSessionAccessor)server)
.getSession() .getSession()
.getWorldDirectory(RegistryKey.of(Registry.DIMENSION, DimensionType.OVERWORLD_REGISTRY_KEY.getValue())); .getWorldDirectory(World.OVERWORLD);
} }
public static void disableWorldSaving(MinecraftServer server) { public static void disableWorldSaving(MinecraftServer server) {

View File

@ -30,7 +30,7 @@
"depends": { "depends": {
"fabricloader": ">=0.8.8", "fabricloader": ">=0.8.8",
"fabric": "*", "fabric": "*",
"minecraft": "1.16.*" "minecraft": "1.17.*"
}, },
"custom": { "custom": {