Options
All
  • Public
  • Public/Protected
  • All
Menu

Class EntityWrapper

Velt's EntityWrapper utility, particularly useful with custom mobs

Hierarchy

Index

Constructors

constructor

  • Create a pathfinder from an entity

    requires

    PaperMC

    Parameters

    • entity: any

      The entity to create the pathfinder from

    Returns EntityWrapper

Properties

alive

alive: boolean

If the entity is alive or not

aware

aware: boolean

If the entity is aware of its surroundings.

dead

dead: boolean

If the entity is dead or not

path

path: any

The entity's current path

target

target: any

The entity's current target

Methods

distTo

  • distTo(loc: any): number
  • Get the distance from this entity to the given location

    Parameters

    • loc: any

      The location to get the distance to

    Returns number

effect

  • Effect this entity with the given effect and options.

    Parameters

    • type: string

      The effect type

    • Optional opts: EffectOpts

      The options of the effect, like the duration and amplifier.

    Returns EntityWrapper

equip

  • Equip this entity with the set of given equipment, like armor and the offhand for example.

    Parameters

    • equipment: Equipment

      The equipment to equip this entity with

    Returns EntityWrapper

pathfind

  • Make the entity pathfind to a specific location

    Parameters

    • loc: any

      The location to pathfind to

    Returns EntityWrapper

shoot

  • Shoot a given projectile from this entity with the optional options

    Parameters

    • proj: string

      The projectile type to shoot

    • Optional opts: ShootOpts

      The options to shoot the projectile with

    Returns EntityWrapper

shootAndGet

  • shootAndGet(proj: string, opts?: ShootOpts): any
  • Shoot a given projectile from this entity, and then return the projectile with the optional options

    Parameters

    • proj: string

      The projectile type to shoot

    • Optional opts: ShootOpts

      The options to shoot the projectile with

    Returns any

Generated using TypeDoc