Documentation ¶
Overview ¶
Package schematic implements the parsing of Schematic files for Dragonfly. Due to the format of schematics, only blocks with an ID smaller than 256 are supported. This means that new blocks are not supported. Due to new blocks not being supported, this package does not provide methods to save blocks to a schematic.
The Schematic struct provided by the schematic package implements Dragonfly's world.Structure interface, allowing for a high throughput for schematic pasting and easy usage. See World.BuildStructure for pasting a schematic.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Schematic ¶
type Schematic struct {
// contains filtered or unexported fields
}
Schematic represents a parsed schematic with blocks in it. It may be used to read blocks from.
func FromReader ¶
FromReader attempts to read a Schematic from an io.Reader passed. If successful, the schematic with all its data is returned.
func (Schematic) At ¶
At returns the block found at a given position in the schematic. If any of the X, Y or Z coordinates passed are out of the bounds of the schematic, At will panic.
func (Schematic) Dimensions ¶
func (s Schematic) Dimensions() [3]int
Dimensions returns the dimensions of the schematic as width, height and length respectively.