diff --git a/build.gradle b/build.gradle index 57aa885..7c3393a 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ buildscript { mavenCentral() } dependencies { - classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true + classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true classpath group: 'org.spongepowered', name: 'mixingradle', version: '0.7-SNAPSHOT' } } @@ -22,7 +22,7 @@ version = "${config.version}-${config.build_number}" group = "vazkii.${config.mod_id}" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = config.mod_name -sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly. +sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = 16 // Need this here so eclipse task generates correctly. minecraft { // The mappings can be changed at any time, and must be in the following format. @@ -81,29 +81,16 @@ mixin { dependencies { minecraft "net.minecraftforge:forge:${config.mc_version}-${config.forge_version}" -} - -repositories { - maven { - // for Mappings - name "gigaherz" - url "http://dogforce-games.com/maven/" - } + annotationProcessor 'org.spongepowered:mixin:0.8.4:processor' } processResources { // replace stuff in mcmod.info, nothing else - from(sourceSets.main.resources.srcDirs) { - include 'META-INF/mods.toml' - + filesMatching("META-INF/mods.toml") { // replace version and mcversion expand 'version': project.version } - - // copy everything else, thats not the mods.toml - from(sourceSets.main.resources.srcDirs) { - exclude 'META-INF/mods.toml', '**/psd/**' - } + exclude '**/psd/**' } task incrementBuildNumber { diff --git a/build.properties b/build.properties index 5f759f0..88cad62 100644 --- a/build.properties +++ b/build.properties @@ -1,11 +1,11 @@ # #Sat Jan 02 18:28:11 GMT 2021 mod_name=DataFixerSlayer -forge_version=34.1.32 -mapping_version=20200916-1.16.2 -mapping_channel=snapshot +forge_version=37.0.73 +mapping_version=1.17.1 +mapping_channel=official mod_id=datafixerslayer version=1.0 dir_output=../Build Output/DFS/ -mc_version=1.16.3 +mc_version=1.17.1 build_number=4 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 949819d..5416585 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-bin.zip diff --git a/src/main/java/vazkii/dfs/FakeDataFixer.java b/src/main/java/vazkii/dfs/FakeDataFixer.java index 5d3243a..badb79d 100644 --- a/src/main/java/vazkii/dfs/FakeDataFixer.java +++ b/src/main/java/vazkii/dfs/FakeDataFixer.java @@ -12,7 +12,7 @@ import com.mojang.datafixers.types.templates.TypeTemplate; import com.mojang.serialization.Dynamic; -import net.minecraft.util.SharedConstants; +import net.minecraft.SharedConstants; public class FakeDataFixer implements DataFixer { @@ -31,7 +31,7 @@ public Schema getSchema(int key) { private static class FakeSchema extends Schema { public FakeSchema() { - super(SharedConstants.getVersion().getWorldVersion(), null); + super(SharedConstants.getCurrentVersion().getWorldVersion(), null); } @Override @@ -76,4 +76,4 @@ public TaggedChoiceType findChoiceType(TypeReference type) { } -} \ No newline at end of file +} diff --git a/src/main/java/vazkii/dfs/mixin/DataFixesManagerMixin.java b/src/main/java/vazkii/dfs/mixin/DataFixesManagerMixin.java index af7367f..315e19a 100644 --- a/src/main/java/vazkii/dfs/mixin/DataFixesManagerMixin.java +++ b/src/main/java/vazkii/dfs/mixin/DataFixesManagerMixin.java @@ -5,14 +5,18 @@ import com.mojang.datafixers.DataFixer; -import net.minecraft.util.datafix.DataFixesManager; +import net.minecraft.util.datafix.DataFixers; import vazkii.dfs.FakeDataFixer; -@Mixin(DataFixesManager.class) +@Mixin(DataFixers.class) public class DataFixesManagerMixin { + /** + * @reason Disable DFU for faster startup and lower memory usage + * @author Vazkii + */ @Overwrite - private static DataFixer createFixer() { + private static DataFixer createFixerUpper() { return new FakeDataFixer(); }