ToggleSneak Mod Originally coded by wd1966 | Updated and continued by Triforce9
A fairly useful mod for the avid builder; especially in the case of a builder prone to plummeting from atop their skyscrapers!
This mod toggles sneak, so every time you press the the key to sneak, you either crouch, or stand tall. Unless you don't want to ToggleSneak, in which case, just hold sneak for approximately half a second, and you'll stand normally when you let go.
Have you considered creating some option to change the amount of time you have to sneak before you sneak normally?
Well, to be exact, if you hold down the sneak key for longer than 0.3 seconds, it doesn't toggle. It seems to work well in my opinion, but I'm interested to know why you think it needs options to allow changes?
Well, to be exact, if you hold down the sneak key for longer than 0.3 seconds, it doesn't toggle. It seems to work well in my opinion, but I'm interested to know why you think it needs options to allow changes?
Well, I got tired of accidentally flying all the way to the ground in creative mode, so I changed the time to .15 seconds, which works much better for me. But of course I had to do that manually, so I was just wondering if you could add an option to make it easier. (I don't think it's possible to satisfy everyone at the same time without some amount of customization.)
Well, I got tired of accidentally flying all the way to the ground in creative mode, so I changed the time to .15 seconds, which works much better for me. But of course I had to do that manually, so I was just wondering if you could add an option to make it easier. (I don't think it's possible to satisfy everyone at the same time without some amount of customization.)
Oh yeah, that was so annoying. But all you need to do is update to 1.1.0a, I fixed creative mode flying in that version; it doesn't toggle at all if you're in the air.
I must note though, if you're currently sneaking on the ground and try to creative fly away, you'll fly back to the ground. I didn't fix this because it doesn't happen as often as getting dragged to the ground, and because I didn't want to modify more .class files; I wanted this mod to stay as simple as possible.
I would've done it without MCP this time, as I had mentioned to NorthAntrim, except I was having trouble with re-compiling. Also, EntityPlayer wasn't where I expected it to be this time.
Little more complicated than that
Caps lock isn't a toggle key in itself, but it initiates a toggle state to the system.
For the sneak toggle to work you have to make java think the key is down or give it a state on keypress.
They are the easy ways anyway, there are more.
Rollback Post to RevisionRollBack
Added forge compatibility to Link Removed, Enjoy. c;
Originally coded by wd1966 | Updated and continued by Triforce9
A fairly useful mod for the avid builder; especially in the case of a builder prone to plummeting from atop their skyscrapers!
This mod toggles sneak, so every time you press the the key to sneak, you either crouch, or stand tall. Unless you don't want to ToggleSneak, in which case, just hold sneak for approximately half a second, and you'll stand normally when you let go.
Current Version:
1.2.5
Previous Versions:
1.2.4
1.2.3
1.1.0a
1.1.0
Install Instructions:
See this page on the Minecraft Wiki:
http://www.minecraft...to_install_Mods
Changelog:
1.2.5 | 5 May 2012
Updated to 1.2.5
1.2.4 | 27 March 2012
Updated to 1.2.4
1.2.3 | 4 March 2012
Updated to 1.2.3
1.1.0a | 3 February 2012
Fixed issue with Creative mode flying.
1.1.0 | 17 January 2012
Updated to 1.1.0
This mod was originally made by wd1966, here.
Great mod! I just tried it
When I'm high up in survival building, I usually die if I fall :dry.gif:
Yeah, it's a pretty simple mod, but not everyone has the "technical" know-how to create Minecraft mods. :wink.gif:
It's not even 1 kilobyte in size?
Well, to be exact, if you hold down the sneak key for longer than 0.3 seconds, it doesn't toggle. It seems to work well in my opinion, but I'm interested to know why you think it needs options to allow changes?
Well, I got tired of accidentally flying all the way to the ground in creative mode, so I changed the time to .15 seconds, which works much better for me. But of course I had to do that manually, so I was just wondering if you could add an option to make it easier. (I don't think it's possible to satisfy everyone at the same time without some amount of customization.)
Oh yeah, that was so annoying. But all you need to do is update to 1.1.0a, I fixed creative mode flying in that version; it doesn't toggle at all if you're in the air.
I must note though, if you're currently sneaking on the ground and try to creative fly away, you'll fly back to the ground. I didn't fix this because it doesn't happen as often as getting dragged to the ground, and because I didn't want to modify more .class files; I wanted this mod to stay as simple as possible.
I appreciate the work on the mod, and the updates you've added from others, and also that you like to keep it simple! Kudos!
I would've done it without MCP this time, as I had mentioned to NorthAntrim, except I was having trouble with re-compiling. Also, EntityPlayer wasn't where I expected it to be this time.
As in, press a key to enable/disable ToggleSneak entirely, or a different key for Toggling?
EDIT: Or even a sneak button and a stand button?
You are quite welcome!
Due to the complexity of adding keyBinds, this might not happen for a while.
I am a bit intrigued now though; to make a "complex" version of ToggleSneak.
If you make this mod for modloader keybinds become easier, you wont have to modify base classes of minecraft and create more incompatibilities.
Yep, just waiting on MCP. Last time I tried updating w/o MCP, they released before I even could figure out how to recompile Minecraft.
Good to know. Thanks.
From the devs Twitter.
Searge
@SeargeDPWe fixed some minor bugs, a crash bug and made a 3rd preview version, download it here and send us feedback
http://www.mediafire.com/?hl1t281w442wfxf
Little more complicated than that
Caps lock isn't a toggle key in itself, but it initiates a toggle state to the system.
For the sneak toggle to work you have to make java think the key is down or give it a state on keypress.
They are the easy ways anyway, there are more.
I would've got this out sooner, but MCP wasn't happy that it couldn't access the swap partition. =P
I've got plenty of ram, MCP. Don't make me enable the swap so you can load 1MB into it.