3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-12-27 03:12:37 +01:00

Allow use of InputStream to load schematics

Conflicts:
	src/main/java/com/sk89q/worldedit/schematic/MCEditSchematicFormat.java
Dieser Commit ist enthalten in:
sk89q 2014-05-01 13:57:30 -07:00
Commit 65ee8bfd2a

Datei anzeigen

@ -45,9 +45,7 @@ public class MCEditSchematicFormat extends SchematicFormat {
super("MCEdit", "mcedit", "mce"); super("MCEdit", "mcedit", "mce");
} }
@Override public CuboidClipboard load(InputStream stream) throws IOException, DataException {
public CuboidClipboard load(File file) throws IOException, DataException {
FileInputStream stream = new FileInputStream(file);
NBTInputStream nbtStream = new NBTInputStream( NBTInputStream nbtStream = new NBTInputStream(
new GZIPInputStream(stream)); new GZIPInputStream(stream));
@ -186,6 +184,11 @@ public class MCEditSchematicFormat extends SchematicFormat {
return clipboard; return clipboard;
} }
@Override
public CuboidClipboard load(File file) throws IOException, DataException {
return load(new FileInputStream(file));
}
@Override @Override
public void save(CuboidClipboard clipboard, File file) throws IOException, DataException { public void save(CuboidClipboard clipboard, File file) throws IOException, DataException {
int width = clipboard.getWidth(); int width = clipboard.getWidth();