mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 01:37:37 +00:00
Deprecate sponge schematic reader/writer and tell users why (#1287)
This commit is contained in:
parent
8e214b1232
commit
5d31b7034d
@ -177,7 +177,7 @@ public class FaweDelegateSchematicHandler {
|
|||||||
public void run(OutputStream output) {
|
public void run(OutputStream output) {
|
||||||
if (weTag instanceof CompressedSchematicTag) {
|
if (weTag instanceof CompressedSchematicTag) {
|
||||||
Clipboard clipboard = ((CompressedSchematicTag) weTag).getSource();
|
Clipboard clipboard = ((CompressedSchematicTag) weTag).getSource();
|
||||||
BuiltInClipboardFormat.SPONGE_SCHEMATIC.write(output, clipboard);
|
BuiltInClipboardFormat.FAST.write(output, clipboard);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
try (ParallelGZIPOutputStream gzip = new ParallelGZIPOutputStream(output)) {
|
try (ParallelGZIPOutputStream gzip = new ParallelGZIPOutputStream(output)) {
|
||||||
|
@ -51,7 +51,7 @@ import java.util.zip.GZIPOutputStream;
|
|||||||
public enum BuiltInClipboardFormat implements ClipboardFormat {
|
public enum BuiltInClipboardFormat implements ClipboardFormat {
|
||||||
|
|
||||||
//FAWE start - register fast clipboard io
|
//FAWE start - register fast clipboard io
|
||||||
FAST("fast", "fawe") {
|
FAST("fast", "fawe", "sponge", "schem") {
|
||||||
@Override
|
@Override
|
||||||
public String getPrimaryFileExtension() {
|
public String getPrimaryFileExtension() {
|
||||||
return "schem";
|
return "schem";
|
||||||
@ -119,7 +119,13 @@ public enum BuiltInClipboardFormat implements ClipboardFormat {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
SPONGE_SCHEMATIC("sponge", "schem") {
|
/**
|
||||||
|
* @deprecated Slow, resource intensive, but sometimes safer than using the recommended
|
||||||
|
* {@link BuiltInClipboardFormat#FAST}.
|
||||||
|
* Avoid using with any large schematics/clipboards for reading/writing.
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
|
SPONGE_SCHEMATIC("slow", "safe") {
|
||||||
@Override
|
@Override
|
||||||
public String getPrimaryFileExtension() {
|
public String getPrimaryFileExtension() {
|
||||||
return "schem";
|
return "schem";
|
||||||
|
@ -68,7 +68,12 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Reads schematic files using the Sponge Schematic Specification.
|
* Reads schematic files using the Sponge Schematic Specification.
|
||||||
|
*
|
||||||
|
* @deprecated Slow, resource intensive, but sometimes safer than using the recommended
|
||||||
|
* {@link com.fastasyncworldedit.core.extent.clipboard.io.FastSchematicReader}.
|
||||||
|
* Avoid reading large schematics with this reader.
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public class SpongeSchematicReader extends NBTSchematicReader {
|
public class SpongeSchematicReader extends NBTSchematicReader {
|
||||||
|
|
||||||
private static final Logger LOGGER = LogManagerCompat.getLogger();
|
private static final Logger LOGGER = LogManagerCompat.getLogger();
|
||||||
|
@ -53,7 +53,12 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Writes schematic files using the Sponge schematic format.
|
* Writes schematic files using the Sponge schematic format.
|
||||||
|
*
|
||||||
|
* @deprecated Slow, resource intensive, but sometimes safer than using the recommended
|
||||||
|
* {@link com.fastasyncworldedit.core.extent.clipboard.io.FastSchematicWriter}.
|
||||||
|
* Avoid using large clipboards to create schematics with this writer.
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public class SpongeSchematicWriter implements ClipboardWriter {
|
public class SpongeSchematicWriter implements ClipboardWriter {
|
||||||
|
|
||||||
private static final int CURRENT_VERSION = 2;
|
private static final int CURRENT_VERSION = 2;
|
||||||
|
Loading…
Reference in New Issue
Block a user