Skip to main content

Entity.PathNavigation

since: 2.0.3b33 (broken in 3.0.0b124, 3.1.0b125)

Object used to build path and move mobs to the required coordinates using specified parameters. All the setters return current Entity.PathNavigation instance to be able to produce chained calls.

Index

Methods

canOpenDoors

  • canOpenDoors(): boolean
  • Returns boolean

    Whether the entity can open doors.

canPassDoors

  • canPassDoors(): boolean
  • Returns boolean

    Whether the entity can pass doors.

getAvoidDamageBlocks

  • getAvoidDamageBlocks(): boolean
  • Returns boolean

getAvoidPortals

  • getAvoidPortals(): boolean
  • Returns boolean

getAvoidSun

  • getAvoidSun(): boolean
  • since: 2.2.1b93

    Returns boolean

getAvoidWater

  • getAvoidWater(): boolean
  • Returns boolean

    Whether the entity avoids water.

getCanBreach

  • getCanBreach(): boolean
  • Returns boolean

getCanFloat

  • getCanFloat(): boolean
  • Returns boolean

getCanJump

  • getCanJump(): boolean
  • Returns boolean

    Whether entity can jump.

getCanOpenIronDoors

  • getCanOpenIronDoors(): boolean
  • since: 2.2.1b93

    Returns boolean

getCanPathOverLava

  • getCanPathOverLava(): boolean
  • since: 2.2.1b93

    Returns boolean

getCanSink

  • getCanSink(): boolean
  • Returns boolean

getCanWalkInLava

  • getCanWalkInLava(): boolean
  • since: 2.2.1b93

    Returns boolean

getHasEndPathRadius

  • getHasEndPathRadius(): boolean
  • since: 2.2.1b93

    Returns boolean

getSpeed

  • getSpeed(): number
  • Returns number

    Entity's speed value.

getTerminationThreshold

  • getTerminationThreshold(): number
  • getTerminationThreshold(threshold: number): PathNavigation
  • since: 2.2.1b93

    Returns number

getTickTimeout

  • getTickTimeout(): number
  • since: 2.2.1b93

    Returns number

isAmphibious

  • isAmphibious(): boolean
  • Returns boolean

isRiverFollowing

  • isRiverFollowing(): boolean
  • Returns boolean

isStuck

  • isStuck(ticks: number): boolean
  • since: 2.2.1b93

    Parameters

    • ticks: number

    Returns boolean

moveToCoords

  • moveToCoords(x: number, y: number, z: number, speed: number): PathNavigation
  • Builds path to the specified coordinates.


    Parameters

    • x: number
    • y: number
    • z: number
    • speed: number

      entity movement speed

    Returns PathNavigation

moveToEntity

  • Builds path to the specified entity. Note that current coordinates of entity are used, and are not updated.


    Parameters

    • entity: number
    • speed: number

      entity movement speed

    Returns PathNavigation

setAvoidDamageBlocks

setAvoidPortals

setAvoidSun

  • Sets entity's sun avoiding.


    Parameters

    • avoid: boolean

    Returns PathNavigation

setAvoidWater

  • Sets entity's water avoiding.


    Parameters

    • avoid: boolean

    Returns PathNavigation

setCanBreach

setCanFloat

setCanJump

  • Enables or disables entity's jumping ability.


    Parameters

    • can: boolean

    Returns PathNavigation

setCanOpenDoors

  • Sets entity's door opening ability.


    Parameters

    • can: boolean

    Returns PathNavigation

setCanOpenIronDoors

setCanPassDoors

  • Sets entity's door passing ability.


    Parameters

    • can: boolean

    Returns PathNavigation

setCanPathOverLava

setCanSink

setCanWalkInLava

setEndPathRadius

setHasEndPathRadius

setIsAmphibious

setIsRiverFollowing

setResultFunction

setSpeed

  • Sets entity's speed value.


    Parameters

    • speed: number

    Returns PathNavigation

setTickTimeout