Skip to content
This repository has been archived by the owner on May 30, 2022. It is now read-only.

Commit

Permalink
Remove the usage of stitch as the loom bug has been fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
modmuss50 committed Nov 11, 2019
1 parent c593ee5 commit d20e331
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
6 changes: 0 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,6 @@ dependencies {
//Required for zt-zip, kinda annoying
include "org.slf4j:slf4j-simple:${project.slf4j_version}"
include "org.slf4j:slf4j-api:${project.slf4j_version}"

//Used only in dev to generate the field names
compile ("net.fabricmc:stitch:${project.stitch_version}") {
transitive = false
}
include "net.fabricmc:stitch:${project.stitch_version}"
}

task unzip(type: Copy) {
Expand Down
15 changes: 1 addition & 14 deletions src/main/java/me/modmuss50/optifabric/mod/OptifineSetup.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
import net.fabricmc.mapping.reader.v2.TinyMetadata;
import net.fabricmc.mapping.tree.ClassDef;
import net.fabricmc.mapping.tree.TinyTree;
import net.fabricmc.mappings.*;
import net.fabricmc.stitch.commands.CommandProposeFieldNames;
import net.fabricmc.tinyremapper.IMappingProvider;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.io.FileUtils;
Expand Down Expand Up @@ -170,7 +168,7 @@ IMappingProvider createMappings(String from, String to) {
//In dev
if (fabricLauncher.isDevelopment()) {
try {
File fullMappings = getDevMappings();
File fullMappings = extractMappings();
return (out) -> {
RemapUtils.getTinyRemapper(fullMappings, from, to).load(out);
out.acceptField(new IMappingProvider.Member("cyf", "CLOUDS", "Lcxt;"),
Expand Down Expand Up @@ -269,17 +267,6 @@ static Optional<Path> getSource(ClassLoader loader, String filename) {
return Optional.empty();
}

//We need to generate the full mappings with enum names as loom does not have these on the classpath
File getDevMappings() throws Exception {
CommandProposeFieldNames fieldNames = new CommandProposeFieldNames();
File fieldMappings = new File(versionDir, "mappings.full.tiny");
if (fieldMappings.exists()) {
fieldMappings.delete();
}
fieldNames.run(new String[]{getMinecraftJar().normalize().toString(), extractMappings().getAbsolutePath(), fieldMappings.getAbsolutePath()});
return fieldMappings;
}

//Extracts the devtime mappings out of yarn into a file
File extractMappings() throws IOException {
File extractedMappings = new File(versionDir, "mappings.tiny");
Expand Down

0 comments on commit d20e331

Please sign in to comment.