Expected behavior
A PlayerInteractEvent with action = LEFT_CLICK_AIR must be triggered
Observed/Actual behavior
PlayerInteractEvent is not being triggered
Steps/models to reproduce
/attribute @p minecraft:entity_interaction_range base set 10
https://youtu.be/NhFysJaVHiA
Plugin and Datapack List
none
Paper version
the second-to-last one; it doesn't make sense
Other
This can be fixed by adding the same check as in hitEntity, but replacing entity with block and entityInteractionRange with blockInteractionRange.
else if (gameType != GameType.CREATIVE && result.getHitBlock() != null && origin.toVector().distanceSquared(result.getHitPosition()) > this.player.blockInteractionRange() * this.player.blockInteractionRange()) {
CraftEventFactory.callPlayerInteractEvent(this.player, Action.LEFT_CLICK_AIR, this.player.getInventory().getSelectedItem(), InteractionHand.MAIN_HAND);
}
Expected behavior
A PlayerInteractEvent with action = LEFT_CLICK_AIR must be triggered
Observed/Actual behavior
PlayerInteractEvent is not being triggered
Steps/models to reproduce
/attribute @p minecraft:entity_interaction_range base set 10
https://youtu.be/NhFysJaVHiA
Plugin and Datapack List
none
Paper version
the second-to-last one; it doesn't make sense
Other
This can be fixed by adding the same check as in
hitEntity, but replacingentitywithblockandentityInteractionRangewithblockInteractionRange.