github.com/df-mc/dragonfly@v0.9.13/server/block/glowstone.go (about) 1 package block 2 3 import ( 4 "github.com/df-mc/dragonfly/server/item" 5 "github.com/df-mc/dragonfly/server/world/sound" 6 "math/rand" 7 ) 8 9 // Glowstone is commonly found on the ceiling of the nether dimension. 10 type Glowstone struct { 11 solid 12 } 13 14 // Instrument ... 15 func (g Glowstone) Instrument() sound.Instrument { 16 return sound.Pling() 17 } 18 19 // BreakInfo ... 20 func (g Glowstone) BreakInfo() BreakInfo { 21 return newBreakInfo(0.3, alwaysHarvestable, nothingEffective, silkTouchDrop(item.NewStack(item.GlowstoneDust{}, rand.Intn(3)+2), item.NewStack(g, 1))) 22 } 23 24 // EncodeItem ... 25 func (Glowstone) EncodeItem() (name string, meta int16) { 26 return "minecraft:glowstone", 0 27 } 28 29 // EncodeBlock ... 30 func (Glowstone) EncodeBlock() (string, map[string]any) { 31 return "minecraft:glowstone", nil 32 } 33 34 // LightEmissionLevel returns 15. 35 func (Glowstone) LightEmissionLevel() uint8 { 36 return 15 37 }