I have a script that strip-mines in MineCraft and occasionally places a torch at its feet. I am using PyAutoGUI to move the mouse from in front of the player to below the player, place a torch, move it back and continue mining. The problem is that it won't move the mouse down unless it is already moving (e.g. if I am wiggling the mouse a bit, then it will work). Otherwise, it just stays still.
Code (I have commented the bits that aren't to do with placing a torch):
def mine():
count = 0
while not found_diamonds:
# if keyboard.is_pressed('q'):
# break
# pyautogui.keyDown('w')
# pyautogui.mouseDown()
count += 1
if count >= 20:
count = 0
pyautogui.mouseUp()
es.wait(0.01)
pyautogui.moveRel(00, 500)
es.wait(0.01)
pyautogui.rightClick()
es.wait(0.01)
pyautogui.moveRel(00, -400)
time.sleep(0.01)
Thanks in advance.