Klasse Movement

java.lang.Object
net.actor.impl.Movement
Alle implementierten Schnittstellen:
IMovement, IDeserializable

@Internal public class Movement extends Object implements IMovement, IDeserializable
  • Konstruktorübersicht

    Konstruktoren
    Konstruktor
    Beschreibung
     
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    void
     
    void
    Lets the attached LocalPlayer jump for a single tick.
    void
    jump(int ticks)
    Lets the attached LocalPlayer jump for the amount of ticks specified.
    void
    Lets the attached LocalPlayer jump until the BooleanSupplier doesn't return true anymore.
    void
    setJumping(boolean jumping)
    Sets the attached LocalPlayers movement to always be subject to the passed jumping flag until the flag is overwritten elsewhere.
    void
    setSneaking(boolean sneaking)
    Sets the attached LocalPlayers movement to always be subject to the passed sneaking flag until the flag is overwritten elsewhere.
    void
    setSprinting(boolean sprinting)
    Sets the attached LocalPlayers movement to always be subject to the passed sprinting flag until the flag is overwritten elsewhere.
    void
    Lets the attached LocalPlayer sneak for a single tick.
    void
    sneak(int ticks)
    Lets the attached LocalPlayer sneak for the amount of ticks specified.
    void
    Lets the attached LocalPlayer sneak until the BooleanSupplier doesn't return true anymore.
    void
    Lets the attached LocalPlayer sprint for a single tick.
    void
    sprint(int ticks)
    Lets the attached LocalPlayer sprint for the amount of ticks specified.
    void
    Lets the attached LocalPlayer sprint until the BooleanSupplier doesn't return true anymore.
    void
    Lets the attached LocalPlayer walk in the given direction(s) for exactly one tick.
    void
    walk(EnumSet<MoveDirection> dirs, int ticks)
    Lets the attached LocalPlayer walk in the given direction(s) for the amount of ticks specified.
    void
    Lets the attached LocalPlayer walk in the given direction(s) until the BooleanSupplier doesn't return true anymore.

    Von Klasse geerbte Methoden java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Konstruktordetails

    • Movement

      public Movement(IActor actor)
  • Methodendetails

    • walk

      public void walk(EnumSet<MoveDirection> dirs)
      Beschreibung aus Schnittstelle kopiert: IMovement
      Lets the attached LocalPlayer walk in the given direction(s) for exactly one tick.
      Angegeben von:
      walk in Schnittstelle IMovement
      Parameter:
      dirs - The (combination) of directions to walk in. Opposing directions cancel each other but are still placed on the LocalPlayer.
    • walk

      public void walk(EnumSet<MoveDirection> dirs, int ticks)
      Beschreibung aus Schnittstelle kopiert: IMovement
      Lets the attached LocalPlayer walk in the given direction(s) for the amount of ticks specified.
      Angegeben von:
      walk in Schnittstelle IMovement
      Parameter:
      dirs - The (combination) of directions to walk in. Opposing directions cancel each other but are still placed on the LocalPlayer.
      ticks - The amount of ticks to walk for (20 ticks = 1 second). -1 for indefinite walking.
    • walk

      public void walk(EnumSet<MoveDirection> dirs, BooleanSupplier active)
      Beschreibung aus Schnittstelle kopiert: IMovement
      Lets the attached LocalPlayer walk in the given direction(s) until the BooleanSupplier doesn't return true anymore. The Method cannot be reactivated once the Supplier deactivates. For that you'd have to re-submit the task.
      Angegeben von:
      walk in Schnittstelle IMovement
      Parameter:
      dirs - The (combination) of directions to walk in. Opposing directions cancel each other but are still placed on the LocalPlayer.
      active - The BooleanSupplier that determines when this walking action should end.
    • setSprinting

      public void setSprinting(boolean sprinting)
      Beschreibung aus Schnittstelle kopiert: IMovement
      Sets the attached LocalPlayers movement to always be subject to the passed sprinting flag until the flag is overwritten elsewhere.
      Angegeben von:
      setSprinting in Schnittstelle IMovement
      Parameter:
      sprinting - Whether the LocalPlayer should be sprinting or not
    • sprint

      public void sprint()
      Beschreibung aus Schnittstelle kopiert: IMovement
      Lets the attached LocalPlayer sprint for a single tick.
      Angegeben von:
      sprint in Schnittstelle IMovement
    • sprint

      public void sprint(int ticks)
      Beschreibung aus Schnittstelle kopiert: IMovement
      Lets the attached LocalPlayer sprint for the amount of ticks specified.
      Angegeben von:
      sprint in Schnittstelle IMovement
      Parameter:
      ticks - The amount of ticks to sprint for (20 ticks = 1 second). -1 for indefinite sprinting.
    • sprint

      public void sprint(BooleanSupplier active)
      Beschreibung aus Schnittstelle kopiert: IMovement
      Lets the attached LocalPlayer sprint until the BooleanSupplier doesn't return true anymore. The method cannot be reactivated once the Supplier deactivates. For that you'd have to re-submit the task.
      Angegeben von:
      sprint in Schnittstelle IMovement
      Parameter:
      active - The BooleanSupplier that determines when this sprinting action should end.
    • setSneaking

      public void setSneaking(boolean sneaking)
      Beschreibung aus Schnittstelle kopiert: IMovement
      Sets the attached LocalPlayers movement to always be subject to the passed sneaking flag until the flag is overwritten elsewhere.
      Angegeben von:
      setSneaking in Schnittstelle IMovement
      Parameter:
      sneaking - Whether the LocalPlayer should be sneaking or not
    • sneak

      public void sneak()
      Beschreibung aus Schnittstelle kopiert: IMovement
      Lets the attached LocalPlayer sneak for a single tick.
      Angegeben von:
      sneak in Schnittstelle IMovement
    • sneak

      public void sneak(int ticks)
      Beschreibung aus Schnittstelle kopiert: IMovement
      Lets the attached LocalPlayer sneak for the amount of ticks specified.
      Angegeben von:
      sneak in Schnittstelle IMovement
      Parameter:
      ticks - The amount of ticks to sneak for (20 ticks = 1 second). -1 for indefinite sneaking.
    • sneak

      public void sneak(BooleanSupplier active)
      Beschreibung aus Schnittstelle kopiert: IMovement
      Lets the attached LocalPlayer sneak until the BooleanSupplier doesn't return true anymore. The method cannot be reactivated once the Supplier deactivates. For that you'd have to re-submit the task.
      Angegeben von:
      sneak in Schnittstelle IMovement
      Parameter:
      active - The BooleanSupplier that determines when this sneaking action should end.
    • setJumping

      public void setJumping(boolean jumping)
      Beschreibung aus Schnittstelle kopiert: IMovement
      Sets the attached LocalPlayers movement to always be subject to the passed jumping flag until the flag is overwritten elsewhere.
      Angegeben von:
      setJumping in Schnittstelle IMovement
      Parameter:
      jumping - Weather the LocalPlayer should be jumping or not
    • jump

      public void jump()
      Beschreibung aus Schnittstelle kopiert: IMovement
      Lets the attached LocalPlayer jump for a single tick.
      Angegeben von:
      jump in Schnittstelle IMovement
    • jump

      public void jump(int ticks)
      Beschreibung aus Schnittstelle kopiert: IMovement
      Lets the attached LocalPlayer jump for the amount of ticks specified.
      Angegeben von:
      jump in Schnittstelle IMovement
      Parameter:
      ticks - The amount of ticks to walk for (20 ticks = 1 second). -1 for indefinite jumping.
    • jump

      public void jump(BooleanSupplier active)
      Beschreibung aus Schnittstelle kopiert: IMovement
      Lets the attached LocalPlayer jump until the BooleanSupplier doesn't return true anymore. The Method cannot be reactivated once the Supplier deactivates. For that you'd have to re-submit the task.
      Angegeben von:
      jump in Schnittstelle IMovement
      Parameter:
      active - The BooleanSupplier that determines when this jumping action should end.
    • deinit

      public void deinit()
      Angegeben von:
      deinit in Schnittstelle IDeserializable