[SPIGOT-1955] Opening doors triggers LEFT_CLICK_AIR Action Created: 17/Mar/16  Updated: 18/Mar/16  Resolved: 18/Mar/16

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Tom Hoogstra Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: 1.9


 Description   

Code:

@EventHandler
public void onInteract(PlayerInteractEvent e){
        Bukkit.broadcastMessage(e.getAction().name());
}

When opening a door from directly infront of it, it broadcasts "LEFT_CLICK_AIR".
However, if you angel your camera downwards, so that if the door wasn't there and that there was a block behind the door, it would not be LEFT_CLICK_AIR.

If you click where the doors rotators are, it doesn't do LEFT_CLICK_AIR either, so I'm mainly thinking this is a minecraft bug, and it thinks that the window part of the door is air, and since the player is doing the left click animation, its assuming that the player must be left clicking.



 Comments   
Comment by md_5 [ 18/Mar/16 ]

Basically the Minecraft client does have any action "left click air", instead Bukkit takes the player arm swing and performs a ray trace. As you have just discovered ray tracing is far from perfect, but I don't think it's reasonable to attempt a fix for this particular issue.

Comment by Tom Hoogstra [ 17/Mar/16 ]

If you right click the door in this position, it will be LEFT_CLICK_AIR
http://puu.sh/nJScL.jpg

However, if you right click the door in this position, it will be right click block:
http://puu.sh/nJSdK.jpg

Generated at Fri Apr 11 15:51:05 UTC 2025 using Jira 10.3.3#10030003-sha1:d220e3fefc8dfc6d47f522d3b9a20c1455e12b7b.