Skip to content
This repository has been archived by the owner on Mar 12, 2023. It is now read-only.

Update to 1.17.1 #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 5 additions & 18 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
}
Expand All @@ -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.
Expand Down Expand Up @@ -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 {
Expand Down
8 changes: 4 additions & 4 deletions build.properties
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 3 additions & 3 deletions src/main/java/vazkii/dfs/FakeDataFixer.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand All @@ -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
Expand Down Expand Up @@ -76,4 +76,4 @@ public TaggedChoiceType<?> findChoiceType(TypeReference type) {

}

}
}
10 changes: 7 additions & 3 deletions src/main/java/vazkii/dfs/mixin/DataFixesManagerMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down