Files
mc/server/block/netherrack.go
T

39 lines
846 B
Go
Raw Normal View History

2026-07-09 08:33:57 +08:00
package block
import (
"github.com/df-mc/dragonfly/server/item"
"github.com/df-mc/dragonfly/server/world"
)
// Netherrack is a block found in The Nether.
type Netherrack struct {
solid
bassDrum
}
// SoilFor ...
func (n Netherrack) SoilFor(block world.Block) bool {
flower, ok := block.(Flower)
return ok && flower.Type == WitherRose()
}
// BreakInfo ...
func (n Netherrack) BreakInfo() BreakInfo {
return newBreakInfo(0.4, pickaxeHarvestable, pickaxeEffective, oneOf(n))
}
// SmeltInfo ...
func (Netherrack) SmeltInfo() item.SmeltInfo {
return newSmeltInfo(item.NewStack(item.NetherBrick{}, 1), 0.1)
}
// EncodeItem ...
func (Netherrack) EncodeItem() (name string, meta int16) {
return "minecraft:netherrack", 0
}
// EncodeBlock ...
func (Netherrack) EncodeBlock() (string, map[string]any) {
return "minecraft:netherrack", nil
}