Minecraft Blogs / Tutorial

[1.7.2] Useful map making stuff!

  • 3,387 views, 0 today
  • 5
  • 2
  • 4
Dewilcho avatar Dewilcho
Level 18 : Journeyman Crafter
Hi everyone, i didn't see topic like mine.. So i thinked why i don't create something fancy for you :) Enjoy, and dont forget to like the post if you really like it and you think its helpful!

If you like the topic, you can:
Follow me on Twitter?
(Redstone-stuff,Fancy Buildings,Minigames, Ideas and other.)

What you can find in this topic for map making?
- General use and Usage with /give
- /setblock, /testforblock and Block-Manipulation
- Advanced (Mob-Spawners and complex uses)
- /tellraw and other Interactive Stuff
- Uses with Mobs, and entity-stacking
- Useful Links!
- Minecarts (and 'ghost blocks')
- Other Uses
- TNT, Fireball, Arrows, Fireworks, and Miscellaneous Entities

General Use and /give

What are DataTags?
DataTags are NBT tags used to specify conditions, attributes, positional data...and more, for blocks/entities/players in Minecraft. The DataTag string in a command can contain multiple NBT Tags in order to achieve many things - much previously-seen only by using tools like NBTEdit, and MCEdit as modified mob-spawners.
Because of this, the DataTag is already recognised as a VERY powerful enhancement to /give and the new /summon command. It's thus ESSENTIAL for map-makers looking for an edge in their maps' mechanics!

What is the format for DataTags?
It's still unconfirmed, and I could use help explaining it here, but from what I've found personally:
ALL tags are wrapped in a curly-brace brackets { }, and tags are specified with this, like this example:
{display:{Name:"This can Rename an Item"}

You can also chain tags together, simply by using a comma (something that changed since Jeb first leaked these -
{display:{Name:"This can Rename an Item",Lore:[This is a line of 'Lore']}}
Here, we've listed 2 Tags here to apply to an item, within a tag-category 'display:', the tags 'Name:' and 'Lore:' change the item's name, and it's lore (the lines below the name).

Also, note how the 'Lore:' tag uses square-brackets - this is because it's what is known as an 'array' (in short, a grouped set of items (tags) combined in one tag); each item in an array is comma-separated, so you'd simply add just a comma if you wished to add more entries to the main tag.
We can turn this into a full command:
/give @p 268 1 0 {display:{Name:"This can Rename an Item",Lore:[This is a line of 'Lore']}}

@p Means the closest player (you)
268 is a wooden sword
1 means '1 wooden sword'
0 means 'damage value 0' (increase this to increase damage)[/spoiler]

What about Enchantments?
'ench:' is a tag used for this, for example:
If you remember your Enchantment IDs from using /enchant, you'll be in luck here! They're the same IDs! If you do not knwo any Enchant IDs, check EIDs HERE!

So, we have 2 tags INSIDE the 'ench:' tag:
'id:' and
'lvl:' (note how they are wrapped inside braces { } like the main tag)
These are both easy to understand, 'id:' is to specify the Enchantment ID (aka as the EID), and 'lvl:' is to specify the Enchantment Level.
In this example, we have Sharpness 2 being applied
Here is a full example, Sharpness 2 on a Wooden Sword:
/give @p 268 1 0 {ench:[{id:16,lvl:2}]}
This will give the closest player 1 Wooden Sword,
with a Damage Value of 0,
and the Sharpness 2 Enchantment

What if I want a NAMED Enchanted Item?:
Just combine both of what we learned before!
/give @p 268 1 0 {display:{Name:"This can Rename an Item",Lore:[This is a line of 'Lore']},ench:[{id:16,lvl:2}]}
Luckily for us, command-blocks allow us to enter long commands like this, even though it's technically too big for their 256-character limit! ^_^
Anyway, note how we simply added a comma from the previous 'display:' tag settings, then entered our 'ench:' tag we saw earlier...remember to close it all with a final brace } !

/setblock, /testforblock and Block-Manipulation

/setblock tutorial
The /setblock command.Start with this:
/setblock [dataValue] [oldBlockHandling] [dataTag]
/setblock is the Command itself.
X,Y and Z are the Coordinates.You can put there coordinates or Relatives in.
TileName is the Name of the Block.In 13w37a you can use the name of a block instead of the Id for Commands.The Name is made like this:
For blocks with two words as name:
DataValue is the DataValue we all know.
oldBlockHandling is a new Syntax.There are three Options:keep,replace and destroy.
Let´s look at keep first:
/setblock ~ ~-1 ~ minecraft:stone 0 keep
This Command means(we type it in Chat) that a stone will be placed under yourself if there isn´t an other block.Then,because we have keep there will be just placed a block if there isn´t anyone on the position.It will KEEP the other Block and type "The Block couldn´t be placed" in Chat.
Now we´ll gonna look at destroy.
/setblock ~ ~-1 ~ minecraft:stone 0 destroy
If there isn´t any block under yourself it will place the block there,but if there is an other block it will DESTROY the blocks(he drops) and place then the chosen Block.
Now look at replace:
/setblock ~ ~-1 ~ minecraft:stone 0 replace
Replace means,that if ther is another Block it will be REPLACED and won´t drop.
dataTag means the DataTag of the Block.We will fill in what we named TileEntityData before.Like this:
/setblock ~ ~-1 ~ minecraft:command_block 0 destroy {Command:/say @p Hi}
That was /setblock.
If you found more commands or syntaxes ost them here.
PS:It says every time in the Chat if the Block was placed or not.
PPS:Also a command block outputs a Redstone Signal when a block is placed.

My First Solid Block!
Firstly, you'll want to start with the basic command, for these examples, we'll be spawning the FallingSand entity right where we are, like so:
/summon FallingSand ~ ~ ~
The ~ ~ ~ are relative coordinates - by having no values after the ~'s, we tell the entity to spawn exactly where we are!
So, let's start spawning a block:
/summon FallingSand ~ ~ ~ {TileID:1,Time:1}
Immediately we have TWO new NBT Tags - 'TileID:' and 'Time:'

'TileID:' is used to specify what block to use. In this case, I used stone (ID 1).
'Time:' is used to keep the block in-place, it's an integer (a full-number), ranging from 0-127 (128 values);
If t=0 it deletes blocks with the same ID at it's position.
If t=127 it despawns (currently, I'm trying to enforce this to work)
if t<1 it becomes 0
EDIT: According to the wiki, if time<100, it'll remove the sand entity under y=0, and if time<700, it'll remove the entity at any level...I cannot seem to force this to work, though

Fly around a bit while using this command - you'll quickly notice how the block will try and solidify as soon as it lands!

/tellraw and other Interactive Things

/tellraw tutorial
/tellraw @a {"text":"Hi"}
/tellraw means the Command.
@a means all Players.
"text" is for the text.
"Hi" is the text.
There are these " :they are needed I don´t know why,but they are.
So.Now make it more specificate:
Awesome new Tag:
/tellraw @a {"text":"Hi","color":"red"}
"color" is a new Tag means the Color:It can be a color or something like bold,italic and so on....
So:The Problem is with tellraw there is just the Text and no Name before.You can make:
/tellraw @a {"text":"Villager:Hi","color":"red"}

But if you want to have the Name normal and the Text bold or something use that:
/tellraw Thorgott2 {"text":"Villager:","extra":[{"text":"Hi","color":"bold"}]}
"extra" is a new Tag for extra features.Here we added an extra text to have it with different color.
for more multiples you can us this

/tellraw Thorgott2 {"text":"Villager:","extra":[{"text":"Hi","color":"bold"},{"text":",who are you?","color":"green"}]}
So:Advanced Uses:
/tellraw @p {"text":"Who are you?","extra":[{"text":"[Your Friend]","color":"green","clickEvent":{"action":"run_command","value":"/tellraw @p good"}}]}

"clickEvent" is an Event,that runs if you click on the field in the chat.
"action" means an action:I think it´s redundant,help me understand this.
"run_command" is the only Action I know.It means if you click on the field in the Chat it will run the Command.
"value" is for the Command and "/tellraw @p good" is the Command.
Now,let´s add an HoverEvent:
/tellraw @p {"text":"Who are you?","extra":[{"text":"[Your Friend]","color":"green","clickEvent":{"action":"run_command","value":"/tellraw @p good"},"hoverEvent":{"action":"show_text","value":"That will be fine"}}]}

"hoverEvent" is an special event.
"show_text" means showing an special text when moving over the extra text and
"value" means the message,which is "That will be fine".
So:At the End an really advamced example for Map makers:
/tellraw @p {"text":"Who are you?","extra":[{"text":"[Your Friend]","color":"green","clickEvent":{"action":"run_command","value":"/tellraw @p good"},"hoverEvent":{"action":"show_text","value":"That will be fine"}},{"text":"[Your Enemy]","color":"red","clickEvent":{"action":"run_command","value":"/tellraw @p bad"},"hoverEvent":{"action":"show_text","value":"That will be bad"}}]}
This Example maks two extras.
I hope this helped.Try a little bit yourself and post Syntax you found(there are more actions,I think).
But the Events just work if Cheats are allowed.

Also you can makea complete Kit-choosing System with that(REALLY hard,but possible.
Better version:
/tellraw @p {"text":"Villager:","color":"blue","extra":[{"text":"Hi","color":"bold"},{"text":",Who are you?","color":"white"},{"text":" [Your Friend]","color":"green","clickEvent":{"action":"run_command","value":"/tellraw @p good"},"hoverEvent":{"action":"show_text","value":"That will be fine"}},{"text":" [Your Enemy]","color":"red","clickEvent":{"action":"run_command","value":"/tellraw @p bad"},"hoverEvent":{"action":"show_text","value":"That will be bad"}}]}

Edit:you can put "bold" "italic" "underlined" "strikethrough" and "obfuscated" as own tags with "true" or "false".Try this:
/tellraw @p {"text":"Hi","color":"aqua","italic":"false","bold":"false","underlined":"false","strikethrough":"false","obfuscated":"false"}

Miscellaneous ( Fireballs,Fireworks,TNT, and other)

Primed TNT
PrimedTNT is the name given to the already-activated TNT entity. NOT the block, but the white-ish version that's about to EXPLODE!
You can actually modify many parts of your TNT, here's an example:
/summon PrimedTnt ~ ~ ~ {Fuse:20}
'Fuse:' determines how long, in ticks, the TNT's fuse will last, setting it to a higher value will increase the delay until the TNT explodes. It's VITAL to remember this tag, as you'll be using it 90% of the time with all other tags!
Let's make our first TNT Cannon!
/summon PrimedTnt ~ ~ ~ {Fuse:20,Motion:[1.0,0.0,0.0]}
Oh look! It's the 'Motion:' tag again!
The 'Motion:' tag is very useful, and essentially the block-equivalent of the 'direction:' tag you'll be seeing shortly (if you haven't already). It's the basic means of moving your block-entities about in the air.
So there you have it, a simple cannon right there! Just adjust the [x,y,z] values (for example, Motion:[0.0,0.0,2.0] will fling the TNT in the Z-axis direction), and you're good to go already!
NOTE: If you want to control the Explosion-radius of TNT, then just use Fireballs (they're far easier to change!)

If you like the topic, you can:
Follow me on Twitter?
(Redstone-stuff,Fancy Buildings,Minigames, Ideas and other.)



Create an account or sign in to comment.

04/22/2014 8:26 pm
Level 2 : Apprentice Miner
jfields99 avatar
I know it is easier to use fireballs, but could you add how to do the explosionradius for the TnT please?
03/31/2014 11:44 am
Level 20 : Expert Dragon
TheBubbayuggas avatar
Could you put in your tutorial how to add color formatting and bold/italic/strikethrough for the /give command with items having those attributes?
11/22/2013 1:04 pm
Level 6 : Apprentice Explorer
Reacted And Crafted
Reacted And Crafted avatar
very nice!
11/22/2013 4:02 pm
Level 18 : Journeyman Crafter
Dewilcho avatar
Planet Minecraft


© 2010 - 2023