More Info: How to Change Your Minecraft Skin in Java Edition
Need Help? Click here for more information on How to Change Your Minecraft Skin in Java Edition.
Need Help? Click here for more information on How to Change Your Minecraft Skin in Java Edition.
(10/16 - New rapidshare link until I find a permanent host. )
(10/12 edit: Make sure to read my latest post, there was a small error in some of the code that you may want to edit yourself. I'm going to release a new version of this script this weekend with some better resolution support and bug fixes as well)
(I wasn't sure if this was really applicable to mapping & mods, so maybe if it was someone can move it for me :Pig:)
The other day I wrote a script (it utilizes AutoHotKey) that adds a little more functionality to Minecraft's UI. As I had recently built a giant mob trap and huge tree farm, I was starting to get annoyed at how hard it was managing all my items (hard is an astronomical understatement). To get to the point this script adds this:
- Alt+Click to instantly move items to a chest or back. This even means if you're building stone pickaxes en masse, alt+clicking on them will "make a stack" just like you would click on torches!
- Shift+Right click will completely drain a chest of items or move your inventory or hotbar to a chest.
- Pressing 1-9 in your menus will automatically assign the item to the hotbar.
- You can now click and drag items to move them around instead of needing to click twice! If you move the item to a tile occupied by something else, they'll swap places.
- Automatically restock hotbar buttons with a simple button press. It'll use the column of items above it for replenishment. The script won't do this unless you command it to, because I 1) didn't want to take away user control at a time when potentially a creeper was chasing you, and 2) it'd be a little too much like a bot for my tastes.
- The numpad is mapped to your workbench, for quick drawing of recipies. Furthermore, a button will automatically craft a maximum-size stack of whatever you're creating! Save your fingers when turning logs to sticks!
Now, I originally created this for myself, so the code is a little haphazardly thrown together and may not accommodate everyone's systems. Here's some limitations:
- There's not a lot of idiot-proofing of actions. If you hit 3 while aiming your cursor at empty air by your inventory, you'll throw your item away. Consider this a feature
- Moving items around automatically only moves them to open spaces. This means that if you have a stack of 20 coal in a chest and you alt+click more coal in, they won't combine. The script hasn't been written to detect items yet. I started to do this, but it was such a pain getting all the little sprites in order and figuring out how to detect # of items, etc. I figure this kind of simple functionality would come up in an update sometime and I wanted to save coding time for... playing with blocks. This isn't terribly tough to implement however (just ~100 sprites...), and I'll probably write it in this weekend if need be.
- The script works on images, scanning the screen to find empty tiles. It was written for default skin UIs only. However, the detection is really simple, and a swapping of a few image files for your custom skins would probably work just fine. If not, the script is exceedingly simple to modify for whatever bumps come up. In fact, a custom skin written with this kind of script in mind would probably help streamline a lot of the code.
- Resolution Ah, the biggest bugaboo of this entire affair. The UI does some funny scaling as you resize your window. This can end up causing some item tiles to be different sizes than others. As you run the configuration process the first time using the script, it will holler at you a lot to keep resizing your window until it finds a set of UI gumps that are the proper sizes.
Honestly, you don't *need* AutoHotKey to get this to run. AHK can make a stand-alone .exe to run the program. This would be useful if you ran Minecraft on multiple PCs but didn't want to set up AHK on each. I'm not providing that compiled .exe at the moment. The script assumes you use e as your inventory button, so if you didn't want that you'd have to go swap the edit yourself. Additionally, if you wanted to modify any of the other hotkeys used it's easier at the moment to do so inside the script file.
Even more importantly! If I or other people update this script to add more functionality, having the program that reads those scripts would be nice. I had to stop adding features because some friends wanted to use the code.
I tried testing this at a lot of resolutions, but I can't catch every bug. This was tested in Windows 7, and my usual play resolution is 1216x632. I have found that the script does not like a maximized window at 1920x1280. I have not tested it at fullscreen, and it definitely won't work with the browser client (without a little modification anyway).
How Get?
1) Download & Install AutoHotKey
2) Download the Script @ Rapidshare
(2.5) Backup your save!)
3) Extract the .zip somewhere cozy, and double click minecraft_UI_ext.ahk to just dive in.
4)I recommend reading readme.txt first as well as some of the script! Remember, if your inventory hotkey is not e you'll have to change it in the script (it's in there twice). If you want, this is how to configure it:
Empty inventories, chests, and hotbar may aid in the calibration but may not be needed. Once the script runs, it'll prompt you to configure. The first slider in the box should really be kept at default. If you shorten it, it'll try to do batch moves faster. The second will set how many items in your belt will be restocked when you press ~. The script has some resolution requirements on your window, such as being even. Additionally, as you open up gumps for the script to analyze, a tooltip might pop up giving you a warning. If this happens, you need to wiggle your window's size a bit and restart the calibration. This happens because sometimes the UI stretches and causes some tiles to be different from others.
You will open in order the following windows: Inventory, Large Chest, Workbench, Furnace, Small Chest. Check the GUI to see the progress. It'll automatically close and save your config.txt once you've opened the small chest. You should be good to go now! Give it a spin.
The code isn't perfect, but I'm releasing it anyway since I know it'll work for a lot of people, and maybe it'll inspire some more bulletproof work with crazier features. It's an alpha for an alpha.
Known bugs:
- The workbench gump isn't always accurately identified on large resolutions (> 1296x998). This may mean that workbench-specific hotkeys won't work. =(
This is really what concerns me, especially since the script needs a little tweaking to better work with all resolutions. I may post an .exe sometime later, though, if enough people want it. The script will automatically configure itself to work without the user even needing to so much as look at the script, but if you wanted to change the key that it uses for your inventory, at the moment you'd need to go into the .ahk file.
Oh I'm sure. I basically had to relearn the AHK over again since it's been years since I used it, so I was having troubles with customizable keys. The script already uses an external configuration file to save your settings, so it's not like much needs to be touched in the script.
For anyone keeping score at home, the command to open the inventory in the script is written as send e. I'll look at what to do to fix that and then a self-contained .exe is pretty possible.
EDIT: i fixed it!!! it was ridiculous, i went to my old desktop and plugged in my old CRT monitor so i could dual screen and i found the config window on the other screen lol. so if anyone else has this problem this is how to fix it.
other than that problem, i absolutely love this script!!! its wonderful!
Yeah, along with what you posted above, those were two teeny little bugs in the script. To fix the window appearing offscreen, you just need to modify a line near the bottom in the createGUI subroutine. Look for a line that looks like this and replace the x1300 with x500. It was opening at x-coordinate 1300, which on some screens may be too far.
Gui, Show, x500 w385 h235, Calibration - Minecraft UI Extension by RiskyChris
The inability to hold a key while pressing shift was really annoying, and here's a pastebin of the code you should replace your shift and shift+Rbutton code with:
http://pastebin.com/gY3hW2ca
I have made some changes to the script that lets it work on all resolutions, but I need to finish a bit of it. I'll probably setup a github for the project and upload the new version this weekend.