Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Column ¶
type Column struct { DataVersion int32 `nbt:"DataVersion"` XPos int32 `nbt:"xPos"` YPos int32 `nbt:"yPos"` ZPos int32 `nbt:"zPos"` Lights [][]int16 `nbt:"Lights,omitempty"` Entities []map[string]interface{} `nbt:"entities,omitempty"` Heightmaps struct { MOTIONBLOCKING []int64 `nbt:"MOTION_BLOCKING"` MOTIONBLOCKINGNOLEAVES []int64 `nbt:"MOTION_BLOCKING_NO_LEAVES"` OCEANFLOOR []int64 `nbt:"OCEAN_FLOOR"` OCEANFLOORWG []int64 `nbt:"OCEAN_FLOOR_WG"` WORLDSURFACE []int64 `nbt:"WORLD_SURFACE"` WORLDSURFACEWG []int64 `nbt:"WORLD_SURFACE_WG"` } `nbt:"Heightmaps"` InhabitedTime int64 `nbt:"InhabitedTime"` LastUpdate int64 `nbt:"LastUpdate"` PostProcessing [][]interface{} `nbt:"PostProcessing"` Status string `nbt:"Status"` BlockEntities []interface{} `nbt:"block_entities"` BlockTicks []interface{} `nbt:"block_ticks"` FluidTicks []interface{} `nbt:"fluid_ticks"` IsLightOn byte `nbt:"isLightOn"` Sections []Section `nbt:"sections"` CarvingMasks struct { Air []int64 `nbt:"AIR"` Liquid []int64 `nbt:"LIQUID"` } `nbt:"CarvingMasks"` StarlightLightVersion int32 `nbt:"starlight.light_version"` Structures struct { References map[string]interface{} `nbt:"References"` Starts map[string]interface{} `nbt:"starts"` } `nbt:"structures"` }
type PaletteEntry ¶
type Region ¶
type Region struct {
// contains filtered or unexported fields
}
Region contain 32*32 chunks in one .mca file
func LoadRegion ¶
func LoadRegion(f io.ReadWriteSeeker) (r *Region, err error)
Load works like Open but read from an io.ReadWriteSeeker.
func OpenRegion ¶
Open a .mca file and read the head. Close the Region after used.
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 exist
func (*Region) ReadSector ¶
ReadSector find and read the Chunk data from region
type Section ¶
type Section struct { Y byte `nbt:"Y"` StarlightBlocklightState int32 `nbt:"starlight.blocklight_state,omitempty"` StarlightSkylightState int32 `nbt:"starlight.skylight_state,omitempty"` Biomes struct { Data []int64 `nbt:"data"` Palette []string `nbt:"palette"` } `nbt:"biomes,omitempty"` BlockStates struct { Data []int64 `nbt:"data"` Palette []PaletteEntry `nbt:"palette"` } `nbt:"block_states,omitempty"` BlockLight []byte `nbt:"BlockLight,omitempty"` SkyLight []byte `nbt:"SkyLight,omitempty"` }
Click to show internal directories.
Click to hide internal directories.