Minecraft Blogs / Tutorial

Only One Command Block Combiner Tutorial 1.9

  • 3,966 views, 2 today
  • 3
  • 1
  • 5
FixedGrey's Avatar FixedGrey
Level 12 : Journeyman Miner
1
Hello! I am FixedGrey, and I was recently searching for a way to make my own one command block creations in MineCraft 1.9. I had built the contraption, but I didn’t know how to compress it into only one command. Online, I found some videos, but none were especially helpful to me. I also found a command block combiner by mrgarretto, however it is restricting as to what you can make with it because I couldn’t choose the layout that best suited my command creation. So, for the next week or so I looked up many different people’s creations and learned for myself how to combine many blocks into one command. I have finally figured out a relatively easy way to compact command block creations, and I decided to make a tutorial to help other people learn to combine their own creations. This method also works for combining entire buildings and structures (not just command block contraptions) in one command, which may also be useful to some of you.

All pictures that I mention in this tutorial can be found here.


Before you start, make sure you consider the following: combining commands can be rather time-consuming, so make sure you set aside some time for this project. The more stuff you are trying to combine, the longer it will take. Also, this tutorial will require you to know some basics about command blocks, and it will require you to do some spacial thinking of your own. Finally, if you are a super-genius and have created a huge command block contraption, please note that there is a limit to how many characters a command block can fit in it. I will not be covering in this tutorial what to do if you do reach the limit, but because you are a super-genius I am sure you can figure it out.


Also, before I continue, I would like to make a disclaimer. The ideas which contributed to my method of compacting commands are mostly taken from other people on the internet. I don’t have a list of the names of these people because when I was researching I wasn’t planning on making a tutorial. My point is, the method which I am showing here is partly the work of other people, however this tutorial is completely my own. Now, let’s get on with the tutorial.


The first thing you need to do is make your contraption. Keep in mind that the more compact and simple it is, the easier it will be to combine. Here is my example contraption that I will be using as examples throughout the tutorial.


Refer to the picture of the contraption


Pick a place where your command block will be located, and place it down. Two blocks above that command block, place another block. (Choose something which stands out, like a diamond block.) It should look something like this:


Refer to the picture of the diamond referance block


This diamond block is where everything will be placed RELATIVE to it. What will eventually happen is several command block minecarts will be summoned in that location and will use /setblock or /fill to create your contraption.


If you have any command blocks which you want to only be activated once right after the contraption is created, DO NOT build these in your structure. These commands will not use /setblock to be created: instead, they will be activated as one of your minecart command blocks. Doing this is much simpler, and it makes the command shorter, too. An example of a command which will be only activated once could be creating a scoreboard objective or giving the player an item. We will call these INITIAL COMMANDS because they will be activated initially and then never again. Other commands which will be activated more than once will be called REPEATING COMMANDS.


Open a document or text editor on your computer. It is important not to write the command inside of a command block, as it will be too crowded and will make the process much harder.


In your document, start writing /fill or /setblock commands to place down any blocks which ARE NOT command blocks. This could be something like a container which you have around the command block, or a lever to turn your machine on or off, etc. If you don’t have any blocks like this, (i.e. your contraption consists of only command blocks), then you can continue on to the next step. Remember, your x, y, and z coordinates should be RELATIVE to your DIAMOND BLOCK, not your command block. It should look something like this:


Refer to the picture of the container and the picture of the fill commands


Now would be a good time for me to tell you that the order in which you write your commands will be preserved when you combine them. For example, if you want to fill a square with iron blocks AND THEN set the middle block to a gold block, write the /fill command before you write the /setblock command, and the /fill command will run first. This “preserving the order” applies throughout this entire tutorial, so keep that in mind.


Refer to the picture of the iron block square with a gold block centre titled "order of commands"


By this time you should have written out /setblock and/or /fill commands which will create your entire structure (except for the command blocks). Now, remember those initial commands that we talked about? Write those after the /setblock and /fill commands which you just made.


Refer to the picture of the fill and initial commands


Now it’s time to /setblock the command blocks. Remember, these should be repeating commands, not initial commands. Because this is 1.9, your commands probably look something like this, with one repeating command block followed by a bunch of chain command blocks.


Refer to the picture of the repeating and chain command blocks


Here’s the syntax of how to use setblock to make a command block (I’m using a /give command as an example):


/setblock ~x ~y ~z command_block 0 replace {auto:1b,Command:give @p cookie}


So what does this all mean? Well, the ~x ~y ~z should be self-explanatory (remember, in your actual creation it will be relative to the diamond block). After that, it says “command_block”. This will place an impulse command block, but you probably want a repeating or chain command block. If you do, replace “command_block” with “repeating_command_block” or “chain_command_block”. The “0” represents two things: which direction the command block will be facing, and if it is conditional or unconditional. Here’s what each number means:

  • 0 - Unconditional, facing down
  • 1 - Unconditional, facing up
  • 2 - Unconditional, facing -Z
  • 3 - Unconditional, facing +Z
  • 4 - Unconditional, facing -X
  • 5 - Unconditional, facing +X
  • 8 - Conditional, facing down
  • 9 - Conditional, facing up
  • 10 - Conditional, facing -Z
  • 11 - Conditional, facing +Z
  • 12 - Conditional, facing -X
  • 13 - Conditional, facing +X



Next, “replace” is just some syntax, don’t worry about that. The “auto:1b” part determines if the command “needs redstone” or is “always active”. Leave it as “auto:1b” for “always active”, and if you want it to be set as “needs redstone” then take out “auto:1b” altogether. (With “needs redstone”, the command should say “... replace {Command: …”). After that, just paste in your command where my example says “give @p cookie”.


Phew! Now that that is done, you can write your commands for all of your repeating commands. Remember (again) that the coordinates are relative to the diamond block.


Refer to the picture of the setblock commands


We’re close to being done: we have all the commands that the minecarts will run! The hard part is over, believe it or not. The next part contains a lot of copying and pasting, so it can get a bit tedious at times, but hopefully it’s not too bad.


Copy and paste the following bit of text into your document. It is the start of THE FINAL command. (Aren’t you excited?)



summon FallingSand ~ ~1 ~ {Time:1,Block:redstone_block,Passengers:[{id:FallingSand,Time:1,Block:activator_rail,Passengers:{id:MinecartCommandBlock,Command:gamerule commandBlockOutput false},



If you aren’t interested about what that text does, you can skip this paragraph. For those who are interested, it summons a falling sand entity right above the command block, and that falling sand is actually a redstone block. Riding the redstone block is more falling sand which is an activator rail, and it will get powered by the redstone block. Riding the activator rail is the first minecart, which turns commandBlockOutput off, so the chat isn’t clogged up with annoying text.


Now, you probably want to copy and paste this bit of text into your document, because you will be needing it A LOT.



{id:MinecartCommandBlock,Command:},



After the colon and before the curly brackets in “Command:},” you will insert your first command. Remember when I told you about “preserving the order” of the commands? This method automagically runs the commands in the order which they appear, which will probably be useful for more advanced contraptions. After you have pasted your first command, copy the “{id:MinecartCommandBlock,Command:},” bit again and paste it after what you just put in. Then paste your second command in the same spot. Do the same for the third command, and the fourth one, and the fifth one… Do you also remember when I said something about it being tedious and time-consuming? Unfortunately, I was referring to this part.


After you’ve finished, you’re pretty much done! Just copy this last bit and paste it at the end of your command.



{id:MinecartCommandBlock,Command:setblock ~ ~1 ~ command_block 0 replace {auto:1b,Command:fill ~ ~-2 ~ ~ ~ ~ air}},{id:MinecartCommandBlock,Command:kill @er=0,type=MinecartCommandBlock]}]}]}

NOTE: For some reason, planet minecraft is being buggy, there should be a "[" between the "e" and the "r" near the end of that last bit.



Again, for those who are interested, this summons two more command block minecarts. The first one creates a command block directly above all the minecarts which will, after one tick, fill the redstone block, activator rail, and itself with air blocks. The second minecart kills all of the command minecarts which were summoned.


Your command should look something like this:


Refer to the picture of the final command


There! You’re done! The last thing you probably want to know is that if you want to delete the original command block after it has done its thing, change the 2 to a 3 in the last bit of text that I gave you. (Where it says “... Command:fill ~ ~-2 ~ ~ ~ ~ air ...” Change that 2) Also, you have to have a few blocks of air above the command block, so delete that diamond block before you try to activate it.

I hope you’ve learned something today, and I hope you’re all able to compact your creations into only one command block! If you didn’t fall asleep during this process, congratulations as well. I can’t wait to see all of your one command contraptions.
Tags

Create an account or sign in to comment.

8o9wer
03/20/2016 11:01 pm
Level 1 : New Miner
8o9wer's Avatar
Im getting unbalanced curly brackets when i fix the brackets.
1
TheMagic_Axe
03/06/2016 11:49 pm
Level 7 : Apprentice Explorer
TheMagic_Axe's Avatar
THANK GOD I FOUND IT
Right here, please fix this

Right there -> [{id:MinecartCommandBlock,Command:gamerule commandBlockOutput false},
1
TheMagic_Axe
03/06/2016 11:46 pm
Level 7 : Apprentice Explorer
TheMagic_Axe's Avatar
If you srill read this, There is one missing [ please help I worked on this for 48 hours and can find where ir is missing
1
Invinci_
01/15/2016 8:46 am
Level 1 : New Crafter
Invinci_'s Avatar
I just finished my first 1 command creation yesterday, and also found the command combiner unsuitable. I just used mrgarretto's structure to command mcedit filter and then edited that. 
I think you made a little mistake in the last command, you missed the square brackets around the r=0 after @e.
1
FixedGrey
01/15/2016 5:57 pm
Level 12 : Journeyman Miner
FixedGrey's Avatar
I did, thanks for catching that!
1
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome