Author Topic: My Minecraft mod assistant tool  (Read 5280 times)

Offline Epic_bubble

  • long
  • ***
  • Posts: 235
    • View Profile
My Minecraft mod assistant tool
« on: November 29, 2011, 12:15:46 PM »
My first project is a minecraft tool called AutoModder, its a tool that allows you to install Hippoplatimus's amazing Mod Manager tool with a single click. This is good because it means users who are inexperienced with modding dont have to edit the name of the minecraft.jar or use the run command to access the minecraft bin folder.

The problem with the original version was that when minecraft was launched the mod screen would appear but when gameplay started it would be stuck on a black screen (annoying!). I rounded the problem down the the meta-inf, this file needed to be removed before the game could start so I needed to find a way to unzip the minecraft.jar delete the meta-inf and repackage it.

I couldnt find a way to do that using the .net framework so I had to use a more hacky way which renames the .jar to a .zip and opens the correct folder for the user to delete the meta-inf file manually, it all works but I would rather get this done without the user needing to do any additional work.

Heres the new beta version that allows the deleting of the meta-inf: http://dl.dropbox.com/u/13594612/Automodder%201.2.2%20beta.exe

Screenshot of version 1.1


« Last Edit: November 29, 2011, 05:56:41 PM by Epic_bubble »
Device: Xperia play
CPU: Qualcomm 1 GHz Scorpion (Snapdragon)
GPU: Adreno 205
RAM: 512 MB
Screen res: 854 ? 480
ROM: stock android 2.3.4 rooted

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3491
  • Developer
    • View Profile
    • PaulsCode.Com
Re: My Minecraft mod assistant tool
« Reply #1 on: November 29, 2011, 06:03:21 PM »
I've never developed with the .net framework before (not even sure what it is - its own programming language?)  Do you know if it is possible to execute shell commands or link with Java, Perl, or c++ code (either directly or compiled into .dll or .jar libraries?)  If you can do any of these, then it should be possible to do the tasks programatically (at least I know the syntax for those four)
Device: Samsung Galaxy Nexus i515
CPU: TI OMAP4460, 1.2 GHz (dual core, ARM Cortex-A9)
GPU: PowerVR SGX540, 307 MHz
RAM: 1 GB
Resolution: 720 x 1280
Rom: omni-4.4.4-20141014-toro-FML KitKat 4.4.4, rooted

Device: Eee PC 1015PEM
CPU: Intel Atom N550, 1.5 GHz (dual core, x86)
GPU: Intel GMA 3150, 200 MHz (dual core)
RAM: 2GB
Resolution: 1024 x 600
Rom: android-x86-4.3-20130725 Jelly Bean 4.3, rooted

Offline Epic_bubble

  • long
  • ***
  • Posts: 235
    • View Profile
Re: My Minecraft mod assistant tool
« Reply #2 on: November 29, 2011, 06:59:11 PM »
I've never developed with the .net framework before (not even sure what it is - its own programming language?)  Do you know if it is possible to execute shell commands or link with Java, Perl, or c++ code (either directly or compiled into .dll or .jar libraries?)  If you can do any of these, then it should be possible to do the tasks programatically (at least I know the syntax for those four)

the .net framework is a microsoft thing, its used with visual basic, you can also use it the code in C#. And I think its possible to execute shell commands compiled as a .dll.

Ive been doing some searching and I found that there's a class I can use called GZipStream, apparently it doesn't work for unzipping jar files but I can get around that by renaming minecraft.jar to minecraft.zip, unzipping it, deleting the meta-inf file and re-zipping it, I can then rename the minecraft.zip back to minecraft.jar.

If I can get this to work my program will be alot more user friendly as they wont need to be promted to delete the meta-inf.

Also your name is in the credits of minecraft! haha yes minecraft actually has an ending now. :)
« Last Edit: November 29, 2011, 07:31:50 PM by Epic_bubble »
Device: Xperia play
CPU: Qualcomm 1 GHz Scorpion (Snapdragon)
GPU: Adreno 205
RAM: 512 MB
Screen res: 854 ? 480
ROM: stock android 2.3.4 rooted

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3491
  • Developer
    • View Profile
    • PaulsCode.Com
Re: My Minecraft mod assistant tool
« Reply #3 on: November 29, 2011, 07:39:16 PM »
Also your name is in the credits of minecraft!

Yes, I wrote the sound library.  Hope your idea works out.  If not and you figure out how to link with a .dll, I can write a simple one for you that does the unzip, delete, and re-zip.
Device: Samsung Galaxy Nexus i515
CPU: TI OMAP4460, 1.2 GHz (dual core, ARM Cortex-A9)
GPU: PowerVR SGX540, 307 MHz
RAM: 1 GB
Resolution: 720 x 1280
Rom: omni-4.4.4-20141014-toro-FML KitKat 4.4.4, rooted

Device: Eee PC 1015PEM
CPU: Intel Atom N550, 1.5 GHz (dual core, x86)
GPU: Intel GMA 3150, 200 MHz (dual core)
RAM: 2GB
Resolution: 1024 x 600
Rom: android-x86-4.3-20130725 Jelly Bean 4.3, rooted

Offline Epic_bubble

  • long
  • ***
  • Posts: 235
    • View Profile
Re: My Minecraft mod assistant tool
« Reply #4 on: November 30, 2011, 04:49:32 PM »
Also your name is in the credits of minecraft!

Yes, I wrote the sound library.  Hope your idea works out.  If not and you figure out how to link with a .dll, I can write a simple one for you that does the unzip, delete, and re-zip.

I didnt find a way of automating the deletion of the meta-inf but I did find a way to automate to download of the modded minecraft.jar file, rather than downloading it to the users default download location is now always downloads to the desktop, it also doesn't open a browser anymore. Since I can be sure the file is always saved in the same place I have added that code to the install button so the user now has one less button to click on (yay).

Also I made a mac version which was made using bash scripts which are put inside a launchable .app file, So it acts like any normal Mac program basically.

The Mac version is alot simpler and was heck of alot easier to make, It just prompts the user if they want to install ModManager, If they say yes then it does everything in a single click (even deletes the meta-inf) if they say no it just ends to program.

heres the bash script for the Mac version if anybody is interested:

Quote
cd ~/Library/Application\ Support/minecraft/bin
zip -d minecraft.jar META-INF/\* META-INF
mv minecraft.jar game.jar
cd ~/Desktop/
mv minecraft.jar ~/Library/Application\ Support/minecraft/bin

Im maintaing both versions here: http://www.minecraftforum.net/topic/828401-tool-automodder-install-or-uninstall-mod-manager-with-a-single-click/

Oh and thanks for the offer of creating the dll but I will try and get this to work myself, Its a nice learning experience. :)
« Last Edit: November 30, 2011, 04:54:35 PM by Epic_bubble »
Device: Xperia play
CPU: Qualcomm 1 GHz Scorpion (Snapdragon)
GPU: Adreno 205
RAM: 512 MB
Screen res: 854 ? 480
ROM: stock android 2.3.4 rooted