Philip2809 Posted September 26, 2020 Posted September 26, 2020 (edited) 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, 2020 by Philip2809 1 Quote
ChampionAsh5357 Posted September 26, 2020 Posted September 26, 2020 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. 1 Quote
Philip2809 Posted September 27, 2020 Author Posted September 27, 2020 On 9/26/2020 at 11:17 PM, 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. Expand 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. Quote
Geert Posted March 22, 2022 Posted March 22, 2022 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 Quote
Recommended Posts
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.