github.com/df-mc/dragonfly@v0.9.13/server/block/clay.go (about) 1 package block 2 3 import ( 4 "github.com/df-mc/dragonfly/server/item" 5 "github.com/df-mc/dragonfly/server/world/sound" 6 ) 7 8 // Clay is a block that can be found underwater. 9 type Clay struct { 10 solid 11 } 12 13 // Instrument ... 14 func (c Clay) Instrument() sound.Instrument { 15 return sound.Flute() 16 } 17 18 // BreakInfo ... 19 func (c Clay) BreakInfo() BreakInfo { 20 return newBreakInfo(0.6, alwaysHarvestable, shovelEffective, silkTouchDrop(item.NewStack(item.ClayBall{}, 4), item.NewStack(c, 1))) 21 } 22 23 // SmeltInfo ... 24 func (Clay) SmeltInfo() item.SmeltInfo { 25 return newSmeltInfo(item.NewStack(Terracotta{}, 1), 0.35) 26 } 27 28 // EncodeItem ... 29 func (c Clay) EncodeItem() (name string, meta int16) { 30 return "minecraft:clay", 0 31 } 32 33 // EncodeBlock ... 34 func (c Clay) EncodeBlock() (name string, properties map[string]any) { 35 return "minecraft:clay", nil 36 }