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
20 lines
582 B
Go
20 lines
582 B
Go
package model
|
|
|
|
import (
|
|
"github.com/df-mc/dragonfly/server/block/cube"
|
|
"github.com/df-mc/dragonfly/server/world"
|
|
)
|
|
|
|
// Cactus is the model for a Cactus. It is just barely not a full block, having a slightly reduced width and depth.
|
|
type Cactus struct{}
|
|
|
|
// BBox returns a physics.BBox that is slightly smaller than a full block.
|
|
func (Cactus) BBox(cube.Pos, world.BlockSource) []cube.BBox {
|
|
return []cube.BBox{cube.Box(0.025, 0, 0.025, 0.975, 1, 0.975)}
|
|
}
|
|
|
|
// FaceSolid always returns false.
|
|
func (Cactus) FaceSolid(cube.Pos, cube.Face, world.BlockSource) bool {
|
|
return false
|
|
}
|