public static interface InteractBlockEvent.Secondary extends InteractBlockEvent, HandInteractEvent
This is usually right-click.
| Modifier and Type | Interface and Description |
|---|---|
static interface |
InteractBlockEvent.Secondary.MainHand
A
InteractBlockEvent.Secondary event where the interaction is from the client's main hand. |
static interface |
InteractBlockEvent.Secondary.OffHand
A
InteractBlockEvent.Secondary event where the interaction is from the client's off hand. |
InteractBlockEvent.Primary, InteractBlockEvent.Secondary| Modifier and Type | Method and Description |
|---|---|
Tristate |
getOriginalUseBlockResult()
Gets the original
getUseBlockResult(). |
Tristate |
getOriginalUseItemResult() |
Tristate |
getUseBlockResult()
Gets whether the interacted
BlockSnapshot should be used. |
Tristate |
getUseItemResult()
Gets whether the
ArmorEquipable.getItemInHand(org.spongepowered.api.data.type.HandType) should be used. |
void |
setUseBlockResult(Tristate result)
Sets whether the interacted
BlockSnapshot should be used. |
void |
setUseItemResult(Tristate result)
Sets whether the
ArmorEquipable.getItemInHand(org.spongepowered.api.data.type.HandType) should be used. |
getTargetSidegetTargetBlockgetHandTypegetInteractionPointgetCause, getContext, getSourceisCancelled, setCancelledTristate getOriginalUseItemResult()
Tristate getOriginalUseBlockResult()
getUseBlockResult().getUseBlockResult()Tristate getUseItemResult()
ArmorEquipable.getItemInHand(org.spongepowered.api.data.type.HandType) should be used.
ItemStack will never be used.ItemStack will be used if the block fails.
ItemStack will always be used.Note: These results may differ depending on implementation.
ArmorEquipable.getItemInHand(org.spongepowered.api.data.type.HandType) should be usedTristate getUseBlockResult()
BlockSnapshot should be used.
BlockSnapshot will never be used.BlockSnapshot will be used as normal.BlockSnapshot will always be used.Note: These results may differ depending on implementation.
BlockSnapshot should be usedvoid setUseItemResult(Tristate result)
ArmorEquipable.getItemInHand(org.spongepowered.api.data.type.HandType) should be used.
ItemStack will never be used.ItemStack will be used if the block fails.
ItemStack will always be used.Note: These results may differ depending on implementation.
result - Whether the ArmorEquipable.getItemInHand(org.spongepowered.api.data.type.HandType) should be usedvoid setUseBlockResult(Tristate result)
BlockSnapshot should be used.
BlockSnapshot will never be used.BlockSnapshot will be used as normal.BlockSnapshot will always be used.Note: These results may differ depending on implementation.
result - Whether the interacted BlockSnapshot should be
used