mirror of
https://github.com/architectury/architectury-loom.git
synced 2026-04-02 13:37:45 -05:00
Fix dep refreshing being broken with ForgeUserdevProvider
This commit is contained in:
@@ -31,6 +31,7 @@ import java.nio.file.FileSystem;
|
||||
import java.nio.file.FileSystems;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.StandardCopyOption;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
@@ -60,10 +61,10 @@ public class ForgeUserdevProvider extends DependencyProvider {
|
||||
|
||||
if (!userdevJar.exists() || Files.notExists(configJson) || isRefreshDeps()) {
|
||||
File resolved = dependency.resolveFile().orElseThrow(() -> new RuntimeException("Could not resolve Forge userdev"));
|
||||
Files.copy(resolved.toPath(), userdevJar.toPath());
|
||||
Files.copy(resolved.toPath(), userdevJar.toPath(), StandardCopyOption.REPLACE_EXISTING);
|
||||
|
||||
try (FileSystem fs = FileSystems.newFileSystem(new URI("jar:" + resolved.toURI()), ImmutableMap.of("create", false))) {
|
||||
Files.copy(fs.getPath("config.json"), configJson);
|
||||
Files.copy(fs.getPath("config.json"), configJson, StandardCopyOption.REPLACE_EXISTING);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user