Interface InteractBlockEvent.Secondary
- All Superinterfaces:
Cancellable
,Event
,InteractBlockEvent
,InteractEvent
- Enclosing interface:
- InteractBlockEvent
An event where the targeted block is being interacted with the client's
"secondary" button.
This is usually right-click.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.spongepowered.api.event.block.InteractBlockEvent
InteractBlockEvent.Primary, InteractBlockEvent.Secondary
-
Method Summary
Modifier and TypeMethodDescriptionGets the point of interaction where the interaction occurred as aVector3d
.Gets the originaluseBlockResult()
.void
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.Gets whether the interactedBlockSnapshot
should be used.Gets 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
-
Method Details
-
originalUseItemResult
Tristate originalUseItemResult() -
originalUseBlockResult
Tristate originalUseBlockResult()Gets the originaluseBlockResult()
.- Returns:
- The original
useBlockResult()
-
useItemResult
Tristate useItemResult()Gets 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.
- Returns:
- Whether the
ArmorEquipable.itemInHand(java.util.function.Supplier<? extends org.spongepowered.api.data.type.HandType>)
should be used
- FALSE: The
-
useBlockResult
Tristate useBlockResult()Gets 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.
- Returns:
- Whether the interacted
BlockSnapshot
should be used
- FALSE:
-
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:
-
interactionPoint
Vector3d interactionPoint()Gets the point of interaction where the interaction occurred as aVector3d
.- Returns:
- The interaction point
-