public static BuildingSchematic load(File file) { try { CuboidClipboard clipboard = SchematicFormat.MCEDIT.load(file); return new BuildingSchematic(file.getName(), clipboard, loadRegions(file), file); } catch (IOException e) { e.printStackTrace(); } catch (DataException e) { e.printStackTrace(); } return null; }
public void save(File file) { try { SchematicFormat.MCEDIT.save(clipboard, file); NBTStorage storage = new NBTStorage(file, "Schematic"); storage.load(); saveRegions(storage.getKey("TaggedRegions"), tags); storage.save(); } catch (IOException e) { e.printStackTrace(); } catch (DataException e) { e.printStackTrace(); } }
/** * Load a .schematic file into a clipboard. * * @param path * @return clipboard * @throws DataException * @throws IOException */ @Deprecated public static CuboidClipboard loadSchematic(File path) throws DataException, IOException { return SchematicFormat.MCEDIT.load(path); }
/** * Saves the clipboard data to a .schematic-format file. * * @param path * @throws IOException * @throws DataException */ @Deprecated public void saveSchematic(File path) throws IOException, DataException { SchematicFormat.MCEDIT.save(this, path); }