Welcome to my first tutorial!
I am not going to give you the variables! (skids must learn!)
So for the first peice of code you want to go to 'EntityClientPlayerMP' and paste this code inside:
Code:
int var5000 = (int)mc.playerController.getBlockReachDistance();
if(yourvarclass.yourvarmod)
{
for(int x = -var5000; x < var5000 + 1; x++)
{
for(int z = -var5000; z < var5000 + 1; z++)
{
for(int y = -var5000; y < var5000 + 1; y++)
{
int e = (int) posX + x;
int f = (int) posY + y;
int g = (int) posZ + z;
if(mc.theWorld.getBlockId(e, f, g) == mods.blockID)
{
this.sendQueue.addToSendQueue(new Packet14BlockDig(0, e, f, g, 0));
this.sendQueue.addToSendQueue(new Packet14BlockDig(2, e, f, g, 0));
}
}
}
}
}
And for the second part you want to go into 'PlayerControllerMP' and find 'public void clickBlock' (press CTRL+F and then just paste that in)
Then call that from the top of the void:
Code:
if(yourvarclass.yourvarmod)
{
yourvarclass.blockID = mc.theWorld.getBlockId(par1, par2, par3);
}
Hint: the yourvarclass.blockID is an integer.