How to make your first hacked client, the bandits way.
NOTE - This is for windows. I will make a mac tutorial later on.
-----------------------------------------------------------------------
This includes:
-how to setup mine craft code(r) pack(mcp)
-how to setup eclipse
-how to setup your hack
-how to create your first hack
-how to use your hack
-----------------------------------------------------------------------
Setting up mine craft code(r) pack(mcp):
1-Download mcp from the mcp wiki
NOTE - due to no outside linking, I cannot link where to get it.
2-When you finish downloading it, You should get a screen that shows all the files. The ones your going to mostly focus on are
-cleanup.bat / cleanup.sh
-decompile.bat / decompile.sh
-reobfuscate.bat / reobfuscate.sh
-updatemcp.bat / updatemcp.sh
3-Transport the files to a folder you choose. I named mine, "SimpleCraft".
4-Now get a clean install of the bin folder and the resource folder and drag them into "jars".
-To get there, do %appdata% and go to the .minecraft folder and simply copy the bin and resources folder.
5-Once you have finished that. Run updatemcp.bat to make sure mcp is fully updated.
6-Now, Run decompile.bat. Answer "Yes" To everything.
-You will get a server jar error. Do not worry about this because you are making a client, not a server mod.
7-Now you are ready to get eclipse up and running.
-----------------------------------------------------------------------
Setting up eclipse
1-Download eclipse
NOTE- I cannot post external links so you will have to google for it
2-Now put it anywhere you like and run it.
3-When it asks for workplace put it to:
(/<foldername>/eclipse)
Example
/SimpleCraft/eclipse
4-Your done, Now let it load and your set to make your first hack
-----------------------------------------------------------------------
Setting up your hack
1-Make your way to GUIingame, You should see a code right in the beginning, after the package code. You should see this code:
Code:
import java.aw*****lor;
import java.util.ArrayList;
import java.util.Random;
import net.minecraft.client.Minecraft;
import org.lwjgl.opengl.GL11;
Now you would want to enter this:
Code:
import java.aw*****lor;
import org.lwjgl.input.Keyboard;
import java.util.ArrayList;
import java.util.Random;
import net.minecraft.client.Minecraft;
import org.lwjgl.opengl.GL11;
What this does is just make a interface.
2-Scroll down to:
Code:
public class GUIingame extends GUI
Now just press enter and enter this
Code:
private boolean keyStates[];
This means we have done a way for it to be true or false.
3-Scroll down further til you see a bunch of codes that say fontRenderer and gl11 pop matrix (Something around those lines)
Then your ready to make a "watermark". To do this, Make a "else" statement then put in the code.
Code:
{else
drawStringWithShadow("SimpleCraft", 2, 12, 0xffffff);
Now, The 1st number(2) means the x location, and the 2nd number(12) means y location. 0xffffff is the color.
4-Now what we want to do is make a new class file. To do this just right click on any class file and click "New" then class file. Next you want to write what the name is. I will name it hacks. Now once we get into the code, It should look like this
Code:
import net.minecraft.src;
public class hacks{
}
Now what you want to do is add a new static boolean. To do this just write
Code:
static boolean fullbright;
I am using full bright as a example. You can change this to any name you want. After that it should look like this
Code:
import net.minecraft.src;
public hacks{
static boolean fullbright;
}
5-Next we want to do is under where we wrote the fontRenderer code, write this
Code:
if(checkKeyboard(KEY_C))
{
hacks.fullbright = !hacks.fullbright;
mc.renderGlobal.loadRenderers();
}
Now what this does is just say what key you need to press for it to work and the mc.render part just forces a render. Now what were doing now is the actual code.
6-The actual code part. The first thing were going todo is go to GUIingame and then were going to make a word on the screen that shows if full bright is on or off.
Code:
if(hacks.fullbright)
{
fontrenderer.drawStringWithShadow("FullBright = ON", 2, 24, 0xfffff);
}else
fontrenderer.drawStringWithShadow("FullBright = OFF", 2, 24, 0xfffff);
Next thing were going to do is go to block.java and search for brightness till you get something like this.
Code:
float getBlockBrightness(IBlockAccess iblockaccess, int i, int j, int k)
{
return iblockaccess.getBrightness(i, j, k, lightValue[blockID]);
}
Then were going to make a if statement.
Code:
float getBlockBrightness(IBlockAccess iblockaccess, int i, int j, int k)
{
if(hacks.fullbright)
{
return 1000F;
}else
return iblockaccess.getBrightness(i, j, k, lightValue[blockID]);
}
Next were going to do the same thing but remove the F to the lower part of the code. The part where it gets the MixedBrightness For the block.
Code:
{
if(hacks.fullbright)
{
return 1000;
}else
return iblockaccess.getBrightness(i, j, k, lightValue[blockID]);
}
Now that your done with the code, Press the Green Arrow on top of eclipse to launch mine craft and test it. Now I will teach you how to get the class file and insert it to your mine craft.
-------------------------------------------------------------------
Getting the class file.
All you have to do is run the file called reobfuscate.bat and go into the folder called reobf once you are done running the file.
--------------------------------------------------------------------
This has been my first post / thread and I done this all out of memory to help you all who are having trouble. If you guys get errors please post them on this thread and I will do my best to fix them. (Probably just careless mistakes I did if I did any.) If I helped you, Press the thanks button.
---------- Post added at 12:12 PM ---------- Previous post was at 12:10 PM ----------
-Reserved for X-ray hack and Mac guide-