summaryrefslogtreecommitdiff
path: root/mcmap
diff options
context:
space:
mode:
authorKevin Chabowski <kevin@kch42.de>2013-08-12 14:50:54 +0200
committerKevin Chabowski <kevin@kch42.de>2013-08-12 14:50:54 +0200
commit40b8da6d026d43328242b252aea3a09f8939e756 (patch)
tree489c429211ce9f0b6e1c638954f3a938f6a3bd57 /mcmap
parent59d3426e7619b9f30aa4fbf6f0862530e39f7ee6 (diff)
downloadgomcmap-40b8da6d026d43328242b252aea3a09f8939e756.tar.gz
gomcmap-40b8da6d026d43328242b252aea3a09f8939e756.tar.bz2
gomcmap-40b8da6d026d43328242b252aea3a09f8939e756.zip
Added some documentation.
Diffstat (limited to 'mcmap')
-rw-r--r--mcmap/block.go2
-rw-r--r--mcmap/examples/emeraldfinder/main.go1
-rw-r--r--mcmap/examples/mapper/main.go1
-rw-r--r--mcmap/examples/replace/main.go1
-rw-r--r--mcmap/region.go1
5 files changed, 5 insertions, 1 deletions
diff --git a/mcmap/block.go b/mcmap/block.go
index 91dc374..449e25f 100644
--- a/mcmap/block.go
+++ b/mcmap/block.go
@@ -10,7 +10,7 @@ type Block struct {
ID BlockID
Data byte // Actually only a half-byte.
BlockLight, SkyLight byte // Also, only half-bytes.
- TileEntity nbt.TagCompound // The x, y and z values in here can be ignored, will automatically be fixed on saving.
+ TileEntity nbt.TagCompound // The x, y and z values in here can be ignored, will automatically be fixed on saving. Will be nil, if no TileEntity is available.
Tick *TileTick // If nil, no TileTick info is available for this block
}
diff --git a/mcmap/examples/emeraldfinder/main.go b/mcmap/examples/emeraldfinder/main.go
index 56a1a26..8cd1260 100644
--- a/mcmap/examples/emeraldfinder/main.go
+++ b/mcmap/examples/emeraldfinder/main.go
@@ -1,3 +1,4 @@
+// emeraldfinder is a gomcmap demo program to find emerald ores in a Minecraft map.
package main
import (
diff --git a/mcmap/examples/mapper/main.go b/mcmap/examples/mapper/main.go
index 11cc97d..e998ce1 100644
--- a/mcmap/examples/mapper/main.go
+++ b/mcmap/examples/mapper/main.go
@@ -1,3 +1,4 @@
+// mapper is a very simple map renderer.
package main
import (
diff --git a/mcmap/examples/replace/main.go b/mcmap/examples/replace/main.go
index f7bad96..127f446 100644
--- a/mcmap/examples/replace/main.go
+++ b/mcmap/examples/replace/main.go
@@ -1,3 +1,4 @@
+// replace replaces all iron blocks with diamond blocks.
package main
import (
diff --git a/mcmap/region.go b/mcmap/region.go
index 25c6d19..67966aa 100644
--- a/mcmap/region.go
+++ b/mcmap/region.go
@@ -176,6 +176,7 @@ func (reg *Region) cleanSuperchunks(forceSave bool) error {
return nil
}
+// Chunk returns the chunk at x, z. If no chunk could be found, the error NotAvailable will be returned. Other errors indicate an internal error (I/O error, file format violated, ...)
func (reg *Region) Chunk(x, z int) (*Chunk, error) {
scx, scz, cx, cz := chunkToSuperchunk(x, z)
scPos := XZPos{scx, scz}