Package net.actor.impl
Klasse Interaction
java.lang.Object
net.actor.impl.Interaction
- Alle implementierten Schnittstellen:
IInteraction,IDeserializable
-
Konstruktorübersicht
Konstruktoren -
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.voiddeinit()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.
-
Konstruktordetails
-
Interaction
-
-
Methodendetails
-
interact
public void interact()Beschreibung aus Schnittstelle kopiert:IInteractionMakes the attachedLocalPlayerinteract (or use an item) for exactly one tick- Angegeben von:
interactin SchnittstelleIInteraction
-
interact
public void interact(int ticks) Beschreibung aus Schnittstelle kopiert:IInteractionMakes 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()- Angegeben von:
interactin SchnittstelleIInteraction- Parameter:
ticks- The amount of ticks to interact for (20 ticks = 1 second). -1 for indefinite interacting.
-
interact
Beschreibung aus Schnittstelle kopiert:IInteractionInteract (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()- Angegeben von:
interactin SchnittstelleIInteraction- Parameter:
active- The BooleanSupplier that determines when this interacting action should end.
-
setInteracting
public void setInteracting(boolean interacting) Beschreibung aus Schnittstelle kopiert:IInteractionMakes 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()- Angegeben von:
setInteractingin SchnittstelleIInteraction- Parameter:
interacting- Whether theLocalPlayershould be interacting or not
-
holdInteract
public void holdInteract(int ticks) Beschreibung aus Schnittstelle kopiert:IInteractionMakes the attachedLocalPlayerhold interact (or use an item) for a specified number of ticks- Angegeben von:
holdInteractin SchnittstelleIInteraction- Parameter:
ticks- The amount of ticks to interact for (20 ticks = 1 second). -1 for indefinite interacting.
-
holdInteract
Beschreibung aus Schnittstelle kopiert:IInteractionHold 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.- Angegeben von:
holdInteractin SchnittstelleIInteraction- Parameter:
active- The BooleanSupplier that determines when this interacting action should end.
-
setHoldingInteract
public void setHoldingInteract(boolean interacting) Beschreibung aus Schnittstelle kopiert:IInteractionMakes the attachedLocalPlayeralways be subject to the passed holding interact flag- Angegeben von:
setHoldingInteractin SchnittstelleIInteraction- Parameter:
interacting- Whether theLocalPlayershould be interacting or not
-
attack
public void attack()Beschreibung aus Schnittstelle kopiert:IInteractionMakes the attachedLocalPlayerattack (or break a block) for exactly one tick- Angegeben von:
attackin SchnittstelleIInteraction
-
attack
public void attack(int ticks) Beschreibung aus Schnittstelle kopiert:IInteractionMakes 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()- Angegeben von:
attackin SchnittstelleIInteraction- Parameter:
ticks- The amount of ticks to interact for (20 ticks = 1 second). -1 for indefinite attacking.
-
attack
Beschreibung aus Schnittstelle kopiert:IInteractionAttack (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()- Angegeben von:
attackin SchnittstelleIInteraction- Parameter:
active- The BooleanSupplier that determines when this attacking action should end.
-
setAttacking
public void setAttacking(boolean attacking) Beschreibung aus Schnittstelle kopiert:IInteractionMakes 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()- Angegeben von:
setAttackingin SchnittstelleIInteraction- Parameter:
attacking- Whether theLocalPlayershould be attacking or not
-
holdAttack
public void holdAttack(int ticks) Beschreibung aus Schnittstelle kopiert:IInteractionMakes the attachedLocalPlayerhold attack (or break a block) for a specified number of ticks- Angegeben von:
holdAttackin SchnittstelleIInteraction- Parameter:
ticks- The amount of ticks to interact for (20 ticks = 1 second). -1 for indefinite attacking.
-
holdAttack
Beschreibung aus Schnittstelle kopiert:IInteractionHold 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.- Angegeben von:
holdAttackin SchnittstelleIInteraction- Parameter:
active- The BooleanSupplier that determines when this attacking action should end.
-
setHoldingAttack
public void setHoldingAttack(boolean attacking) Beschreibung aus Schnittstelle kopiert:IInteractionMakes the attachedLocalPlayeralways be subject to the passed holding attack flag- Angegeben von:
setHoldingAttackin SchnittstelleIInteraction- Parameter:
attacking- Whether theLocalPlayershould be attacking or not
-
deinit
public void deinit()- Angegeben von:
deinitin SchnittstelleIDeserializable
-