github.com/df-mc/dragonfly@v0.9.13/server/item/baked_potato.go (about) 1 package item 2 3 import "github.com/df-mc/dragonfly/server/world" 4 5 // BakedPotato is a food item that can be eaten by the player. 6 type BakedPotato struct { 7 defaultFood 8 } 9 10 // Consume ... 11 func (BakedPotato) Consume(_ *world.World, c Consumer) Stack { 12 c.Saturate(5, 6) 13 return Stack{} 14 } 15 16 // CompostChance ... 17 func (BakedPotato) CompostChance() float64 { 18 return 0.85 19 } 20 21 // EncodeItem ... 22 func (BakedPotato) EncodeItem() (name string, meta int16) { 23 return "minecraft:baked_potato", 0 24 }