diff options
author | md_5 <git@md-5.net> | 2016-03-01 08:31:47 +1100 |
---|---|---|
committer | md_5 <git@md-5.net> | 2016-03-01 09:31:32 +1100 |
commit | 409eb2313708834c644ed4b9384a5eb0bb21fc71 (patch) | |
tree | 461ea5b4bd79ebd6af07e1bd8cbdfa7cf17278ba /src/main/java | |
parent | 5861ac096707a79049b3cb18dee84430befb2b68 (diff) | |
download | buildtools-409eb2313708834c644ed4b9384a5eb0bb21fc71.tar buildtools-409eb2313708834c644ed4b9384a5eb0bb21fc71.tar.gz buildtools-409eb2313708834c644ed4b9384a5eb0bb21fc71.tar.lz buildtools-409eb2313708834c644ed4b9384a5eb0bb21fc71.tar.xz buildtools-409eb2313708834c644ed4b9384a5eb0bb21fc71.zip |
Implement changes required for Minecraft 1.9
* Add method to configure decompiler arguments in info.json
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/org/spigotmc/builder/Builder.java | 5 | ||||
-rw-r--r-- | src/main/java/org/spigotmc/builder/VersionInfo.java | 13 |
2 files changed, 14 insertions, 4 deletions
diff --git a/src/main/java/org/spigotmc/builder/Builder.java b/src/main/java/org/spigotmc/builder/Builder.java index b361a07..bde98ff 100644 --- a/src/main/java/org/spigotmc/builder/Builder.java +++ b/src/main/java/org/spigotmc/builder/Builder.java @@ -35,6 +35,7 @@ import java.security.KeyManagementException; import java.security.NoSuchAlgorithmException; import java.security.SecureRandom; import java.security.cert.X509Certificate; +import java.text.MessageFormat; import java.util.Arrays; import java.util.Date; import java.util.Enumeration; @@ -240,7 +241,7 @@ public class Builder if ( buildNumber != -1 && buildInfo.getToolsVersion() != -1 && buildNumber < buildInfo.getToolsVersion() ) { - System.err.println( "**** Your BuildTools is out of date and will not build the requested version. Please grab a new copy from http://www.spigotmc.org/" ); + System.err.println( "**** Your BuildTools is out of date and will not build the requested version. Please grab a new copy from https://www.spigotmc.org/" ); System.exit( 1 ); } } @@ -323,7 +324,7 @@ public class Builder } } ); - runProcess( CWD, "java", "-jar", "BuildData/bin/fernflower.jar", "-dgs=1", "-hdc=0", "-rbr=0", "-asc=1", "-udv=0", clazzDir.getPath(), decompileDir.getPath() ); + runProcess( CWD, MessageFormat.format( versionInfo.getDecompileCommand(), clazzDir.getPath(), decompileDir.getPath() ).split( " ") ); } System.out.println( "Applying CraftBukkit Patches" ); diff --git a/src/main/java/org/spigotmc/builder/VersionInfo.java b/src/main/java/org/spigotmc/builder/VersionInfo.java index e3a4f34..935a6d8 100644 --- a/src/main/java/org/spigotmc/builder/VersionInfo.java +++ b/src/main/java/org/spigotmc/builder/VersionInfo.java @@ -1,10 +1,8 @@ package org.spigotmc.builder; -import lombok.AllArgsConstructor; import lombok.Data; @Data -@AllArgsConstructor public class VersionInfo { @@ -14,4 +12,15 @@ public class VersionInfo private String memberMappings; private String packageMappings; private String minecraftHash; + private String decompileCommand = "java -jar BuildData/bin/fernflower.jar -dgs=1 -hdc=0 -rbr=0 -asc=1 -udv=0 {0} {1}"; + + public VersionInfo(String minecraftVersion, String accessTransforms, String classMappings, String memberMappings, String packageMappings, String minecraftHash) + { + this.minecraftVersion = minecraftVersion; + this.accessTransforms = accessTransforms; + this.classMappings = classMappings; + this.memberMappings = memberMappings; + this.packageMappings = packageMappings; + this.minecraftHash = minecraftHash; + } } |