/
const.go
82 lines (62 loc) · 1.62 KB
/
const.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
package level
/*
level
Copyright (c) 2019 beito
This software is released under the MIT License.
http://opensource.org/licenses/mit-license.php
*/
// Dimension is a kind of world type
type Dimension int
const (
// OverWorld is a first dimension at new game
OverWorld Dimension = iota
// Nether is a hell world
Nether
// TheEnd is a dimension with floating islands
TheEnd
// Unknown is for unknown dimension
// It' not use generally
Unknown
)
// GameType is a gamemode of players
type GameType int
// Name returns the name of game type
func (typ GameType) Name() string {
switch typ {
case Survival:
return "survival"
case Creative:
return "creative"
case Adventure:
return "adventure"
case Spectator:
return "spectator"
}
return "unknown"
}
const (
Survival GameType = iota
Creative
Adventure
Spectator
)
/*
// HeightMapType returns type of heightmap
type HeightMapType int
const (
// MotionBlocking contains blocks block motion and a fluid
MotionBlocking HeightMapType = iota
// MotionBlockingNoLeaves contains blocks block motion, a fluid and leaves
MotionBlockingNoLeaves
// OceanFloor contains non air and soild block
OceanFloor
// OceanFloorWorldGeneration contains non air and fluid block. For world generation
OceanFloorWorldGeneration
// WorldSurface contains non air block
WorldSurface
// WorldSurfaceWorldGeneration contains non air block. For world generation
WorldSurfaceWorldGeneration
)
// Height returns the height of the highest block at chunk coordinate
// If kind is not supported for a format, returns false for ok
Height(x, y int, kind HeightMapType) (height uint16, ok bool)*/