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

     1  package item
     2  
     3  import (
     4  	"github.com/df-mc/dragonfly/server/world"
     5  )
     6  
     7  // Beetroot is a food and dye ingredient.
     8  type Beetroot struct {
     9  	defaultFood
    10  }
    11  
    12  // Consume ...
    13  func (b Beetroot) Consume(_ *world.World, c Consumer) Stack {
    14  	c.Saturate(1, 1.2)
    15  	return Stack{}
    16  }
    17  
    18  // CompostChance ...
    19  func (Beetroot) CompostChance() float64 {
    20  	return 0.65
    21  }
    22  
    23  // EncodeItem ...
    24  func (b Beetroot) EncodeItem() (name string, meta int16) {
    25  	return "minecraft:beetroot", 0
    26  }