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
39 lines
846 B
Go
39 lines
846 B
Go
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
|
|
}
|