Skip to content

Commit

Permalink
fix litematica extract
Browse files Browse the repository at this point in the history
  • Loading branch information
IAFEnvoy committed Dec 16, 2024
1 parent c383705 commit ffc5899
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
package com.iafenvoy.sow.compat;

import com.iafenvoy.sow.SongsOfWar;
import org.apache.commons.io.FileUtils;

import java.io.*;
import java.nio.file.Path;
import java.util.List;

public class LitematicaHelper {
private static final String EXTRACT_PATH = "./schematics/songs-of-war/";
private static final List<String> FILES = List.of("shrine.litematic");

public static void extractFile() {
if(!new File(EXTRACT_PATH).mkdirs())
SongsOfWar.LOGGER.error("Failed to create folder {}.", EXTRACT_PATH);
for (String file : FILES) {
try {
write2File(LitematicaHelper.class.getResourceAsStream("/litematica/" + file), EXTRACT_PATH + file);
} catch (Exception e) {
SongsOfWar.LOGGER.error("Failed to extract litematica fila {}.", file, e);
SongsOfWar.LOGGER.error("Failed to extract litematica file {}.", file, e);
}
}
}
Expand Down

0 comments on commit ffc5899

Please sign in to comment.