26ed99fda6
Build and deploy / Build (push) Has been cancelled
Build and deploy / Update Contributors (push) Has been cancelled
Build and deploy / Deploy (push) Has been cancelled
33 lines
720 B
Go
33 lines
720 B
Go
package block
|
|
|
|
import "github.com/df-mc/dragonfly/server/world"
|
|
|
|
// Mud is a decorative block obtained by using a water bottle on a dirt block.
|
|
type Mud struct {
|
|
solid
|
|
}
|
|
|
|
// SoilFor ...
|
|
func (Mud) SoilFor(block world.Block) bool {
|
|
switch block.(type) {
|
|
case ShortGrass, Fern, DoubleTallGrass, Flower, DoubleFlower, NetherSprouts, PinkPetals, DeadBush:
|
|
return true
|
|
}
|
|
return false
|
|
}
|
|
|
|
// BreakInfo ...
|
|
func (m Mud) BreakInfo() BreakInfo {
|
|
return newBreakInfo(0.5, alwaysHarvestable, shovelEffective, oneOf(m))
|
|
}
|
|
|
|
// EncodeItem ...
|
|
func (Mud) EncodeItem() (name string, meta int16) {
|
|
return "minecraft:mud", 0
|
|
}
|
|
|
|
// EncodeBlock ...
|
|
func (Mud) EncodeBlock() (string, map[string]any) {
|
|
return "minecraft:mud", nil
|
|
}
|