[Suggestion] Middle click pick pick part
slava110 opened this issue ยท 6 comments
That's actually not a bad idea. Will have to investigate how to do such a thing. I think MC reports middle-click operations...
So, it turns out MC actually does not report when the player middle-clicks. Forge doesn't have an event for that either. The only thing it does do is detect a middle-click during the main tick loop and forward that click to any blocks the player is clicking. This is only for blocks; entities aren't even considered for this action. Because of this, and the lack of an event, I won't be able to add this feature. Sorry about that....
@DonBruce64, what about Entity#getPickedResult(RayTraceResult target)
? Can you override it and use to give certain vehicle part?
That... might actually work. My dev code is all fouled up now, but I'll take a second look into this when I get the chance. My only concern is that MC has a "max distance from entity" check it performs on some calculations that prevent clicks on entities larger than about 5 blocks wide. Whether or not this will work all depends if MC does those checks before or after the method is called. Will have to see.