Minecraft Blogs / Tutorial

Command Blocks for Mapmaking - The Basics

  • 2,533 views, 1 today
  • 5
  • 1
ShadowDestroyer5's Avatar ShadowDestroyer5
Level 35 : Artisan Dragon
51

Command Blocks for Mapmaking


I will be going over a few useful command block commands for map making. First off, do
/give YourUsername minecraft:command:block
Shift click on it with a button for easy testing.

@

There are a few things related to @. @p, which goes to the nearest player, @r to a random player, @a to all players, and @e for enitities. Generally, you'll want to use @a, even if it's a singleplayer map in case multiple people play.

Communicating with the Player

There are a few ways to communicate with the player. The easiest way is with signs, but those don't look very professional.

One of the easiest ways to send messages the players
is to use

/tell @a This is a tutorial


This will show a whisper message though, so it's not great.

A very cool way to talk to the player is by sending them a custom book using

/give @a written_book 1 1 {title:Tutorial,author:"SD5",pages:[TagString:"This is page one!","This is page two!"]}


You can choose whatever you want for the title. The author can be anything, but remember to keep it in quotes! For the writing in the book, put something in "s. To add more pages, add a comma, and then more quotes.

Basic Mobs

To make a mob spawn, you could easily use dispensers, but the player could rob them, and they'd run out at some point. You can also use the
/summon command. To use /summon, you do

/summon (Mob name)


You can see what you can spawn by typing /summon in chat and hitting tab. You will see that there is some cool things you can summon such as lightning, ender dragons, wither bosses, and giants. You'll also notice that all names start with a capital letters and 2 words have no spaces and they look like this

PigZombie


You can go even further from there. You can do this too

/summon Cow ~ ~ ~


This will make a cow and each of those ~s uses your coordinates so the cow will spawn on top of you. The first one is for the X coordinates, the second is for Y, and the third is for Z. You can look at your XYZ coordinates using f3 (FN f3 on Mac). X is East and West, Y is up and down, and Z is North and South.

You can add numbers after the ~s like this

/summon Cow ~ ~50 ~


That will spawn a cow 50 blocks above you. You can also do negative numbers such as

/summon Cow ~ ~-50 ~

and summon things below you.

More Mobs

You can also name mobs without name tags when you summon them like this

/summon Cow ~ ~250 ~ {CustomName:"ShadowDestroyer5",CustomNameVisible:1)}


That wouldn't be nice though. 

You can also make custom mob drops. This is a little bit trickier.

/summon Zombie ~ ~1 ~ {DropChances:[1.0f,1.0f,1.0f,1.0f,1.0f,0f],Equipment:[{id:310,Count:1},{id:311,Count:1},size=12pt]{id:312,Count:1},{id:313,Count:1},{Damage:3,id:397,tag:{SkullOwner:ShadowDestroyer5}}]}


This will be a zombie that drops full diamond armor and wears it and my head. He won't wear the helmet because my head is there, but he will drop it, and hold it in his hand. The zombie is still a zombie so it may drop rotten flesh or other zombie drops.

Potion Effects

You can easily give players potion effects using /effect.

/effect works like this

/effect Player PotionID PotionStrength PotionLength


The Potion ID's go from 1 to 23.

1 - Speed

2 - Slowness

3 - Haste

4 - Mining Fatigue

5 - Strength

6 - Instant Health

7 - Instant Damage

8 - Jump Boost

9 - Nausea

10 - Regeneration

11 - Resistance

12 - Fire Resistance

13 - Water Breathing

14 - Invisibility

15 - Blindness

16 - Night Vision

17 - Hunger

18 - Weakness

19 - Poison

20 - Wither

21 - Health Boost

22 - Absorption

23 - Saturation

For more info about these effects, you can check here.

The potion strength can go from 1 to 255. It is your effect level, like Speed IV from example.

The length is how long the potion lasts. If you choose a really high number, your time will say **:**. I believe it will still run out though.

Like regular potions, you can drink Milk to get rid of the effects.

To add effects to mobs, use this

/summon Zombie ~ ~1 ~ {ActiveEffects:[{ID:12,Amplifier:255,Duration:6000,Ambient:0}]}


The ID is the potion ID from the list. Amplifier is the potion strength, duration is the length, and ambient deals with whether the effect comes from a beacon or not (I'm pretty sure correct me if I'm wrong). 0 means false, because it's not coming from a beacon.
[/size]

Giving Items

/give is a pretty common command. In case you didn't know, or need a reminder, it works like this

/give Player ID Amount


The ID is not a potion ID, it is an item ID. Here is a list of most of the IDs, it's missing some of the recent ones.

Command Blocks for Mapmaking - The Basics

For a giant list, check here!

Now, in the more recent versions of Minecraft (including 1.7.x) you can do minecraft: and then the item name like this

/give TestDummy minecraft:lava_bucket 64


For items with spaces, you'll want to use underscores. For regular things, you won't need it, such as minecraft:stick.


That is about it! Hopefully this will cover some of the basic map making commands (for command blocks)! If you were wondering why I usually summon things 1 block above the command block, it's so they don't get stuck in it and suffocate.















Thanks!
Tags

Create an account or sign in to comment.

Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome