Schnittstelle IInteraction

Alle bekannten Implementierungsklassen:
Interaction

public interface IInteraction
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    void
    Makes the attached LocalPlayer attack (or break a block) for exactly one tick
    void
    attack(int ticks)
    Makes the attached LocalPlayer attack (or break a block) for a specified number of ticks This does NOT make the Player able to break blocks, as it just starts the attacking/breaking action.
    void
    Attack (or break a block) until the BooleanSupplier does not return true anymore.
    void
    holdAttack(int ticks)
    Makes the attached LocalPlayer hold attack (or break a block) for a specified number of ticks
    void
    Hold attack (or break a block) until the BooleanSupplier does not return true anymore.
    void
    holdInteract(int ticks)
    Makes the attached LocalPlayer hold interact (or use an item) for a specified number of ticks
    void
    Hold interact (or use an item) until the BooleanSupplier does not return true anymore.
    void
    Makes the attached LocalPlayer interact (or use an item) for exactly one tick
    void
    interact(int ticks)
    Makes the attached LocalPlayer interact (or use an item) for a specified number of ticks This does NOT make the Player able to e.g. consume food, as it just starts the interact/use action.
    void
    Interact (or use an item) until the BooleanSupplier does not return true anymore.
    void
    setAttacking(boolean attacking)
    Makes the attached LocalPlayer always be subject to the passed attacking flag This does NOT make the Player able to break blocks, as it just starts the attacking/breaking action.
    void
    setHoldingAttack(boolean attacking)
    Makes the attached LocalPlayer always be subject to the passed holding attack flag
    void
    setHoldingInteract(boolean interacting)
    Makes the attached LocalPlayer always be subject to the passed holding interact flag
    void
    setInteracting(boolean interacting)
    Makes the attached LocalPlayer always be subject to the passed interaction flag This does NOT make the Player able to e.g. consume food, as it just starts the interact/use action.
  • Methodendetails

    • interact

      void interact()
      Makes the attached LocalPlayer interact (or use an item) for exactly one tick
    • interact

      void interact(int ticks)
      Makes the attached LocalPlayer interact (or use an item) for a specified number of ticks This does NOT make the Player able to e.g. consume food, as it just starts the interact/use action. For holding this action, use holdInteract()
      Parameter:
      ticks - The amount of ticks to interact for (20 ticks = 1 second). -1 for indefinite interacting.
    • interact

      void interact(BooleanSupplier active)
      Interact (or use an item) until the BooleanSupplier does not return true anymore. The Method cannot be reactivated once the Supplier deactivates. For that you'd have to re-submit the task. This does NOT make the Player able to e.g. consume food, as it just starts the interact/use action. For holding this action, use holdInteract()
      Parameter:
      active - The BooleanSupplier that determines when this interacting action should end.
    • setInteracting

      void setInteracting(boolean interacting)
      Makes the attached LocalPlayer always be subject to the passed interaction flag This does NOT make the Player able to e.g. consume food, as it just starts the interact/use action. For holding this action, use holdInteract()
      Parameter:
      interacting - Whether the LocalPlayer should be interacting or not
    • holdInteract

      void holdInteract(int ticks)
      Makes the attached LocalPlayer hold interact (or use an item) for a specified number of ticks
      Parameter:
      ticks - The amount of ticks to interact for (20 ticks = 1 second). -1 for indefinite interacting.
    • holdInteract

      void holdInteract(BooleanSupplier active)
      Hold interact (or use an item) until the BooleanSupplier does not return true anymore. The Method cannot be reactivated once the Supplier deactivates. For that you'd have to re-submit the task.
      Parameter:
      active - The BooleanSupplier that determines when this interacting action should end.
    • setHoldingInteract

      void setHoldingInteract(boolean interacting)
      Makes the attached LocalPlayer always be subject to the passed holding interact flag
      Parameter:
      interacting - Whether the LocalPlayer should be interacting or not
    • attack

      void attack()
      Makes the attached LocalPlayer attack (or break a block) for exactly one tick
    • attack

      void attack(int ticks)
      Makes the attached LocalPlayer attack (or break a block) for a specified number of ticks This does NOT make the Player able to break blocks, as it just starts the attacking/breaking action. For holding this action, use holdAttack()
      Parameter:
      ticks - The amount of ticks to interact for (20 ticks = 1 second). -1 for indefinite attacking.
    • attack

      void attack(BooleanSupplier active)
      Attack (or break a block) until the BooleanSupplier does not return true anymore. The Method cannot be reactivated once the Supplier deactivates. For that you'd have to re-submit the task. This does NOT make the Player able to break blocks, as it just starts the attacking/breaking action. For holding this action, use holdAttack()
      Parameter:
      active - The BooleanSupplier that determines when this attacking action should end.
    • setAttacking

      void setAttacking(boolean attacking)
      Makes the attached LocalPlayer always be subject to the passed attacking flag This does NOT make the Player able to break blocks, as it just starts the attacking/breaking action. For holding this action, use holdAttack()
      Parameter:
      attacking - Whether the LocalPlayer should be attacking or not
    • holdAttack

      void holdAttack(int ticks)
      Makes the attached LocalPlayer hold attack (or break a block) for a specified number of ticks
      Parameter:
      ticks - The amount of ticks to interact for (20 ticks = 1 second). -1 for indefinite attacking.
    • holdAttack

      void holdAttack(BooleanSupplier active)
      Hold attack (or break a block) until the BooleanSupplier does not return true anymore. The Method cannot be reactivated once the Supplier deactivates. For that you'd have to re-submit the task.
      Parameter:
      active - The BooleanSupplier that determines when this attacking action should end.
    • setHoldingAttack

      void setHoldingAttack(boolean attacking)
      Makes the attached LocalPlayer always be subject to the passed holding attack flag
      Parameter:
      attacking - Whether the LocalPlayer should be attacking or not