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.intintThe effective size of the schematic without air.booleancom.sk89q.worldedit.extent.clipboard.io.ClipboardFormatformat()getFile()Schematic fileinthashCode()booleanisSchematic(Pattern pattern) Matches a pattern against the file name.com.sk89q.worldedit.extent.clipboard.ClipboardLoad the schematic from file.name()Get the name of the file without file extensionstatic SchematicCreate a schematic by filestatic SchematicCreate a schematic by pathpath()Get the path to the file.intsize()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:
compareToin interfaceComparable<Schematic>
-
format
public com.sk89q.worldedit.extent.clipboard.io.ClipboardFormat format() -
toString
-