Minecraft Blogs / Tutorial

How to get command blocks in the creative inventory

  • 3,382 views, 0 today
  • 3
  • 0
CaptainSonicYT
Level 22 : Expert Engineer
4
Please note that doing /give @p command_block is way simpler than getting it in the creative inventory. This works if cheats are not enabled on a server, and you are in creative mode.

In this tutorial, I will explain how to get command blocks in your creative inventory, without typing in any commands in the Minecraft chat. Please note that this will only work on servers that have command blocks enabled (please use this for "good guy" purposes!).


STEP 1: Download MCP
Minecraft Coder Pack (MCP) allows you to make modifications to the game. It is completely legal, and you can get it at http://www.modcoderpack.com/website/releases. Pick whatever MC version you want. Extract the zip folder wherever you like. There is a lot of freedom in this tutorial!


STEP 2: Decompile Minecraft
Using the folder which you extracted the files from, you will need to open a certain file called "decompile.bat". The extension visibility depends on your view settings.
How to get command blocks in the creative inventory

STEP 3: Locate the command block source code!!!
Go into the folders in this order: src->minecraft->net->minecraft->block. When you're there, open BlockCommandBlock.java in any text editor or code editor. Next is the fun part. At the beginning of the file, you should see a bunch of lines that say "import" and then something else. Right after those lines, add (without quotes) "import net.minecraft.creativetab.CreativeTabs;". Now, look for the line of code that begins with "this.setDefaultState". Go to the end of that line, and add this line: "this.setCreativeTab(CreativeTabs.REDSTONE);" Don't forget the ";"! Hit save, then go all the way back to the main folder, and open a file named "recompile.bat". If you got any errors, go back and make sure your indenting is correct, and you imported the creative tabs, and you remembered to use the ";". When it's done, hit "startclient.bat" to start the test version of Minecraft. Go into the dev world, and go to the redstone tab. You should see something like:
How to get command blocks in the creative inventory
If your creative inventory has the command blocks, you are ready for the next step! (You have to add it to the launcher!)

STEP 4: Adding to the launcher
Open the file named "reobfuscate.bat" and wait. When it is done, look in the "reobf" folder and move the window to the side. Now go to "%appdata%\.minecraft\versions" and have the folder depending on your version choice selected. Copy that folder, and rename it to "xXCaptainSonicXx is awesome"! HAHAHA! Ok, the name doesn't really matter, as long as you can remember the name of it. In that folder, there are two files. "1.X.X.jar", and "1.X.X.json".Then rename both the jar and the json files to whatever the name of your folder is.Open the json file in any text editor (word pad?), and copy and paste the text at http://pastebin.com/0bKm1BG9. This is a replacement for the old one, partly so that the pesky launcher doesn't overwrite your custom Minecraft. Change the "id" to the name of your folder. Hit save. Now open the jar file in WinRaR, or something else. It will look like a whole bunch of mess! Click and drag that file in the reobf folder (that you put to the side) to the WinRaR window to place it in the jar. Make sure it overwrites the existing one! And make sure to delete the META-INF folder.

STEP 5: Play! THAT'S IT!!!
Close and reopen your launcher, if it's already open. Click edit profile and click the current version for a dropdown menu. Look for the name of your folder. Hit save, then the play button. You can take it from here.


Please note that I created this tutorial from my own experiences. I did not copy from a different tutorial. And I'm not responsible if you get banned from any servers by using this the "bad guy" way!
And I pick the keywords based upon what some people are looking for. I added the keywords for more views. I really don't want you to use this as a cheat or a hack, but it's your choice!
Tags

Create an account or sign in to comment.

Welcome