up3
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
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
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user