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