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

     1  package block
     2  
     3  import "github.com/df-mc/dragonfly/server/world"
     4  
     5  // Terracotta is a block formed from clay, with a hardness and blast resistance comparable to stone. For colouring it,
     6  // take a look at StainedTerracotta.
     7  type Terracotta struct {
     8  	solid
     9  	bassDrum
    10  }
    11  
    12  // SoilFor ...
    13  func (Terracotta) SoilFor(block world.Block) bool {
    14  	_, ok := block.(DeadBush)
    15  	return ok
    16  }
    17  
    18  // BreakInfo ...
    19  func (t Terracotta) BreakInfo() BreakInfo {
    20  	return newBreakInfo(1.25, pickaxeHarvestable, pickaxeEffective, oneOf(t)).withBlastResistance(21)
    21  }
    22  
    23  // EncodeItem ...
    24  func (Terracotta) EncodeItem() (name string, meta int16) {
    25  	return "minecraft:hardened_clay", meta
    26  }
    27  
    28  // EncodeBlock ...
    29  func (Terracotta) EncodeBlock() (string, map[string]any) {
    30  	return "minecraft:hardened_clay", nil
    31  }