mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 09:47:38 +00:00
parent
bd95d5a86d
commit
dbbb450172
@ -72,6 +72,7 @@ public class FastSchematicWriter implements ClipboardWriter {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void write(Clipboard clipboard) throws IOException {
|
public void write(Clipboard clipboard) throws IOException {
|
||||||
|
clipboard.flush();
|
||||||
// For now always write the latest version. Maybe provide support for earlier if more appear.
|
// For now always write the latest version. Maybe provide support for earlier if more appear.
|
||||||
write2(clipboard);
|
write2(clipboard);
|
||||||
}
|
}
|
||||||
|
@ -153,6 +153,7 @@ public class MinecraftStructure implements ClipboardReader, ClipboardWriter {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void write(Clipboard clipboard) throws IOException {
|
public void write(Clipboard clipboard) throws IOException {
|
||||||
|
clipboard.flush();
|
||||||
write(clipboard, "FAWE");
|
write(clipboard, "FAWE");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,6 +31,7 @@ public class PNGWriter implements ClipboardWriter {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void write(Clipboard clipboard) throws IOException {
|
public void write(Clipboard clipboard) throws IOException {
|
||||||
|
clipboard.flush();
|
||||||
Region region = clipboard.getRegion();
|
Region region = clipboard.getRegion();
|
||||||
int width = region.getWidth();
|
int width = region.getWidth();
|
||||||
int height = region.getHeight();
|
int height = region.getHeight();
|
||||||
|
@ -78,6 +78,10 @@ public class SpongeSchematicWriter implements ClipboardWriter {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void write(Clipboard clipboard) throws IOException {
|
public void write(Clipboard clipboard) throws IOException {
|
||||||
|
//FAWE start - ensure clipboard is flushed in case of using clipboard-on-disk. Maintains allowing of the same code
|
||||||
|
// between upstream and FAWE
|
||||||
|
clipboard.flush();
|
||||||
|
//FAWE end
|
||||||
// For now always write the latest version. Maybe provide support for earlier if more appear.
|
// For now always write the latest version. Maybe provide support for earlier if more appear.
|
||||||
outputStream.writeNamedTag("Schematic", new CompoundTag(write2(clipboard)));
|
outputStream.writeNamedTag("Schematic", new CompoundTag(write2(clipboard)));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user