github.com/df-mc/dragonfly@v0.9.13/server/block/soul_sand.go (about) 1 package block 2 3 import ( 4 "github.com/df-mc/dragonfly/server/world" 5 "github.com/df-mc/dragonfly/server/world/sound" 6 ) 7 8 // SoulSand is a block found naturally only in the Nether. SoulSand slows movement of mobs & players. 9 type SoulSand struct { 10 solid 11 } 12 13 // TODO: Implement bubble columns. 14 15 // SoilFor ... 16 func (s SoulSand) SoilFor(block world.Block) bool { 17 flower, ok := block.(Flower) 18 return ok && flower.Type == WitherRose() 19 } 20 21 // Instrument ... 22 func (s SoulSand) Instrument() sound.Instrument { 23 return sound.CowBell() 24 } 25 26 // BreakInfo ... 27 func (s SoulSand) BreakInfo() BreakInfo { 28 return newBreakInfo(0.5, alwaysHarvestable, shovelEffective, oneOf(s)) 29 } 30 31 // EncodeItem ... 32 func (SoulSand) EncodeItem() (name string, meta int16) { 33 return "minecraft:soul_sand", 0 34 } 35 36 // EncodeBlock ... 37 func (SoulSand) EncodeBlock() (string, map[string]any) { 38 return "minecraft:soul_sand", nil 39 }