func supportsVegetation(vegetation, block world.Block) bool {
	soil, ok := block.(Soil)
	return ok && soil.SoilFor(vegetation)
}
supportsVegetation checks if the vegetation can exist on the block.
package block
import (
	"github.com/df-mc/dragonfly/server/block/cube"
	"github.com/df-mc/dragonfly/server/block/instrument"
	"github.com/df-mc/dragonfly/server/entity"
	"github.com/df-mc/dragonfly/server/entity/effect"
	"github.com/df-mc/dragonfly/server/item"
	"github.com/df-mc/dragonfly/server/world"
	"github.com/df-mc/dragonfly/server/world/sound"
	"github.com/google/uuid"
)
type Activatable interface {
	Activate(pos cube.Pos, clickedFace cube.Face, w *world.World, u item.User)
}
type Punchable interface {
	Punch(pos cube.Pos, clickedFace cube.Face, w *world.World, u item.User)
}
type LightEmitter interface {
	LightEmissionLevel() uint8
}
type LightDiffuser interface {
	LightDiffusionLevel() uint8
}
type SignEditor interface {
	UUID() uuid.UUID
}
type Replaceable interface {
	ReplaceableBy(b world.Block) bool
}
type BeaconSource interface {
	PowersBeacon() bool
}
type EntityLander interface {
	EntityLand(pos cube.Pos, w *world.World, e world.Entity)
}
type EntityInsider interface {
	EntityInside(pos cube.Pos, w *world.World, e world.Entity)
}
type Frictional interface {
	Friction() float64
}
type beaconAffected interface {
	AddEffect(e effect.Effect)
	BeaconAffected() bool
}
func calculateFace(user item.User, placePos cube.Pos) cube.Face {
	userPos := user.Position()
	pos := cube.PosFromVec3(userPos)
	if abs(pos[0]-placePos[0]) < 2 && abs(pos[2]-placePos[2]) < 2 {
		y := userPos[1]
		if eyed, ok := user.(entity.Eyed); ok {
			y += eyed.EyeHeight()
		}
		if y-float64(placePos[1]) > 2.0 {
			return cube.FaceUp
		} else if float64(placePos[1])-y > 0.0 {
			return cube.FaceDown
		}
	}
	return user.Facing().Opposite().Face()
}
func abs(x int) int {
	if x > 0 {
		return x
	}
	return -x
}
func replaceableWith(w *world.World, pos cube.Pos, with world.Block) bool {
	if pos.OutOfBounds() {
		return false
	}
	b := w.Block(pos)
	if replaceable, ok := b.(Replaceable); ok {
		return replaceable.ReplaceableBy(with) && b != with
	}
	return false
}
func firstReplaceable(w *world.World, pos cube.Pos, face cube.Face, with world.Block) (cube.Pos, cube.Face, bool) {
	if replaceableWith(w, pos, with) {
		return pos, cube.FaceUp, true
	}
	side := pos.Side(face)
	if replaceableWith(w, side, with) {
		return side, face, true
	}
	return pos, face, false
}
func place(w *world.World, pos cube.Pos, b world.Block, user item.User, ctx *item.UseContext) {
	if placer, ok := user.(Placer); ok {
		placer.PlaceBlock(pos, b, ctx)
		return
	}
	w.PlaceBlock(pos, b)
	w.PlaySound(pos.Vec3(), sound.BlockPlace{Block: b})
}
func placed(ctx *item.UseContext) bool {
	return ctx.CountSub > 0
}
func boolByte(b bool) uint8 {
	if b {
		return 1
	}
	return 0
}
type replaceable struct{}
func (replaceable) ReplaceableBy(world.Block) bool {
	return true
}
type transparent struct{}
func (transparent) LightDiffusionLevel() uint8 {
	return 0
}
type gravityAffected struct{}
func (g gravityAffected) Solidifies(cube.Pos, *world.World) bool {
	return false
}
func (g gravityAffected) fall(b world.Block, pos cube.Pos, w *world.World) {
	_, air := w.Block(pos.Side(cube.FaceDown)).(Air)
	_, liquid := w.Liquid(pos.Side(cube.FaceDown))
	if air || liquid {
		w.BreakBlockWithoutParticles(pos)
		e := entity.NewFallingBlock(b, pos.Vec3Middle())
		w.AddEntity(e)
	}
}
type Flammable interface {
	FlammabilityInfo() FlammabilityInfo
}
type FlammabilityInfo struct {
	Encouragement int
	Flammability int
	LavaFlammable bool
}
func newFlammabilityInfo(encouragement, flammability int, lavaFlammable bool) FlammabilityInfo {
	return FlammabilityInfo{
		Encouragement: encouragement,
		Flammability:  flammability,
		LavaFlammable: lavaFlammable,
	}
}
type FallDistanceEntity interface {
	ResetFallDistance()
	FallDistance() float64
}
type InstrumentBlock interface {
	Instrument() instrument.Instrument
}
type bass struct{}
func (bass) Instrument() instrument.Instrument {
	return instrument.Bass()
}
type snare struct{}
func (snare) Instrument() instrument.Instrument {
	return instrument.Snare()
}
type clicksAndSticks struct{}
func (clicksAndSticks) Instrument() instrument.Instrument {
	return instrument.ClicksAndSticks()
}
type bassDrum struct{}
func (bassDrum) Instrument() instrument.Instrument {
	return instrument.BassDrum()
}
type effectHolder interface {
	AddEffect(effect.Effect)
}