Always remap jar when using local mappings.

This commit is contained in:
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

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));