Esempio n. 1
0
 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;
 }
Esempio n. 2
0
 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();
   }
 }
Esempio n. 3
0
 /**
  * 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);
 }
Esempio n. 4
0
 /**
  * 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);
 }