Give and Take Blocks

1.6K 3 4
                                    

How to use command blocks to give and take blocks from players.

Here is the start of a guide about how to use command blocks in the Minecraft PC edition.This section goes over the basics as well as showing how to use /give and /clear.I apologise for any spelling and block ID mistakes I made.

How to use a command block

To get a command block in single player,you MUST be in creative, if you are in survival mode with cheats on it will not work.

To get a command block,type

/give <player name> 137 (quantity)

-Note the brackets on the name are not typed

-137 is essential,more block IDs can be found on the minecraft wiki.

Once you have your command block you should place it down in an open space easy to use with redstone.

Before we start setting commands and the like we need to understand what a command block is.

-A command block is activated by power sources i.e redstone

-It does NOT allow you to do any more commands than normal,instead it can be used to carry them out without the player having to type.

Basic Guide #1-How to give and clear items.

If you are not experienced with commands then you will know at least how to use the /give command as it is necessary in obtaining a command block.

So,first we want to click on the command block and a box should come up and some text about target players. Ignore that,we'll get onto it later.

Into the command block we want to type /give <player name> .Then we can choose what item we want to give ourselves and find out it's ID.

-Note there are several items that are obtainable through commands that are not obtainable by the creative inventory.

We will start with something basic like water (ID 8). So,into your command block type /give <player name> 8 and then after a space add a 10 for quantity.Press done and there should be a message saying "command set" followed by your command.

But this will not make your command block do anything.You need to provide a source of energy for it to work, I recommend placing a pressure plate by it to start with.

Now step on the pressure plate and-poof- we have our water.With that technique you could put in a command giving you diamonds (ID 264)then switch to survival.

As this is creative,we can place the water all we like but it won't dissapear from our inventory unless we go to "survival inventory" and drag it to the cross, a rather crude method.

So we can set down another command block and into it type the command /clear <player name> 8.

When activated this will without doubt erase your inventory of water.We will leave quantities for later,but using these basic commands /give and /clear we can make traps and clever ways to both foil and aid players in adventure maps.

From TheObsidianFish

You've reached the end of published parts.

⏰ Last updated: Nov 05, 2013 ⏰

Add this story to your Library to get notified about new parts!

Minecraft How to use command blocksWhere stories live. Discover now