forked from MJKWoolnough/minecraft
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbiomes.go
More file actions
219 lines (215 loc) · 5.15 KB
/
biomes.go
File metadata and controls
219 lines (215 loc) · 5.15 KB
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
package minecraft
// Biome constants
const (
Ocean Biome = 0
Plains Biome = 1
Desert Biome = 2
ExtremeHills Biome = 3
Forest Biome = 4
Taiga Biome = 5
Swampland Biome = 6
River Biome = 7
Hell Biome = 8
Sky Biome = 9
FrozenOcean Biome = 10
FrozenRiver Biome = 11
IcePlains Biome = 12
IceMountains Biome = 13
MushroomIsland Biome = 14
MushroomIslandShore Biome = 15
Beach Biome = 16
DesertHills Biome = 17
ForestHills Biome = 18
TaigaHills Biome = 19
ExtremeHillsEdge Biome = 20
Jungle Biome = 21
JungleHills Biome = 22
JungleEdge Biome = 23
DeepOcean Biome = 24
StoneBeach Biome = 25
ColdBeach Biome = 26
BirchForest Biome = 27
BirchForestHills Biome = 28
RoofedForest Biome = 29
ColdTaiga Biome = 30
ColdTaigaHills Biome = 31
MegaTaiga Biome = 32
MegaTaigaHills Biome = 33
ExtremeHillsPlus Biome = 34
Savanna Biome = 35
SavannaPlateau Biome = 36
Mesa Biome = 37
MesaPlateauF Biome = 38
MesaPlateau Biome = 39
SunflowerPlains Biome = 129
DeserM Biome = 130
ExtremeHillsM Biome = 131
FlowerForest Biome = 132
TaigaM Biome = 133
SwamplandM Biome = 134
IcePlainsSpikes Biome = 140
JungleM Biome = 149
JungleEdgeM Biome = 151
BirchForestM Biome = 155
BirchForestHillsM Biome = 156
RoofedForestM Biome = 157
ColdTaigaM Biome = 158
MegaSpruceTaiga Biome = 160
MegaSpruceTaigaHills Biome = 161
ExtremeHillsPlusM Biome = 162
SavannaM Biome = 163
SavannaPlateauM Biome = 164
MesaBryce Biome = 165
MesaPlateauFM Biome = 166
MesaPlateauM Biome = 167
AutoBiome Biome = 255
)
// Biome is a convenience type for biomes
type Biome uint8
// Equal is an implementation of the equaler.Equaler interface
func (b Biome) Equal(e interface{}) bool {
if c, ok := e.(*Biome); ok {
return b == *c
} else if c, ok := e.(Biome); ok {
return b == c
}
return false
}
func (b Biome) String() string {
switch b {
case Ocean:
return "Ocean"
case Plains:
return "Plains"
case Desert:
return "Desert"
case ExtremeHills:
return "Extreme Hills"
case Forest:
return "Forest"
case Taiga:
return "Taiga"
case Swampland:
return "Swampland"
case River:
return "River"
case Hell:
return "Hell"
case Sky:
return "Sky"
case FrozenOcean:
return "Frozen Ocean"
case FrozenRiver:
return "Frozen River"
case IcePlains:
return "Ice Plains"
case IceMountains:
return "Ice Mountains"
case MushroomIsland:
return "Mushroom Island"
case MushroomIslandShore:
return "Mushroom Island Shore"
case Beach:
return "Beach"
case DesertHills:
return "Desert Hills"
case ForestHills:
return "Forest Hills"
case TaigaHills:
return "Taiga Hills"
case ExtremeHillsEdge:
return "Extreme Hills Edge"
case Jungle:
return "Jungle"
case JungleHills:
return "Jungle Hills"
case JungleEdge:
return "Jungle Edge"
case DeepOcean:
return "Deep Ocean"
case StoneBeach:
return "Stone Beach"
case ColdBeach:
return "Cold Beach"
case BirchForest:
return "Birch Forest"
case BirchForestHills:
return "Birch Forest Hills"
case RoofedForest:
return "Roofed Forest"
case ColdTaiga:
return "Cold Taiga"
case ColdTaigaHills:
return "Cold Taiga Hills"
case MegaTaiga:
return "Mega Taiga"
case MegaTaigaHills:
return "Mega Taiga Hills"
case ExtremeHillsPlus:
return "Extreme Hills+"
case Savanna:
return "Savanna"
case SavannaPlateau:
return "Savanna Plateau"
case Mesa:
return "Mesa"
case MesaPlateauF:
return "Mesa Plateau F"
case MesaPlateau:
return "Mesa Plateau"
case SunflowerPlains:
return "Sunflower Plains"
case DeserM:
return "Desert M"
case ExtremeHillsM:
return "Extreme Hills M"
case FlowerForest:
return "Flower Forest"
case TaigaM:
return "Taiga M"
case SwamplandM:
return "Swampland M"
case IcePlainsSpikes:
return "Ice Plains Spikes"
case JungleM:
return "Jungle M"
case JungleEdgeM:
return "Jungle Edge M"
case BirchForestM:
return "BirchForestM"
case BirchForestHillsM:
return "BirchForestHillsM"
case RoofedForestM:
return "Roofed Forest M"
case ColdTaigaM:
return "Cold Taiga M"
case MegaSpruceTaiga:
return "Mega Spruce Taiga"
case MegaSpruceTaigaHills:
return "Mega Spruce Taiga Hills"
case ExtremeHillsPlusM:
return "Extreme Hills Plus M"
case SavannaM:
return "Savanna M"
case SavannaPlateauM:
return "Savanna Plateau M"
case MesaBryce:
return "Mesa Bryce"
case MesaPlateauFM:
return "Mesa Plateau F M"
case MesaPlateauM:
return "Mesa Plateau M"
case AutoBiome:
return "Auto"
}
place := 0
for n := b; n > 0; n /= 10 {
place++
}
digits := make([]byte, place)
for n := b; n > 0; n /= 10 {
place--
digits[place] = '0' + byte(n%10)
}
return "Unrecognised Biome ID - " + string(digits)
}