Posted September 26, 20205 yr How to simulate right mouse button being held down? Is this too complicated or is there a simple command to simulate this? //Philip2809 Edited September 27, 20205 yr by Philip2809
September 26, 20205 yr I feel like you're asking a different question for something else's logic (maybe use item keybind), but it would be relatively difficult. You would need to use some sort of JVM witchery (reflection, AT, etc.) to manually set a value in MouseHelper.
September 27, 20205 yr Author 41 minutes ago, ChampionAsh5357 said: I feel like you're asking a different question for something else's logic (maybe use item keybind), but it would be relatively difficult. You would need to use some sort of JVM witchery (reflection, AT, etc.) to manually set a value in MouseHelper. Hi thanks for your fast answer! I figured it out: KeyBinding keyCode = Minecraft.getInstance().gameSettings.keyBindUseItem.getKeyBinding(); KeyBinding.setKeyBindState(keyCode.getKey(), true); KeyBinding.onTick(keyCode.getKey()); Just have to figure out how to stop it from holding it down.
March 22, 20223 yr Hi, Is your RMB still down? XD If this is implemented in a mod I'd be interested to know. (but this was one of the first hits I found, so maybe I will find a mod in a while) A workaround for me that works in Vanilla: Press the right mouse button, disconnect (mouse) USB, release right mouse button, reconnect USB. Minecraft will keep thinking the RMB is down until you click it again. Regards, Geert
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.