Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-10 05:20:04 +01:00
Allow use of InputStream to load schematics
Conflicts: src/main/java/com/sk89q/worldedit/schematic/MCEditSchematicFormat.java
Dieser Commit ist enthalten in:
Commit
65ee8bfd2a
@ -45,9 +45,7 @@ public class MCEditSchematicFormat extends SchematicFormat {
|
||||
super("MCEdit", "mcedit", "mce");
|
||||
}
|
||||
|
||||
@Override
|
||||
public CuboidClipboard load(File file) throws IOException, DataException {
|
||||
FileInputStream stream = new FileInputStream(file);
|
||||
public CuboidClipboard load(InputStream stream) throws IOException, DataException {
|
||||
NBTInputStream nbtStream = new NBTInputStream(
|
||||
new GZIPInputStream(stream));
|
||||
|
||||
@ -186,6 +184,11 @@ public class MCEditSchematicFormat extends SchematicFormat {
|
||||
return clipboard;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CuboidClipboard load(File file) throws IOException, DataException {
|
||||
return load(new FileInputStream(file));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void save(CuboidClipboard clipboard, File file) throws IOException, DataException {
|
||||
int width = clipboard.getWidth();
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren