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.
-
Method Summary
Modifier and TypeMethodDescriptionintapply(BuiltImmersiveInfo<E> info, net.minecraft.world.entity.player.Player player, List<Integer> slots, net.minecraft.world.InteractionHand hand, boolean modifierPressed) Called when a hitbox is being interacted with.
-
Method Details
-
apply
int apply(BuiltImmersiveInfo<E> info, net.minecraft.world.entity.player.Player player, List<Integer> slots, net.minecraft.world.InteractionHand hand, boolean modifierPressed) Called when a hitbox is being interacted with.- Parameters:
info- The info containing the interacted hitbox.player- The player interacting with the hitbox.slots- The slots or hitboxIndices being interacted with.hand- Which hand is interacting with the hitbox.modifierPressed- Whether the modifier key (usually the button mapped to breaking blocks) was held for the interaction.- Returns:
- A cooldown time. See
Immersive.handleHitboxInteract(ImmersiveInfo, LocalPlayer, List, InteractionHand, boolean)for more info.
-