github.com/df-mc/dragonfly@v0.9.13/server/block/model/solid.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  // Solid is the model of a fully solid block. Blocks with this model, such as stone or wooden planks, have a
     9  // 1x1x1 collision box.
    10  type Solid struct{}
    11  
    12  // full is a BBox that occupies a full block.
    13  var full = cube.Box(0, 0, 0, 1, 1, 1)
    14  
    15  // BBox returns a physics.BBox spanning a full block.
    16  func (Solid) BBox(cube.Pos, *world.World) []cube.BBox {
    17  	return []cube.BBox{full}
    18  }
    19  
    20  // FaceSolid always returns true.
    21  func (Solid) FaceSolid(cube.Pos, cube.Face, *world.World) bool {
    22  	return true
    23  }