public abstract class SchematicFormat
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static SchematicFormat |
MCEDIT |
Modifier | Constructor and Description |
---|---|
protected |
SchematicFormat(java.lang.String name,
java.lang.String... lookupNames) |
Modifier and Type | Method and Description |
---|---|
BaseBlock |
getBlockForId(int id,
short data) |
static SchematicFormat |
getFormat(java.io.File file) |
static SchematicFormat |
getFormat(java.lang.String lookupName) |
static java.util.Set<SchematicFormat> |
getFormats() |
java.lang.String[] |
getLookupNames() |
java.lang.String |
getName()
Gets the official/display name for this schematic format
|
abstract boolean |
isOfFormat(java.io.File file) |
abstract CuboidClipboard |
load(java.io.File file)
Loads a schematic from the given file into a CuboidClipboard
|
abstract void |
save(CuboidClipboard clipboard,
java.io.File file)
Saves the data from the specified CuboidClipboard to the given file, overwriting any
existing data in the file
|
public static final SchematicFormat MCEDIT
protected SchematicFormat(java.lang.String name, java.lang.String... lookupNames)
public static java.util.Set<SchematicFormat> getFormats()
public static SchematicFormat getFormat(java.lang.String lookupName)
public static SchematicFormat getFormat(java.io.File file)
public java.lang.String getName()
public java.lang.String[] getLookupNames()
public BaseBlock getBlockForId(int id, short data)
public abstract CuboidClipboard load(java.io.File file) throws java.io.IOException, DataException
file
- The file to load fromjava.io.IOException
- If an error occurs while reading dataDataException
- if data is not in the correct formatpublic abstract void save(CuboidClipboard clipboard, java.io.File file) throws java.io.IOException, DataException
clipboard
- The clipboard to get data fromfile
- The file to save tojava.io.IOException
- If an error occurs while writing dataDataException
- If the clipboard has data which cannot be storedpublic abstract boolean isOfFormat(java.io.File file)