Interface InteractBlockEvent.Secondary.Post
- All Superinterfaces:
Cancellable
,CompositeEvent<InteractBlockEvent.Secondary>
,Event
,InteractBlockEvent
,InteractBlockEvent.Secondary
,InteractEvent
- Enclosing interface:
InteractBlockEvent.Secondary
public static interface InteractBlockEvent.Secondary.Post
extends InteractBlockEvent.Secondary, CompositeEvent<InteractBlockEvent.Secondary>
-
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 TypeMethodDescriptiondefault BlockSnapshot
block()
Gets theBlockSnapshot
.default Vector3d
Gets the point of interaction where the interaction occurred as aVector3d
.default Tristate
Gets the originalInteractBlockEvent.Secondary.useBlockResult()
.default Tristate
default Direction
Gets the target "side" of theBlockState
being interacted with orDirection.NONE
if not known.default Tristate
Gets whether the interactedBlockSnapshot
should be used.default Tristate
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
Methods inherited from interface org.spongepowered.api.event.CompositeEvent
applyTo, baseEvent, children, event, setCancelled
-
Method Details
-
originalUseItemResult
- Specified by:
originalUseItemResult
in interfaceInteractBlockEvent.Secondary
-
originalUseBlockResult
Description copied from interface:InteractBlockEvent.Secondary
Gets the originalInteractBlockEvent.Secondary.useBlockResult()
.- Specified by:
originalUseBlockResult
in interfaceInteractBlockEvent.Secondary
- Returns:
- The original
InteractBlockEvent.Secondary.useBlockResult()
-
useItemResult
Description copied from interface:InteractBlockEvent.Secondary
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.
- Specified by:
useItemResult
in interfaceInteractBlockEvent.Secondary
- Returns:
- Whether the
ArmorEquipable.itemInHand(java.util.function.Supplier<? extends org.spongepowered.api.data.type.HandType>)
should be used
- FALSE: The
-
useBlockResult
Description copied from interface:InteractBlockEvent.Secondary
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.
- Specified by:
useBlockResult
in interfaceInteractBlockEvent.Secondary
- Returns:
- Whether the interacted
BlockSnapshot
should be used
- FALSE:
-
interactionPoint
Description copied from interface:InteractBlockEvent.Secondary
Gets the point of interaction where the interaction occurred as aVector3d
.- Specified by:
interactionPoint
in interfaceInteractBlockEvent.Secondary
- Returns:
- The interaction point
-
block
Description copied from interface:InteractBlockEvent
Gets theBlockSnapshot
.- Specified by:
block
in interfaceInteractBlockEvent
- Returns:
- The block snapshot
-
targetSide
Description copied from interface:InteractBlockEvent
Gets the target "side" of theBlockState
being interacted with orDirection.NONE
if not known.- Specified by:
targetSide
in interfaceInteractBlockEvent
- Returns:
- An optional containing the side being interacted with or
Direction.NONE
-