Files
mc/server/block/soul_sand.go
T
TarnaWijaya 26ed99fda6
Build and deploy / Build (push) Has been cancelled
Build and deploy / Update Contributors (push) Has been cancelled
Build and deploy / Deploy (push) Has been cancelled
up3
2026-07-09 08:33:57 +08:00

40 lines
885 B
Go

package block
import (
"github.com/df-mc/dragonfly/server/world"
"github.com/df-mc/dragonfly/server/world/sound"
)
// SoulSand is a block found naturally only in the Nether. SoulSand slows movement of mobs & players.
type SoulSand struct {
solid
}
// TODO: Implement bubble columns.
// SoilFor ...
func (s SoulSand) SoilFor(block world.Block) bool {
flower, ok := block.(Flower)
return ok && flower.Type == WitherRose()
}
// Instrument ...
func (s SoulSand) Instrument() sound.Instrument {
return sound.CowBell()
}
// BreakInfo ...
func (s SoulSand) BreakInfo() BreakInfo {
return newBreakInfo(0.5, alwaysHarvestable, shovelEffective, oneOf(s))
}
// EncodeItem ...
func (SoulSand) EncodeItem() (name string, meta int16) {
return "minecraft:soul_sand", 0
}
// EncodeBlock ...
func (SoulSand) EncodeBlock() (string, map[string]any) {
return "minecraft:soul_sand", nil
}