forked from df-mc/dragonfly
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nether_bricks_type.go
68 lines (58 loc) · 1.52 KB
/
nether_bricks_type.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
package block
// NetherBricksType represents a type of nether bricks.
type NetherBricksType struct {
netherBricks
}
type netherBricks uint8
// NormalNetherBricks is the normal variant of the nether bricks.
func NormalNetherBricks() NetherBricksType {
return NetherBricksType{0}
}
// RedNetherBricks is the red variant of the nether bricks.
func RedNetherBricks() NetherBricksType {
return NetherBricksType{1}
}
// CrackedNetherBricks is the cracked variant of the nether bricks.
func CrackedNetherBricks() NetherBricksType {
return NetherBricksType{2}
}
// ChiseledNetherBricks is the chiseled variant of the nether bricks.
func ChiseledNetherBricks() NetherBricksType {
return NetherBricksType{3}
}
// Uint8 returns the nether bricks as a unit8.
func (n netherBricks) Uint8() uint8 {
return uint8(n)
}
// Name ...
func (n netherBricks) Name() string {
switch n {
case 0:
return "Nether Bricks"
case 1:
return "Red Nether Bricks"
case 2:
return "Cracked Nether Bricks"
case 3:
return "Chiseled Nether Bricks"
}
panic("unknown nether brick type")
}
// String ...
func (n netherBricks) String() string {
switch n {
case 0:
return "nether_brick"
case 1:
return "red_nether_brick"
case 2:
return "cracked_nether_bricks"
case 3:
return "chiseled_nether_bricks"
}
panic("unknown nether brick type")
}
// NetherBricksTypes returns all nether bricks types.
func NetherBricksTypes() []NetherBricksType {
return []NetherBricksType{NormalNetherBricks(), RedNetherBricks(), CrackedNetherBricks(), ChiseledNetherBricks()}
}