Here's a guide to do the setup of the BTW source code for development:
This guide will show you how to patch the BTW Sources into a decompiled 1.5.2 VMC environment using MCP and Eclipse. This guide was written using a win10 machine but can be very easily be adapted to OSX/Linux machines.
First we need to download and install a bunch of development stuff:
Now we must be sure that we have everything setup and ready to go:
- Download BTW Source and Patches and unzip
- Download The last BTW version released.
- Download MCP751 (link from the wiki) and unzip
- Download the 1.5.2 VMC Client and rename it to
- Download the 1.5.2 VMC Server and rename it to
- Download and appropriately rename (remove the version numbers) the:
- Download the jinput natives for windows. (OSX/Linux links are on the wiki) Extract the .dll files from the jar. (I personally use 7-zip)
- Download the lwjgl natives for windows. (OSX/Linux links are on the wiki) Extract the .dll files from the jar. (I personally use 7-zip)
In the mcp751 folder, make a new folder in 'jars' called 'bin' and another new folder in that 'bin' folder called 'natives'.
Now we copy over all the above files to setup our MCP folder structure as follows:
Now we setup our MCP folder structure as follows:
Code: Select all
└───mcp751
└───jars
│ minecraft_server.jar
│ server.properties
│ servers.dat
│
└───bin
│ jinput.jar
│ lwjgl.jar
│ lwjgl_util.jar
│ minecraft.jar
│
└───natives
│ jinput-dx8.dll
│ jinput-dx8_64.dll
│ jinput-raw.dll
│ jinput-raw_64.dll
│ jinput-wintab.dll
│ lwjgl.dll
│ lwjgl64.dll
│ OpenAL32.dll
│ OpenAL64.dll
Next we get to pull sounds from an existing 1.5.2 install. Simply run the minecraft launcher, create a 1.5.2 instance and run it at least once to the start menu. Then navigate to '
%AppData%\Roaming\.minecraft\resources' and copy the '
/resources/' folder and its contents over to '
/mcp751/jars/'.
Now we get to tell minecraft how to name and texture all these BTW blocks and items that we're about to patch in. We need to get a bit old school and directly mod the jar files here.
- Copy the following folders and their contents from BTWMod4-B0000003.zip/MINECRAFT-JAR/ into the mcp751/jars/minecraft.jar.
- btwmodtex
- lang
- textures
- title
- Delete the META-INF folder from the mcp751/jars/bin/minecraft.jar.
- Copy the BTWMod4-B0000003.zip/MINECRAFT_SERVER-JAR/lang folder and its contents into the mcp751/jars/bin/minecraft_server.jar.
Now we have the environment setup and ready to decompile. Run the '
mcp751/decompile.bat' file and wait 1-30 minutes for it to complete.
Now open Eclipse and point it at the '
/mcp751/eclipse' folder.
When Eclipse has loaded, in the Left Panel Labeled '
Package Explorer' open '
Client > src ' and right click '
net.minecraft.src > Team > Apply Patch..'
Browse for the file located '
FCMod4-B0000003Src\Src\patch.txt' and click Next. Be sure the '
Client > src > net > minecraft > src' folder is selected then click Next.
At the top, select the '
Reverse patch' button to make all the red boo boos go away. Click Finish.
--------------------------------
Again in the Left Panel Labeled '
Package Explorer' open '
Client > src ' and right click '
net.minecraft.client> Team > Apply Patch..'
Browse for the file located '
FCMod4-B0000003Src\SrcClient\patch.txt' and click Next. Be sure the '
Client > src > net > minecraft > client' folder is selected then click Next.
At the top, select the '
Reverse patch' button to make all the red boo boos go away. Click Finish.
--------------------------------
Finally in the Left Panel Labeled '
Package Explorer' open '
Server > src' and right click '
net.minecraft.src > Team > Apply Patch..'
Browse for the file located '
FCMod4-B0000003Src\SrcServer\patch.txt' and click Next. Be sure the '
Server > src > net > minecraft > src' folder is selected then click Next.
At the top, select the '
Reverse patch' button to make all the red boo boos go away. Click Finish. (Getting Deja-vu yet?)
Now that the BTW patches have been applied to the VMC source we must copy over the BTW sources. In Window's File explorer:
- Copy all the contents of 'FCMod4-B0000003Src\Src\' (except for patch.txt) to 'mcp751\src\minecraft\net\minecraft\src'
- Copy all the contents of 'FCMod4-B0000003Src\SrcServer\' (except for patch.txt) to 'mcp751\src\minecraft_server\net\minecraft\src'
Finally to wrap everything up in a pretty little bow we must tell MCP and Eclipse that we have a baseline dev environment setup and ready to roll.
In Eclipse click '
Project > Clean..' and be sure the '
Clean all projects' box is checked before cleaning. Progress will be displayed in the bottom right hand corner of Eclipse.
Exit/Close Eclipse after it has finished cleaning/building and run the '
mcp751/recompile.bat' followed by the '
mcp751/updatemd5.bat' scripts. Further information may be found on
the wiki.
:) Now go make some crazy shit!