github.com/df-mc/dragonfly@v0.9.13/server/block/podzol.go (about) 1 package block 2 3 import "github.com/df-mc/dragonfly/server/world" 4 5 // Podzol is a dirt-type block that naturally blankets the surface of the giant tree taiga and bamboo jungles, along 6 // with their respective variants. 7 type Podzol struct { 8 solid 9 } 10 11 // SoilFor ... 12 func (p Podzol) SoilFor(block world.Block) bool { 13 switch block.(type) { 14 case TallGrass, DoubleTallGrass, Flower, DoubleFlower, NetherSprouts, DeadBush, SugarCane: 15 return true 16 } 17 return false 18 } 19 20 // Shovel ... 21 func (Podzol) Shovel() (world.Block, bool) { 22 return DirtPath{}, true 23 } 24 25 // BreakInfo ... 26 func (p Podzol) BreakInfo() BreakInfo { 27 return newBreakInfo(0.5, alwaysHarvestable, shovelEffective, silkTouchOneOf(Dirt{}, p)) 28 } 29 30 // EncodeItem ... 31 func (Podzol) EncodeItem() (name string, meta int16) { 32 return "minecraft:podzol", 0 33 } 34 35 // EncodeBlock ... 36 func (Podzol) EncodeBlock() (string, map[string]any) { 37 return "minecraft:podzol", nil 38 }