How to control the mouse in Minecraft using Python?

后端 未结 5 883
清酒与你
清酒与你 2021-02-06 14:11

All in all, I\'m trying to programmatically -and externally- control the Minecraft player\'s orientation.

No APIs, no Java mods to the game environment

Typical

5条回答
  •  没有蜡笔的小新
    2021-02-06 14:55

    I managed to make it work with the mouse library. Instead of using mouse.move(x,y,absolute,duration) I used mouse._os_mouse.move_to(x,y) and mouse._os_mouse.move_relative(x,y). Take into account that if you want a smooth effect you'll have to implement it yourself using something like time.sleep(s).

提交回复
热议问题