Published Nov 22nd, 2013, 11/22/13 8:59 am
- 3,491 views, 1 today
- 5
- 2
- 4
2
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?
twitter.com/dewilcho
(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[/b]
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:
code:
{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 -
USE COMMAS, NOT SEMI-COLONS ANY-MORE!:
code
{display:{Name:"This can Rename an Item",Lore:[This is a line of 'Lore']}}
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:
code
/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:
code
{ench:[{id:16,lvl:2}]}
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:
code
/give @p 268 1 0 {ench:[{id:16,lvl:2}]}
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!
NOTE: THIS WILL ONLY WORK IN A COMMAND BLOCK, IT IS TOO LONG FOR CHAT!!
code
/give @p 268 1 0 {display:{Name:"This can Rename an Item",Lore:[This is a line of 'Lore']},ench:[{id:16,lvl:2}]}
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:
code
/setblock [dataValue] [oldBlockHandling] [dataTag]
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:
code
minecraft:
code
minecraft:_
oldBlockHandling is a new Syntax.There are three Options:keep,replace and destroy.
Let´s look at keep first:
code
/setblock ~ ~-1 ~ minecraft:stone 0 keep
Now we´ll gonna look at destroy.
code
/setblock ~ ~-1 ~ minecraft:stone 0 destroy
Now look at replace:
code
/setblock ~ ~-1 ~ minecraft:stone 0 replace
So.
dataTag means the DataTag of the Block.We will fill in what we named TileEntityData before.Like this:
code
/setblock ~ ~-1 ~ minecraft:command_block 0 destroy {Command:/say @p Hi}
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:
code
/summon FallingSand ~ ~ ~
So, let's start spawning a block:
code
/summon FallingSand ~ ~ ~ {TileID:1,Time:1}
'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
code
/tellraw @a {"text":"Hi"}
@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:
code
/tellraw @a {"text":"Hi","color":"red"}
So:The Problem is with tellraw there is just the Text and no Name before.You can make:
code
/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"}]}
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"}]}
code
/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:
code
/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:
code
/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"}}]}
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:
code
/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:
code
/tellraw @p {"text":"Hi","color":"aqua","italic":"false","bold":"false","underlined":"false","strikethrough":"false","obfuscated":"false"}
Miscellaneous ( Fireballs,Fireworks,TNT, and other)
Primed TNT
WARNING: BE CAREFUL WHEN HANDLING YOUR 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:
code
/summon PrimedTnt ~ ~ ~ {Fuse:20}
Let's make our first TNT Cannon!
code
/summon PrimedTnt ~ ~ ~ {Fuse:20,Motion:[1.0,0.0,0.0]}
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?
twitter.com/dewilcho
(Redstone-stuff,Fancy Buildings,Minigames, Ideas and other.)
Follow me on Twitter?
twitter.com/dewilcho
(Redstone-stuff,Fancy Buildings,Minigames, Ideas and other.)
MORE UPDATES SOON!
Credit | _xDewiLx_ |
Tags |
2596182
6
Create an account or sign in to comment.