github.com/df-mc/dragonfly@v0.9.13/server/block/gold.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 // Gold is a precious metal block crafted from 9 gold ingots. 9 type Gold struct { 10 solid 11 } 12 13 // Instrument ... 14 func (g Gold) Instrument() sound.Instrument { 15 return sound.Bell() 16 } 17 18 // BreakInfo ... 19 func (g Gold) BreakInfo() BreakInfo { 20 return newBreakInfo(3, func(t item.Tool) bool { 21 return t.ToolType() == item.TypePickaxe && t.HarvestLevel() >= item.ToolTierIron.HarvestLevel 22 }, pickaxeEffective, oneOf(g)).withBlastResistance(30) 23 } 24 25 // PowersBeacon ... 26 func (Gold) PowersBeacon() bool { 27 return true 28 } 29 30 // EncodeItem ... 31 func (Gold) EncodeItem() (name string, meta int16) { 32 return "minecraft:gold_block", 0 33 } 34 35 // EncodeBlock ... 36 func (Gold) EncodeBlock() (string, map[string]any) { 37 return "minecraft:gold_block", nil 38 }