Interface HitboxInteractHandler<E>

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface HitboxInteractHandler<E>
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    apply(BuiltImmersiveInfo<E> info, net.minecraft.world.entity.player.Player player, int slot, net.minecraft.world.InteractionHand hand)
    Called when a hitbox is being interacted with.
  • Method Details

    • apply

      int apply(BuiltImmersiveInfo<E> info, net.minecraft.world.entity.player.Player player, int slot, net.minecraft.world.InteractionHand hand)
      Called when a hitbox is being interacted with.
      Parameters:
      info - The info containing the interacted hitbox.
      player - The player interacting with the hitbox.
      slot - The slot or hitboxIndex being interacted with.
      hand - Which hand is interacting with the hitbox.
      Returns:
      A cooldown time. See Immersive.handleHitboxInteract(ImmersiveInfo, LocalPlayer, int, InteractionHand) for more info.