Klasse Interaction

java.lang.Object
net.actor.impl.Interaction
Alle implementierten Schnittstellen:
IInteraction, IDeserializable

@Internal public class Interaction extends Object implements IInteraction, IDeserializable
  • Konstruktorübersicht

    Konstruktoren
    Konstruktor
    Beschreibung
     
  • 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
     
    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.

    Von Klasse geerbte Methoden java.lang.Object

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

    • Interaction

      public Interaction(IActor actor)
  • Methodendetails

    • interact

      public void interact()
      Beschreibung aus Schnittstelle kopiert: IInteraction
      Makes the attached LocalPlayer interact (or use an item) for exactly one tick
      Angegeben von:
      interact in Schnittstelle IInteraction
    • interact

      public void interact(int ticks)
      Beschreibung aus Schnittstelle kopiert: IInteraction
      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()
      Angegeben von:
      interact in Schnittstelle IInteraction
      Parameter:
      ticks - The amount of ticks to interact for (20 ticks = 1 second). -1 for indefinite interacting.
    • interact

      public void interact(BooleanSupplier active)
      Beschreibung aus Schnittstelle kopiert: IInteraction
      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()
      Angegeben von:
      interact in Schnittstelle IInteraction
      Parameter:
      active - The BooleanSupplier that determines when this interacting action should end.
    • setInteracting

      public void setInteracting(boolean interacting)
      Beschreibung aus Schnittstelle kopiert: IInteraction
      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()
      Angegeben von:
      setInteracting in Schnittstelle IInteraction
      Parameter:
      interacting - Whether the LocalPlayer should be interacting or not
    • holdInteract

      public void holdInteract(int ticks)
      Beschreibung aus Schnittstelle kopiert: IInteraction
      Makes the attached LocalPlayer hold interact (or use an item) for a specified number of ticks
      Angegeben von:
      holdInteract in Schnittstelle IInteraction
      Parameter:
      ticks - The amount of ticks to interact for (20 ticks = 1 second). -1 for indefinite interacting.
    • holdInteract

      public void holdInteract(BooleanSupplier active)
      Beschreibung aus Schnittstelle kopiert: IInteraction
      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.
      Angegeben von:
      holdInteract in Schnittstelle IInteraction
      Parameter:
      active - The BooleanSupplier that determines when this interacting action should end.
    • setHoldingInteract

      public void setHoldingInteract(boolean interacting)
      Beschreibung aus Schnittstelle kopiert: IInteraction
      Makes the attached LocalPlayer always be subject to the passed holding interact flag
      Angegeben von:
      setHoldingInteract in Schnittstelle IInteraction
      Parameter:
      interacting - Whether the LocalPlayer should be interacting or not
    • attack

      public void attack()
      Beschreibung aus Schnittstelle kopiert: IInteraction
      Makes the attached LocalPlayer attack (or break a block) for exactly one tick
      Angegeben von:
      attack in Schnittstelle IInteraction
    • attack

      public void attack(int ticks)
      Beschreibung aus Schnittstelle kopiert: IInteraction
      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()
      Angegeben von:
      attack in Schnittstelle IInteraction
      Parameter:
      ticks - The amount of ticks to interact for (20 ticks = 1 second). -1 for indefinite attacking.
    • attack

      public void attack(BooleanSupplier active)
      Beschreibung aus Schnittstelle kopiert: IInteraction
      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()
      Angegeben von:
      attack in Schnittstelle IInteraction
      Parameter:
      active - The BooleanSupplier that determines when this attacking action should end.
    • setAttacking

      public void setAttacking(boolean attacking)
      Beschreibung aus Schnittstelle kopiert: IInteraction
      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()
      Angegeben von:
      setAttacking in Schnittstelle IInteraction
      Parameter:
      attacking - Whether the LocalPlayer should be attacking or not
    • holdAttack

      public void holdAttack(int ticks)
      Beschreibung aus Schnittstelle kopiert: IInteraction
      Makes the attached LocalPlayer hold attack (or break a block) for a specified number of ticks
      Angegeben von:
      holdAttack in Schnittstelle IInteraction
      Parameter:
      ticks - The amount of ticks to interact for (20 ticks = 1 second). -1 for indefinite attacking.
    • holdAttack

      public void holdAttack(BooleanSupplier active)
      Beschreibung aus Schnittstelle kopiert: IInteraction
      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.
      Angegeben von:
      holdAttack in Schnittstelle IInteraction
      Parameter:
      active - The BooleanSupplier that determines when this attacking action should end.
    • setHoldingAttack

      public void setHoldingAttack(boolean attacking)
      Beschreibung aus Schnittstelle kopiert: IInteraction
      Makes the attached LocalPlayer always be subject to the passed holding attack flag
      Angegeben von:
      setHoldingAttack in Schnittstelle IInteraction
      Parameter:
      attacking - Whether the LocalPlayer should be attacking or not
    • deinit

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