Jump to content

Simulate mouse break block while window unfocused


Anubis

Recommended Posts

I simply try to simulate the holding of the left mouse button to continuously break blocks, but with the ability to unfocuse the window. I found:

KeyBinding.setKeyBindState(ClientProxy.mousePress.getKey(), keyDown);

wich allows the wanted Key to be pressed, but requires the window to be focused.

 

The other thing I found was:

mc.player.swing(Hand.MAIN_HAND, true);

resp.

mc.player.swingArm(Hand.MAIN_HAND);

But this only makes the wanted hand moving but without any influence on the surrounding. Looks funny, but is useless 😄

 

I call both commands in the ClientTickEvent and they were executed as expected.

 

Any idea what I can do?

 

 

Link to comment
Share on other sites

Normally you can use F3 + T to reload resourses and keep the mouse clicked for using a cobble generator for example. But this requires mc to be focused and doesnt allow my computer to be used in an other context. I just want to allow my computer doing other stuff while simply breaking blocks in background.

If the F3 + T combination is considert as cheating, then I am sorry for asking such questions her

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.