Always remap jar when using local mappings.

dev/0.11
modmuss50 2017-02-10 13:26:53 +00:00
parent 673f21c506
commit d4792dd0af
No known key found for this signature in database
GPG Key ID: 203A5ED4D3E48BEA
1 changed files with 5 additions and 1 deletions

View File

@ -48,7 +48,11 @@ public class MapJarsTask extends DefaultTask {
@TaskAction
public void mapJars() throws IOException, MappingParseException {
LoomGradleExtension extension = this.getProject().getExtensions().getByType(LoomGradleExtension.class);
if (!Constants.MINECRAFT_MAPPED_JAR.get(extension).exists()) {
if (!Constants.MINECRAFT_MAPPED_JAR.get(extension).exists() || extension.localMappings) {
if(extension.localMappings && Constants.MINECRAFT_MAPPED_JAR.get(extension).exists()){
//Always remap the jar when using local mappings.
Constants.MINECRAFT_MAPPED_JAR.get(extension).delete();
}
if(!extension.hasPomf()){
this.getLogger().lifecycle("POMF version not set, skipping mapping!");
FileUtils.copyFile(Constants.MINECRAFT_MERGED_JAR.get(extension), Constants.MINECRAFT_MAPPED_JAR.get(extension));