Documentation
¶
Overview ¶
Package path implements pathfinding.
Index ¶
- func AirLikeBlock(bID world.BlockStatus) bool
- func IsLadder(bID world.BlockStatus) bool
- func IsSlab(bID world.BlockStatus) bool
- func SlabIsBottom(bStateID world.BlockStatus) bool
- func SteppableBlock(bID world.BlockStatus) bool
- type Direction
- type Inputs
- type Movement
- type Nav
- type Point
- type Tile
- type V3
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AirLikeBlock ¶
func AirLikeBlock(bID world.BlockStatus) bool
func IsLadder ¶
func IsLadder(bID world.BlockStatus) bool
func IsSlab ¶
func IsSlab(bID world.BlockStatus) bool
func SlabIsBottom ¶
func SlabIsBottom(bStateID world.BlockStatus) bool
func SteppableBlock ¶
func SteppableBlock(bID world.BlockStatus) bool
Types ¶
type Direction ¶
type Direction uint8
Cardinal directions.
func ChestDirection ¶
func ChestDirection(bStateID world.BlockStatus) Direction
func LadderDirection ¶
func LadderDirection(bStateID world.BlockStatus) Direction
func StairsDirection ¶
func StairsDirection(bStateID world.BlockStatus) Direction
type Movement ¶
type Movement uint8
Movement represents a single type of movement in a path.
const ( Waypoint Movement = iota TraverseNorth TraverseSouth TraverseEast TraverseWest TraverseNorthEast TraverseNorthWest TraverseSouthEast TraverseSouthWest DropNorth DropSouth DropEast DropWest Drop2North Drop2South Drop2East Drop2West AscendNorth AscendSouth AscendEast AscendWest DescendLadder DescendLadderNorth DescendLadderSouth DescendLadderEast DescendLadderWest AscendLadder JumpCrossEast JumpCrossWest JumpCrossNorth JumpCrossSouth )
Valid movement values.
type Tile ¶
type Tile struct { HalfBlock bool Movement Movement Pos V3 BlockStatus world.BlockStatus ExtraCost int }
Tile represents a point in a path. All tiles in a path are adjaceent their preceeding tiles.
func (Tile) IsComplete ¶
func (Tile) PathEstimatedCost ¶
func (Tile) PathNeighborCost ¶
func (Tile) PathNeighbors ¶
func (t Tile) PathNeighbors() []astar.Pather
Click to show internal directories.
Click to hide internal directories.