forked from brianvoe/gofakeit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
minecraft.go
367 lines (294 loc) · 12.7 KB
/
minecraft.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
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
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
package gofakeit
import "math/rand"
// MinecraftOre will generate a random Minecraft ore
func MinecraftOre() string { return minecraftOre(globalFaker.Rand) }
// MinecraftOre will generate a random Minecraft ore
func (f *Faker) MinecraftOre() string { return minecraftOre(f.Rand) }
func minecraftOre(r *rand.Rand) string { return getRandValue(r, []string{"minecraft", "ore"}) }
// MinecraftWood will generate a random Minecraft wood
func MinecraftWood() string { return minecraftWood(globalFaker.Rand) }
// MinecraftWood will generate a random Minecraft wood
func (f *Faker) MinecraftWood() string { return minecraftWood(f.Rand) }
func minecraftWood(r *rand.Rand) string { return getRandValue(r, []string{"minecraft", "wood"}) }
// MinecraftArmorTier will generate a random Minecraft armor tier
func MinecraftArmorTier() string { return minecraftArmorTier(globalFaker.Rand) }
// MinecraftArmorTier will generate a random Minecraft armor tier
func (f *Faker) MinecraftArmorTier() string { return minecraftArmorTier(f.Rand) }
func minecraftArmorTier(r *rand.Rand) string {
return getRandValue(r, []string{"minecraft", "armortier"})
}
// MinecraftArmorPart will generate a random Minecraft armor part
func MinecraftArmorPart() string { return minecraftArmorPart(globalFaker.Rand) }
// MinecraftArmorPart will generate a random Minecraft armor part
func (f *Faker) MinecraftArmorPart() string { return minecraftArmorPart(f.Rand) }
func minecraftArmorPart(r *rand.Rand) string {
return getRandValue(r, []string{"minecraft", "armorpart"})
}
// MinecraftWeapon will generate a random Minecraft weapon
func MinecraftWeapon() string { return minecraftWeapon(globalFaker.Rand) }
// MinecraftWeapon will generate a random Minecraft weapon
func (f *Faker) MinecraftWeapon() string { return minecraftWeapon(f.Rand) }
func minecraftWeapon(r *rand.Rand) string { return getRandValue(r, []string{"minecraft", "weapon"}) }
// MinecraftTool will generate a random Minecraft tool
func MinecraftTool() string { return minecraftTool(globalFaker.Rand) }
// MinecraftTool will generate a random Minecraft tool
func (f *Faker) MinecraftTool() string { return minecraftTool(f.Rand) }
func minecraftTool(r *rand.Rand) string { return getRandValue(r, []string{"minecraft", "tool"}) }
// MinecraftDye will generate a random Minecraft dye
func MinecraftDye() string { return minecraftDye(globalFaker.Rand) }
// MinecraftDye will generate a random Minecraft dye
func (f *Faker) MinecraftDye() string { return minecraftDye(f.Rand) }
func minecraftDye(r *rand.Rand) string { return getRandValue(r, []string{"minecraft", "dye"}) }
// MinecraftFood will generate a random Minecraft food
func MinecraftFood() string { return minecraftFood(globalFaker.Rand) }
// MinecraftFood will generate a random Minecraft food
func (f *Faker) MinecraftFood() string { return minecraftFood(f.Rand) }
func minecraftFood(r *rand.Rand) string { return getRandValue(r, []string{"minecraft", "food"}) }
// MinecraftAnimal will generate a random Minecraft animal
func MinecraftAnimal() string { return minecraftAnimal(globalFaker.Rand) }
// MinecraftAnimal will generate a random Minecraft animal
func (f *Faker) MinecraftAnimal() string { return minecraftAnimal(f.Rand) }
func minecraftAnimal(r *rand.Rand) string {
return getRandValue(r, []string{"minecraft", "animal"})
}
// MinecraftVillagerJob will generate a random Minecraft villager job
func MinecraftVillagerJob() string { return minecraftVillagerJob(globalFaker.Rand) }
// MinecraftVillagerJob will generate a random Minecraft villager job
func (f *Faker) MinecraftVillagerJob() string { return minecraftVillagerJob(f.Rand) }
func minecraftVillagerJob(r *rand.Rand) string {
return getRandValue(r, []string{"minecraft", "villagerjob"})
}
// MinecraftVillagerStation will generate a random Minecraft villager station
func MinecraftVillagerStation() string { return minecraftVillagerStation(globalFaker.Rand) }
// MinecraftVillagerStation will generate a random Minecraft villager station
func (f *Faker) MinecraftVillagerStation() string { return minecraftVillagerStation(f.Rand) }
func minecraftVillagerStation(r *rand.Rand) string {
return getRandValue(r, []string{"minecraft", "villagerstation"})
}
// MinecraftVillagerLevel will generate a random Minecraft villager level
func MinecraftVillagerLevel() string { return minecraftVillagerLevel(globalFaker.Rand) }
// MinecraftVillagerLevel will generate a random Minecraft villager level
func (f *Faker) MinecraftVillagerLevel() string { return minecraftVillagerLevel(f.Rand) }
func minecraftVillagerLevel(r *rand.Rand) string {
return getRandValue(r, []string{"minecraft", "villagerlevel"})
}
// MinecraftMobPassive will generate a random Minecraft mob passive
func MinecraftMobPassive() string { return minecraftMobPassive(globalFaker.Rand) }
// MinecraftMobPassive will generate a random Minecraft mob passive
func (f *Faker) MinecraftMobPassive() string { return minecraftMobPassive(f.Rand) }
func minecraftMobPassive(r *rand.Rand) string {
return getRandValue(r, []string{"minecraft", "mobpassive"})
}
// MinecraftMobNeutral will generate a random Minecraft mob neutral
func MinecraftMobNeutral() string { return minecraftMobNeutral(globalFaker.Rand) }
// MinecraftMobNeutral will generate a random Minecraft mob neutral
func (f *Faker) MinecraftMobNeutral() string { return minecraftMobNeutral(f.Rand) }
func minecraftMobNeutral(r *rand.Rand) string {
return getRandValue(r, []string{"minecraft", "mobneutral"})
}
// MinecraftMobHostile will generate a random Minecraft mob hostile
func MinecraftMobHostile() string { return minecraftMobHostile(globalFaker.Rand) }
// MinecraftMobHostile will generate a random Minecraft mob hostile
func (f *Faker) MinecraftMobHostile() string { return minecraftMobHostile(f.Rand) }
func minecraftMobHostile(r *rand.Rand) string {
return getRandValue(r, []string{"minecraft", "mobhostile"})
}
// MinecraftMobBoss will generate a random Minecraft mob boss
func MinecraftMobBoss() string { return minecraftMobBoss(globalFaker.Rand) }
// MinecraftMobBoss will generate a random Minecraft mob boss
func (f *Faker) MinecraftMobBoss() string { return minecraftMobBoss(f.Rand) }
func minecraftMobBoss(r *rand.Rand) string {
return getRandValue(r, []string{"minecraft", "mobboss"})
}
// MinecraftBiome will generate a random Minecraft biome
func MinecraftBiome() string { return minecraftBiome(globalFaker.Rand) }
// MinecraftBiome will generate a random Minecraft biome
func (f *Faker) MinecraftBiome() string { return minecraftBiome(f.Rand) }
func minecraftBiome(r *rand.Rand) string { return getRandValue(r, []string{"minecraft", "biome"}) }
// MinecraftWeather will generate a random Minecraft weather
func MinecraftWeather() string { return minecraftWeather(globalFaker.Rand) }
// MinecraftWeather will generate a random Minecraft weather
func (f *Faker) MinecraftWeather() string { return minecraftWeather(f.Rand) }
func minecraftWeather(r *rand.Rand) string { return getRandValue(r, []string{"minecraft", "weather"}) }
func addMinecraftLookup() {
AddFuncLookup("minecraftore", Info{
Display: "Minecraft ore",
Category: "minecraft",
Description: "Random Minecraft ore",
Example: "coal",
Output: "string",
Generate: func(r *rand.Rand, m *MapParams, info *Info) (interface{}, error) {
return minecraftOre(r), nil
},
})
AddFuncLookup("minecraftwood", Info{
Display: "Minecraft wood",
Category: "minecraft",
Description: "Random Minecraft wood",
Example: "oak",
Output: "string",
Generate: func(r *rand.Rand, m *MapParams, info *Info) (interface{}, error) {
return minecraftWood(r), nil
},
})
AddFuncLookup("minecraftarmortier", Info{
Display: "Minecraft armor tier",
Category: "minecraft",
Description: "Random Minecraft armor tier",
Example: "iron",
Output: "string",
Generate: func(r *rand.Rand, m *MapParams, info *Info) (interface{}, error) {
return minecraftArmorTier(r), nil
},
})
AddFuncLookup("minecraftarmorpart", Info{
Display: "Minecraft armor part",
Category: "minecraft",
Description: "Random Minecraft armor part",
Example: "helmet",
Output: "string",
Generate: func(r *rand.Rand, m *MapParams, info *Info) (interface{}, error) {
return minecraftArmorPart(r), nil
},
})
AddFuncLookup("minecraftweapon", Info{
Display: "Minecraft weapon",
Category: "minecraft",
Description: "Random Minecraft weapon",
Example: "bow",
Output: "string",
Generate: func(r *rand.Rand, m *MapParams, info *Info) (interface{}, error) {
return minecraftWeapon(r), nil
},
})
AddFuncLookup("minecrafttool", Info{
Display: "Minecraft tool",
Category: "minecraft",
Description: "Random Minecraft tool",
Example: "shovel",
Output: "string",
Generate: func(r *rand.Rand, m *MapParams, info *Info) (interface{}, error) {
return minecraftTool(r), nil
},
})
AddFuncLookup("minecraftdye", Info{
Display: "Minecraft dye",
Category: "minecraft",
Description: "Random Minecraft dye",
Example: "white",
Output: "string",
Generate: func(r *rand.Rand, m *MapParams, info *Info) (interface{}, error) {
return minecraftDye(r), nil
},
})
AddFuncLookup("minecraftfood", Info{
Display: "Minecraft food",
Category: "minecraft",
Description: "Random Minecraft food",
Example: "apple",
Output: "string",
Generate: func(r *rand.Rand, m *MapParams, info *Info) (interface{}, error) {
return minecraftFood(r), nil
},
})
AddFuncLookup("minecraftanimal", Info{
Display: "Minecraft animal",
Category: "minecraft",
Description: "Random Minecraft animal",
Example: "chicken",
Output: "string",
Generate: func(r *rand.Rand, m *MapParams, info *Info) (interface{}, error) {
return minecraftAnimal(r), nil
},
})
AddFuncLookup("minecraftvillagerjob", Info{
Display: "Minecraft villager job",
Category: "minecraft",
Description: "Random Minecraft villager job",
Example: "farmer",
Output: "string",
Generate: func(r *rand.Rand, m *MapParams, info *Info) (interface{}, error) {
return minecraftVillagerJob(r), nil
},
})
AddFuncLookup("minecraftvillagerstation", Info{
Display: "Minecraft villager station",
Category: "minecraft",
Description: "Random Minecraft villager station",
Example: "furnace",
Output: "string",
Generate: func(r *rand.Rand, m *MapParams, info *Info) (interface{}, error) {
return minecraftVillagerStation(r), nil
},
})
AddFuncLookup("minecraftvillagerlevel", Info{
Display: "Minecraft villager level",
Category: "minecraft",
Description: "Random Minecraft villager level",
Example: "master",
Output: "string",
Generate: func(r *rand.Rand, m *MapParams, info *Info) (interface{}, error) {
return minecraftVillagerLevel(r), nil
},
})
AddFuncLookup("minecraftmobpassive", Info{
Display: "Minecraft mob passive",
Category: "minecraft",
Description: "Random Minecraft mob passive",
Example: "cow",
Output: "string",
Generate: func(r *rand.Rand, m *MapParams, info *Info) (interface{}, error) {
return minecraftMobPassive(r), nil
},
})
AddFuncLookup("minecraftmobneutral", Info{
Display: "Minecraft mob neutral",
Category: "minecraft",
Description: "Random Minecraft mob neutral",
Example: "bee",
Output: "string",
Generate: func(r *rand.Rand, m *MapParams, info *Info) (interface{}, error) {
return minecraftMobNeutral(r), nil
},
})
AddFuncLookup("minecraftmobhostile", Info{
Display: "Minecraft mob hostile",
Category: "minecraft",
Description: "Random Minecraft mob hostile",
Example: "spider",
Output: "string",
Generate: func(r *rand.Rand, m *MapParams, info *Info) (interface{}, error) {
return minecraftMobHostile(r), nil
},
})
AddFuncLookup("minecraftmobboss", Info{
Display: "Minecraft mob boss",
Category: "minecraft",
Description: "Random Minecraft mob boss",
Example: "ender dragon",
Output: "string",
Generate: func(r *rand.Rand, m *MapParams, info *Info) (interface{}, error) {
return minecraftMobBoss(r), nil
},
})
AddFuncLookup("minecraftbiome", Info{
Display: "Minecraft biome",
Category: "minecraft",
Description: "Random Minecraft biome",
Example: "forest",
Output: "string",
Generate: func(r *rand.Rand, m *MapParams, info *Info) (interface{}, error) {
return minecraftBiome(r), nil
},
})
AddFuncLookup("minecraftweather", Info{
Display: "Minecraft weather",
Category: "minecraft",
Description: "Random Minecraft weather",
Example: "rain",
Output: "string",
Generate: func(r *rand.Rand, m *MapParams, info *Info) (interface{}, error) {
return minecraftWeather(r), nil
},
})
}