github.com/df-mc/dragonfly@v0.9.13/server/block/model/tilled_grass.go (about)

     1  package model
     2  
     3  import (
     4  	"github.com/df-mc/dragonfly/server/block/cube"
     5  	"github.com/df-mc/dragonfly/server/world"
     6  )
     7  
     8  // TilledGrass is a model used for grass that has been tilled in some way, such as dirt paths and farmland.
     9  type TilledGrass struct{}
    10  
    11  // BBox returns a physics.BBox that spans an entire block.
    12  func (TilledGrass) BBox(cube.Pos, *world.World) []cube.BBox {
    13  	return []cube.BBox{full.ExtendTowards(cube.FaceDown, 0.0625)}
    14  }
    15  
    16  // FaceSolid always returns true.
    17  func (TilledGrass) FaceSolid(cube.Pos, cube.Face, *world.World) bool {
    18  	return true
    19  }