forked from df-mc/dragonfly
-
Notifications
You must be signed in to change notification settings - Fork 0
/
glowstone.go
37 lines (30 loc) · 911 Bytes
/
glowstone.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
package block
import (
"github.com/Adrian8115/dragonfly-Amethyst-Protocol/server/item"
"github.com/Adrian8115/dragonfly-Amethyst-Protocol/server/world/sound"
"math/rand"
)
// Glowstone is commonly found on the ceiling of the nether dimension.
type Glowstone struct {
solid
}
// Instrument ...
func (g Glowstone) Instrument() sound.Instrument {
return sound.Pling()
}
// BreakInfo ...
func (g Glowstone) BreakInfo() BreakInfo {
return newBreakInfo(0.3, alwaysHarvestable, nothingEffective, silkTouchDrop(item.NewStack(item.GlowstoneDust{}, rand.Intn(3)+2), item.NewStack(g, 1)))
}
// EncodeItem ...
func (Glowstone) EncodeItem() (name string, meta int16) {
return "minecraft:glowstone", 0
}
// EncodeBlock ...
func (Glowstone) EncodeBlock() (string, map[string]any) {
return "minecraft:glowstone", nil
}
// LightEmissionLevel returns 15.
func (Glowstone) LightEmissionLevel() uint8 {
return 15
}