How to install SPC and WorldEdit in an old Minecraft version with the new launcher? [duplicate]

I've been using the new minecraft launcher to play and old version, beta 1.3. I would like to use single player commands but one of the mod files needs to go into the bin folder. The new launcher doesn't create a bin though, so what should I do? (Someone has probably already asked, but I have no idea how they would word it so I asked on my own :)


Solution 1:

My testing shows that although the version of 1.3_01 available through the launcher is compatible with SPC, it is not compatible with WorldEdit. Specifically, it appears to be unable to supply SPC with the necessary information to locate WorldEdit, no matter where it is put.

Initial testing

I tested this by creating a new profile and asking for version "old beta" 1.3_01. I changed the Game Directory option to add /betas/1.3_01 to keep it separate from the latest version's files. I ran it to check it was working, then went to .minecraft/versions/ and copied the b1.3_01 version folder to b1.3_01-SPC, made the edits to names and the JSON file to make it a valid version that the launcher could use, and then launched again to check it was working.

Then I installed SPC (version (1.3_01-BETA)SinglePlayerCommandsV2.5_1) by dropping the .class files into the b1.3_01-SPC.jar, and launched to check that SPC worked. It did.

Then I tried four different configurations of installing WorldEdit.jar, then launched the game and attempted to use the //chunk command. All four of these configurations failed the test:

  1. Game Directory set to add /betas/1.3 and put WE.jar in .minecraft/betas/1.3/bin/.

    This is where SPC should look for WE if it believes the Game Directory is the same as .minecraft used to be.

  2. Game Directory set to add /betas/1.3 and put WE.jar in .minecraft/bin/.

    This is where SPC should look for WE if it ignores Game Directory and looks in %AppData%/.minecraft/bin/.

  3. Game Directory set to add /betas/1.3 and put WE.jar in .minecraft/versions/b1.3_01-SPC/.

    This was tested on the thinking that the install instructions noted that "put it in bin/" meant to put it in the same folder as minecraft.jar. I thought it unlikely, but worth testing.

  4. Game Directory left to its default ([...]/.minecraft) and put WE.jar in .minecraft/bin/.

    This is where SPC should look for WE if it ignores Game Directory and is hardcoded to look at .minecraft/bin/ for WorldEdit.jar. I was shocked when this failed.

The results of these tests lead me to believe that SPC for 1.3 uses some code to ask Minecraft where the bin folder is, and further, I suspected that the version of beta 1.3 available through the launcher has been altered to understand the new .minecraft folder layout changes, in particular the ability to specify the Game Directory and the change in the location of the .jar file and platform libraries. If beta 1.3 downloaded by the new launcher is not the same as beta 1.3 that was originally released, then it's entirely possible that the way SPC queries for the location of bin is no longer working in the launcher-provided version.

Confirming my fears

To test this supposition, I went looking in my jar backups for a beta copy of Minecraft to compare. I don't have a backup of 1.3_01, but I do have a backup of 1.8. I asked the new launcher to install beta 1.8, then did a binary comparison on the two files and yes, they're different. Mojang has updated the betas (and probably alphas) in order for them to use the new folder layout and launcher options, which has apparently broken whatever mechanism SPC used to load WorldEdit in the original older versions.

Two possible solutions, one hard, one unlikely

Therefore, in order to use WorldEdit with an old beta, either you will have to go and find a backup of 1.3_01 and use that, or the SPC author will have to go back and rewrite the old versions of SPC and WorldEdit for compatibility with the "new" old Minecraft versions – which is highly unlikely to happen, of course.

To get an original b1.3_01 minecraft.jar legitimately, you will either need to have made a backup of it before, or use MCNostalgia. Unforunately, MCNostalgia hasn't been updated since Minecraft 1.4.7, and because of the way it uses an existing legitimate minecraft.jar as a base to apply binary diff patches to recreate an older version, you will still need a backup of an original minecraft.jar version 1.4.7 or earlier in order for MCNostalgia to work and generate a valid b1.3_01 minecraft.jar. Hopefully you have a backup of some version earlier than 1.5 that you can start from.

Solution 2:

For the majority of mods anything you used to do in the bin folder should now be done in in the versions>x.x.x folder.

Singleplayer commands however still specifically looks in the bin folder for the worldedit.jar. You should simply create a new folder in the .minecraft directory, name it "bin", and place the file in there. It doesn't matter that there's nothing else.