github.com/df-mc/dragonfly@v0.9.13/server/block/netherrack.go (about)

     1  package block
     2  
     3  import (
     4  	"github.com/df-mc/dragonfly/server/item"
     5  	"github.com/df-mc/dragonfly/server/world"
     6  )
     7  
     8  // Netherrack is a block found in The Nether.
     9  type Netherrack struct {
    10  	solid
    11  	bassDrum
    12  }
    13  
    14  // SoilFor ...
    15  func (n Netherrack) SoilFor(block world.Block) bool {
    16  	flower, ok := block.(Flower)
    17  	return ok && flower.Type == WitherRose()
    18  }
    19  
    20  // BreakInfo ...
    21  func (n Netherrack) BreakInfo() BreakInfo {
    22  	return newBreakInfo(0.4, pickaxeHarvestable, pickaxeEffective, oneOf(n))
    23  }
    24  
    25  // SmeltInfo ...
    26  func (Netherrack) SmeltInfo() item.SmeltInfo {
    27  	return newSmeltInfo(item.NewStack(item.NetherBrick{}, 1), 0.1)
    28  }
    29  
    30  // EncodeItem ...
    31  func (Netherrack) EncodeItem() (name string, meta int16) {
    32  	return "minecraft:netherrack", 0
    33  }
    34  
    35  // EncodeBlock ...
    36  func (Netherrack) EncodeBlock() (string, map[string]any) {
    37  	return "minecraft:netherrack", nil
    38  }