Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
Types ¶
type Region ¶
type Region struct { Timestamps [32][32]int32 // contains filtered or unexported fields }
Region contain 32*32 chunks in one .mca file Not MT-Safe!
func CreateWriter ¶
func CreateWriter(f io.ReadWriteSeeker) (r *Region, err error)
CreateWriter create Region by an io.ReadWriteSeeker
func Load ¶
func Load(f io.ReadWriteSeeker) (r *Region, err error)
Load works like Open but read from an io.ReadWriteSeeker.
func (*Region) Close ¶
Close the region file if possible. The responsibility for Close the file with who Open it. If you made the Region with Load(), this method close the file only if your io.ReadWriteSeeker implement io.Close
func (*Region) ExistSector ¶
ExistSector return if a sector is existed
func (*Region) PadToFullSector ¶
PadToFullSector writes zeros to the end of the file to make size a multiple of 4096. Legacy versions of Minecraft require this. Need to be called right before Close.
func (*Region) ReadSector ¶
ReadSector find and read the Chunk data from region
Click to show internal directories.
Click to hide internal directories.