Class Schematic
java.lang.Object
de.eldoria.schematicbrush.schematics.Schematic
- All Implemented Interfaces:
Comparable<Schematic>
A loaded schematic which allows to load a schematic into a clipboard
-
Method Summary
Modifier and TypeMethodDescriptionCalculates and returns a map which contains the block count of every material in this schematic.int
int
The effective size of the schematic without air.boolean
com.sk89q.worldedit.extent.clipboard.io.ClipboardFormat
format()
getFile()
Schematic fileint
hashCode()
boolean
isSchematic
(Pattern pattern) Matches a pattern against the file name.com.sk89q.worldedit.extent.clipboard.Clipboard
Load the schematic from file.name()
Get the name of the file without file extensionstatic Schematic
Create a schematic by filestatic Schematic
Create a schematic by pathpath()
Get the path to the file.int
size()
The total block size of the schematic.toString()
-
Method Details
-
of
Create a schematic by file- Parameters:
file
- file- Returns:
- schematic
- Throws:
InvalidClipboardFormatException
- when the format could not be determined
-
of
Create a schematic by path- Parameters:
path
- path- Returns:
- schematic
- Throws:
InvalidClipboardFormatException
- when the format could not be determined
-
isSchematic
Matches a pattern against the file name.- Parameters:
pattern
- pattern to match- Returns:
- true if the pattern matches the file name with or without extension
-
path
Get the path to the file.- Returns:
- path of file as string
-
name
Get the name of the file without file extension- Returns:
- name of file
-
loadSchematic
Load the schematic from file.- Returns:
- the schematic wrapped in a clipboard object
- Throws:
IOException
- if the file could not be loaded. This should only happen, if the schematic was deleted or moved.
-
equals
-
getFile
Schematic file- Returns:
- file
-
hashCode
public int hashCode() -
effectiveSize
public int effectiveSize()The effective size of the schematic without air.- Returns:
- effective schematic size
-
size
public int size()The total block size of the schematic. Including air blocks.- Returns:
- block count of schematics
-
blockCount
Calculates and returns a map which contains the block count of every material in this schematic.- Returns:
- map with block counts
-
compareTo
- Specified by:
compareTo
in interfaceComparable<Schematic>
-
format
public com.sk89q.worldedit.extent.clipboard.io.ClipboardFormat format() -
toString
-