Interface BlockSoundInteractionTranslator

All Superinterfaces:
SoundInteractionTranslator<String>
All Known Implementing Classes:
BucketSoundInteractionTranslator, ComparatorSoundInteractionTranslator, DoorSoundInteractionTranslator, FlintAndSteelInteractionTranslator, GrassPathInteractionTranslator, HoeInteractionTranslator, LeverSoundInteractionTranslator

public interface BlockSoundInteractionTranslator extends SoundInteractionTranslator<String>
Sound interaction handler for when a block is right-clicked.
  • 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 block
      position - the position of the block
      identifier - 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