Interface BlockSoundInteractionTranslator
- All Superinterfaces:
SoundInteractionTranslator<String>
- All Known Implementing Classes:
BucketSoundInteractionTranslator
,ComparatorSoundInteractionTranslator
,DoorSoundInteractionTranslator
,FlintAndSteelInteractionTranslator
,GrassPathInteractionTranslator
,HoeInteractionTranslator
,LeverSoundInteractionTranslator
Sound interaction handler for when a block is right-clicked.
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
canInteract(GeyserSession session, GeyserItemStack itemInHand, String blockIdentifier)
Determines if the adventure gamemode would prevent this item from actually succeedingstatic void
handleBlockInteraction(GeyserSession session, com.nukkitx.math.vector.Vector3f position, String identifier)
Handles the block interaction when a player right-clicks a block.Methods inherited from interface org.geysermc.geyser.translator.sound.SoundInteractionTranslator
translate
-
Method Details
-
handleBlockInteraction
static void handleBlockInteraction(GeyserSession session, com.nukkitx.math.vector.Vector3f position, String identifier)Handles the block interaction when a player right-clicks a block.- Parameters:
session
- the session interacting with the blockposition
- the position of the blockidentifier
- the identifier of the block
-
canInteract
static boolean canInteract(GeyserSession session, GeyserItemStack itemInHand, String blockIdentifier)Determines if the adventure gamemode would prevent this item from actually succeeding
-