mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-08 03:15:17 -04:00
parent
5703377626
commit
9bcf95287a
@ -132,7 +132,7 @@ public class Datapack {
|
|||||||
try {
|
try {
|
||||||
PackMcMeta pack = JsonUtils.fromNonNullJson(Files.readString(mcmeta), PackMcMeta.class);
|
PackMcMeta pack = JsonUtils.fromNonNullJson(Files.readString(mcmeta), PackMcMeta.class);
|
||||||
Platform.runLater(() -> info.add(new Pack(path, FileUtils.getNameWithoutExtension(path), pack.getPackInfo().getDescription(), this)));
|
Platform.runLater(() -> info.add(new Pack(path, FileUtils.getNameWithoutExtension(path), pack.getPackInfo().getDescription(), this)));
|
||||||
} catch (IOException | JsonParseException e) {
|
} catch (Exception e) {
|
||||||
LOG.warning("Failed to read datapack " + path, e);
|
LOG.warning("Failed to read datapack " + path, e);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -144,7 +144,7 @@ public class Datapack {
|
|||||||
public void loadFromDir() {
|
public void loadFromDir() {
|
||||||
try {
|
try {
|
||||||
loadFromDir(path);
|
loadFromDir(path);
|
||||||
} catch (IOException e) {
|
} catch (Exception e) {
|
||||||
LOG.warning("Failed to read datapacks " + path, e);
|
LOG.warning("Failed to read datapacks " + path, e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user