Package net.actor.api.v1
Schnittstelle IInteraction
- Alle bekannten Implementierungsklassen:
Interaction
public interface IInteraction
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoidattack()Makes the attachedLocalPlayerattack (or break a block) for exactly one tickvoidattack(int ticks) Makes the attachedLocalPlayerattack (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.voidattack(BooleanSupplier active) Attack (or break a block) until theBooleanSupplierdoes not return true anymore.voidholdAttack(int ticks) Makes the attachedLocalPlayerhold attack (or break a block) for a specified number of ticksvoidholdAttack(BooleanSupplier active) Hold attack (or break a block) until theBooleanSupplierdoes not return true anymore.voidholdInteract(int ticks) Makes the attachedLocalPlayerhold interact (or use an item) for a specified number of ticksvoidholdInteract(BooleanSupplier active) Hold interact (or use an item) until theBooleanSupplierdoes not return true anymore.voidinteract()Makes the attachedLocalPlayerinteract (or use an item) for exactly one tickvoidinteract(int ticks) Makes the attachedLocalPlayerinteract (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.voidinteract(BooleanSupplier active) Interact (or use an item) until theBooleanSupplierdoes not return true anymore.voidsetAttacking(boolean attacking) Makes the attachedLocalPlayeralways 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.voidsetHoldingAttack(boolean attacking) Makes the attachedLocalPlayeralways be subject to the passed holding attack flagvoidsetHoldingInteract(boolean interacting) Makes the attachedLocalPlayeralways be subject to the passed holding interact flagvoidsetInteracting(boolean interacting) Makes the attachedLocalPlayeralways 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 attachedLocalPlayerinteract (or use an item) for exactly one tick -
interact
void interact(int ticks) Makes the attachedLocalPlayerinteract (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
Interact (or use an item) until theBooleanSupplierdoes 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 attachedLocalPlayeralways 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 theLocalPlayershould be interacting or not
-
holdInteract
void holdInteract(int ticks) Makes the attachedLocalPlayerhold 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
Hold interact (or use an item) until theBooleanSupplierdoes 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 attachedLocalPlayeralways be subject to the passed holding interact flag- Parameter:
interacting- Whether theLocalPlayershould be interacting or not
-
attack
void attack()Makes the attachedLocalPlayerattack (or break a block) for exactly one tick -
attack
void attack(int ticks) Makes the attachedLocalPlayerattack (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
Attack (or break a block) until theBooleanSupplierdoes 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 attachedLocalPlayeralways 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 theLocalPlayershould be attacking or not
-
holdAttack
void holdAttack(int ticks) Makes the attachedLocalPlayerhold 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
Hold attack (or break a block) until theBooleanSupplierdoes 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 attachedLocalPlayeralways be subject to the passed holding attack flag- Parameter:
attacking- Whether theLocalPlayershould be attacking or not
-