mirror of
https://github.com/CosmicStar98/bedrocktool.git
synced 2024-06-18 04:49:45 +00:00
fix trying to read blocks above world
This commit is contained in:
parent
12f6a11683
commit
01b5946218
|
@ -18,11 +18,6 @@ import (
|
|||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
var (
|
||||
SrcIp_client = net.IPv4(127, 0, 0, 1)
|
||||
SrcIp_server = net.IPv4(243, 0, 0, 2)
|
||||
)
|
||||
|
||||
func init() {
|
||||
utils.RegisterCommand(&CaptureCMD{})
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ func chunkGetColorAt(c *chunk.Chunk, x uint8, y int16, z uint8) color.RGBA {
|
|||
p := cube.Pos{int(x), int(y), int(z)}
|
||||
have_up := false
|
||||
p.Side(cube.FaceUp).Neighbours(func(neighbour cube.Pos) {
|
||||
if neighbour.X() < 0 || neighbour.X() >= 16 || neighbour.Z() < 0 || neighbour.Z() >= 16 {
|
||||
if neighbour.X() < 0 || neighbour.X() >= 16 || neighbour.Z() < 0 || neighbour.Z() >= 16 || neighbour.Y() > c.Range().Max() {
|
||||
return
|
||||
}
|
||||
if !have_up {
|
||||
|
|
Loading…
Reference in New Issue
Block a user