Making basic minecraft hacks

Posts 1–9 of 9 · Page 1 of 1
Creating a Basic Hacked Client [Part 2]
Before you do any of the following, read this post first. (unless you already have a client base)

1. We're going to make a new class. I will name mine varHacks. In this class, we will make a public static void called update(). This void will control most of our hacks. But before it can control them, we need to call it. In GuiIngame, after the title of your client, put "YourFileNameHere.update();".
This will call the void "update" that we just made.
 
1.

 
New File



 
Calling our void

See how it's under the client name? You can put it anywhere in defined area from the first tutorial post.

This calls the void we made.



2. In the update class (picture) you'll see we called a void called basicUpdate(); Create that void under update(); This new updater will be our void dedicated to mods that do not require separate voids like a nuker, auto dig bot, or kill aura. We're going to put our full bright code from before into this new void.
 
New baseUpdate()




3. Now to add more hacks. I'll add a timer and a step hack. Just like our full bright code, we will a if statement for both of the hacks. In the if statement, we will add these lines. Don't forget to add booleans and checkkeys for these.
 
These Lines




4. Time for climb!
 
Climb

Climb is really easy. Add your boolean / checkey.
Then head over to EntityLiving and find the public boolean isOnLadder.
Just add:
Code:
if(var.climb)
    	{
    		return true;
    	}


5. Now to make an Xray. Add a boolean and checkey as usual. First, go to the fullbright code. Where it says "if(var.fullrbight)" change it to "if(var.fullbright || var.xray)". This is will make sure that the blocks are bright without having to edit the block brightness code in the block class.
Also, make sure each time that xray is toggled it also does "mc.renderGlobal.loadRenderers();". Without this, xray will only show up after chunk updates.
Now, head on over to block.
We're going to need to change a few things.
 
Block Changes

First, we need to change how blocks render.
 
Changing renderAsNormalBlock()



Then under "shouldSideBeRendered" we will have only the blocks we list rendered. To make this easy, make an array of the block ID's you want in your boolean class.
 
Xray ArrayList



Now, put that code in "shouldSideBeRendered" and you're done!
 
Returning the arraylist





6. Fastbreak!
 
Fastbreak

As usual, create a booleana and checkkey for fastbreak.

Navigate to "onPlayerDamageBlock" inside PlayerControllerMP.java.
Find the section that looks like this: (But not exactly. I'm using a snapshot instead of 1.4.6, but they're nearly identical)
Code:
if (this.curBlockDamageMP >= 1.0F)
                {
                    this.isHittingBlock = false;
                    this.netClientHandler.addToSendQueue(new Packet14BlockDig(2, par1, par2, par3, par4));
                    this.onPlayerDestroyBlock(par1, par2, par3, par4);
                    this.curBlockDamageMP = 0.0F;
                    this.stepSoundTickCounter = 0.0F;
                    this.blockHitDelay = 5;
                }
All you need to do if make another if statement with your fastbreak variable.
 
if(fastbreak...)





7. Adding nofall.
 
NoFall

Set up your checkey and boolean. Then open the classes "Packet11PlayerPosition", "Packet12PlayerLook", "Packet13PlayerLookMove"
In these classes, there's a line that they all share. " this.onGround = par(RandomNumber);"
using if/else statements, have these set to false and their default when nofall is toggled. Do this in each class and you're done.


8. Adding on to the GUI so we can easily remember what is on and off.
 
GuiIngame


It skips 34 because I made a derp edited the picture.


9. Done
 
Done :D



Nice tut!
Nice tut you got there....
Excuse me, but I'm kind of new to this, and was wondering if you could help me out a bit.
It seems that Eclipse is recognizing this as a synthax error.
Quote Originally Posted by Insanity_Ward View Post
Excuse me, but I'm kind of new to this, and was wondering if you could help me out a bit.
It seems that Eclipse is recognizing this as a synthax error.
 
Big Image of error
You need to create the void basicUpdate();

The error its giving you is that you are calling a non existant void.

So to fix the problem, add this below the update() function:
Code:
public static basicUpdate()
{
   //insert basic hacks here
}
The purpose of update is to call voids that are better made with their own voids, but for those that need simple if statements, we use basicUpdate().

Edit: I took a look into 1.5's pre-release code... a lot of the more complex hacks will have to be changed :| (We'll worry about that late this week when it actually is released)
Okay, so I've done what you said, but now it's spouting another error. (The ones that are in bold are the errors). I've tried removing the void, but then it tells me that static's the error.

Code:
 
{
	public static Minecraft mc = Minecraft.getMinecraft();
	public static void update()
	{
		public static void basicUpdate()
		{
			//STUFF
		}
	}
}
*Edit: Italic didn't show so well
Quote Originally Posted by Insanity_Ward View Post
Okay, so I've done what you said, but now it's spouting another error. (The ones that are in bold are the errors). I've tried removing the void, but then it tells me that static's the error.

Code:
 
{
	public static Minecraft mc = Minecraft.getMinecraft();
	public static void update()
	{
		public static void basicUpdate()
		{
			//STUFF
		}
	}
}
Huh, well it's supposed to be:
Code:
public static Minecraft mc = Minecraft.getMinecraft();
	public static void update()
	{
		 basicUpdate();
	}
        public static void basicUpdate()
	{
		//STUFF
	}
Posts 1–9 of 9 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us