How would I have the bot mimic "player" control #3071
Unanswered
TimeLordRaps
asked this question in
Q&A
Replies: 1 comment
-
So the window.acceptClick doesn't work because that requires slot number. In theory you could map sections of the screen to the slots locations, but is there any general way to do this without having to manually find the ratios and everything for the, maybe if the individual windows gave slot areas for each slot you could do this programmatically. To my knowledge this would be somewhere in the mc data probably, but I haven't done a thorough search. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Technical setup:
I have a peculiar problem, I have a minerl pretrained bot, which has an action space of direct mouse and keyboard control and I want it to control a mineflayer bot. This action space is output in the form of values and I want to be able to map those values directly to mineflayer bot control.
So far I consider the problem semi-solved. Ie for movement and camera motion I can just calculate those based on the dx and dy from the mouse input, and wasd from the keyboard inputs, but the problem gets a little more confusing when interacting with in-gui controls. So my question is how would I have a bot that once it opens a gui window is able to control mouse movements within the gui as if they were an actual player.
General request:
What I need is a direct low level api for generally controlling "mouse movements" of a mineflayer bot, particularly in guis.
What I've found thus far:
I've looked into the yaw and pitch and bot.look seems to be a solution for the out of gui mouse movement translation.
I've looked through here:
https://github.com/PrismarineJS/prismarine-windows/blob/master/API.md#windowacceptclickclick
A possible solution would be to check if the bot has an open window somehow and then translating the mouse movements to direct clicks in the window.
Questions:
Beta Was this translation helpful? Give feedback.
All reactions