Options
All
  • Public
  • Public/Protected
  • All
Menu

The object used to modify player's reach distance (maximum distance from which the player can reach blocks or mobs and interact with them)

since

3.0

Hierarchy

Index

Constructors

  • Constructs new ReachDistanceModifier object and adds it to the global list. Remember that it must only be created on the client side, so you probably will have to use client packets. This object contains two values: modifier and multiplier.

    // Pseudocode of reach distance modifiers application
    // 12 or 6 depending on whether the player is in creative mode or not
    float result = getReachDistance();
    // adding all the modifiers to the result
    for(mod : modifiers) {
    if(mod.enabled) {
    result += mod.modifier;
    }
    }
    // multiplying result by all the multipliers
    for(mod : modifiers) {
    if(mod.enabled) {
    result *= mod.multiplier;
    }
    }
    // done!
    return result;

    By default the modifier is 0, the multiplier is 1

    since

    3.0

    Returns ReachDistanceModifier

Properties

class: Class<Object>

Methods

  • clone(): any
  • equals(param0: any): boolean
  • Parameters

    • param0: any

    Returns boolean

  • finalize(): void
  • getModifier(): number
  • since

    3.0

    Returns number

    modifier value of the following object at the moment

  • getMultiplier(): number
  • since

    3.0

    Returns number

    multiplier value of the following object at the moment

  • hashCode(): number
  • isActive(): boolean
  • since

    3.0

    Returns boolean

    whether the following modifier object is enabled at the moment

  • notify(): void
  • notifyAll(): void
  • toString(): string
  • wait(): void
  • wait(param0: number): void
  • wait(param0: number, param1: number): void
  • Returns void

  • Parameters

    • param0: number

    Returns void

  • Parameters

    • param0: number
    • param1: number

    Returns void

Generated using TypeDoc