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 org.spongepowered.api.event.block.InteractBlockEvent
InteractBlockEvent.Primary, InteractBlockEvent.Secondary
Nested classes/interfaces inherited from interface org.spongepowered.api.event.block.InteractBlockEvent.Secondary
InteractBlockEvent.Secondary.Post, InteractBlockEvent.Secondary.Pre
-
Method Summary
Modifier and TypeMethodDescriptionvoid
setUseBlockResult
(Tristate result) Sets whether the interactedBlockSnapshot
should be used.void
setUseItemResult
(Tristate result) Sets whether theArmorEquipable.itemInHand(java.util.function.Supplier<? extends org.spongepowered.api.data.type.HandType>)
should be used.Methods inherited from interface org.spongepowered.api.event.Cancellable
isCancelled, setCancelled
Methods inherited from interface org.spongepowered.api.event.block.InteractBlockEvent
block, targetSide
Methods inherited from interface org.spongepowered.api.event.block.InteractBlockEvent.Secondary
interactionPoint, originalUseBlockResult, originalUseItemResult, useBlockResult, useItemResult
-
Method Details
-
setUseItemResult
Sets whether theArmorEquipable.itemInHand(java.util.function.Supplier<? extends org.spongepowered.api.data.type.HandType>)
should be used.- FALSE: The
ItemStack
will never be used. - UNDEFINED: The
ItemStack
will be used if the block fails. - TRUE: The
ItemStack
will always be used.
Note: These results may differ depending on implementation.
- Parameters:
result
- Whether theArmorEquipable.itemInHand(java.util.function.Supplier<? extends org.spongepowered.api.data.type.HandType>)
should be used
- FALSE: The
-
setUseBlockResult
Sets whether the interactedBlockSnapshot
should be used.- FALSE:
BlockSnapshot
will never be used. - UNDEFINED:
BlockSnapshot
will be used as normal. - TRUE:
BlockSnapshot
will always be used.
Note: These results may differ depending on implementation.
- Parameters:
result
- Whether the interactedBlockSnapshot
should be used
- FALSE:
-