Interface InteractBlockEvent.Secondary.Pre
- All Superinterfaces:
Cancellable, Event, InteractBlockEvent, InteractBlockEvent.Secondary, InteractEvent
- Enclosing interface:
InteractBlockEvent.Secondary
public static interface InteractBlockEvent.Secondary.Pre
extends InteractBlockEvent.Secondary, Cancellable
-
Nested Class Summary
Nested classes/interfaces inherited from interface InteractBlockEvent
InteractBlockEvent.Primary, InteractBlockEvent.SecondaryNested classes/interfaces inherited from interface InteractBlockEvent.Secondary
InteractBlockEvent.Secondary.Post, InteractBlockEvent.Secondary.Pre -
Method Summary
Modifier and TypeMethodDescriptionvoidsetUseBlockResult(Tristate result) Sets whether the interactedBlockSnapshotshould be used.voidsetUseItemResult(Tristate result) Sets whether theArmorEquipable.itemInHand(Supplier)should be used.Methods inherited from interface Cancellable
isCancelled, setCancelledMethods inherited from interface InteractBlockEvent
block, targetSideMethods inherited from interface InteractBlockEvent.Secondary
interactionPoint, originalUseBlockResult, originalUseItemResult, useBlockResult, useItemResult
-
Method Details
-
setUseItemResult
Sets whether theArmorEquipable.itemInHand(Supplier)should be used.- FALSE: The
ItemStackwill never be used. - UNDEFINED: The
ItemStackwill be used if the block fails. - TRUE: The
ItemStackwill always be used.
Note: These results may differ depending on implementation.
- Parameters:
result- Whether theArmorEquipable.itemInHand(Supplier)should be used
- FALSE: The
-
setUseBlockResult
Sets whether the interactedBlockSnapshotshould be used.- FALSE:
BlockSnapshotwill never be used. - UNDEFINED:
BlockSnapshotwill be used as normal. - TRUE:
BlockSnapshotwill always be used.
Note: These results may differ depending on implementation.
- Parameters:
result- Whether the interactedBlockSnapshotshould be used
- FALSE:
-