Replies: 2 comments 1 reply
-
Would also kinda solve #11181 |
Beta Was this translation helpful? Give feedback.
0 replies
-
Not sure this is really tenable, if you right click a block, vanilla always tries to interact with that block, and then falls back to using the item, we don't know what the interaction result will be until we run said interaction |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is your feature request related to a problem?
If you want to add actions to items or blocks when interacting with them (right or left click) you have to do a shtload of code
Example - Item action
Adding an interaction to a stick when held in any hand but not both at the same time
which only works when you don't look at an intractable block, would require following:
Example - Block action
Adding an interaction to a block with an item would require the following:
Describe the solution you'd like.
I would propose two new events for differentiating block and hand interactions
The events could be called: PlayerInteractHandEvent and PlayerInteractBlockEvent
The interact hand event would provide the hand and item used and the default event result
The interact block event would provide the block and block face as well as the hand and the default event result
Describe alternatives you've considered.
Currently, you have to check the clicked block and perform your own logic to get the correct item used inside an interaction only to determine which hand was used and if the interaction will perform something on the item or in the world, which is quite tidies
Other
No response
Beta Was this translation helpful? Give feedback.
All reactions