Hacking is altering software in order to make it work in a way not originally intended. It is not be confused with 'Cracking' - the process of forcing entry into a network or unit over which you have no right.
In Minecraft, hacking refers to using a memory editor in order to alter the variables which the Minecraft java application is storing on your computer. This allows you access to blocks not usually available.
Legality
It should be noted that hacking is only appropriate in single player mode, and attempting it on a multiplayer server will result in the software kicking you from the room.
Note that some software such as wrappers might not kick you. Alas some custom servers will not kick people for these hacks either.
Method
- Pull out Cheat engine or another memory editor.
- From the PROCESSES List, select 'java.exe' (Normally found at the bottom)
- In minecraft, make sure you have the first block in your UI as stone.
- Scan for the exact value 1
- Go to minecraft and change the first block in the UI to cobblestone.
- Scan for the exact value 4
- Go to minecraft and change the first block back to stone
- Repeat step 4
- This should yield one or two addresses. Pick one (or both) and change the value to one of the following material locations given underneath.
Block memory locations
0: Air 1: Rock 2: Grass 3: Dirt 4: Cobblestone 5: Wood 6: Sapling 7: Adminium 8: Water 9: Stationary water 10: Lava 11: Stationary lava 12: Sand 13: Gravel 14: Gold ore 15: Iron ore 16: Coal ore 17: Tree trunk 18: Leaves 19: Sponge 20: Glass 21 through 36: Cloth tiles of various colors 37: Flower 38: Rose 39: Red mushroom 40: Brown mushroom 41: Gold 42: Iron (honestly!) 43: Double stone slab 44: Single stone slab 45: Red brick tile 46: TNT 47: Bookshelf 48: Moss covered cobblestone 49: Obsidian 50: Torch 51: Fire 52: Infinite water source
Any selections above the highest block number will freeze your game due to the fact that there are no blocks to fill the slots for those numbers yet.
Consequences
Trying to do this will result you in getting banned/kick/ipbanned in multiplayer servers, though the server will know when you're cheating/hacking. It'll say "Cheat detected: Tile type" and will reset everything back to normal, so it only works in Single player.