
A number of mapmakers have been using the "/summon" command to swap out blocks, which was dependent on the odd properties of falling sand. However, it was recently revealed by Jeb that this was never intended to be used for block replacement, and that the delicate nature of the command makes it prone to breaking, especially during updates. However, using commands to replace blocks will, in turn, become much easier in the future.
It was recently revealed that the next Snapshot will have a "/setblock" command, using the following format:
- /setblock x y z block data method dataTag
Jeb explains each of the above:
Quote from
- x y z are coordinates, can be relative using tilde, as usual
- block is the block id (ofcourse), which in the future will be mod-safe (for example, instead of having the value 1, you can have "minecraft:stone")
- data is the block data, 0-15 as normal
- method is special and can have three values: replace, keep, destroy. "replace" will simply replace the current block, and throw an error message if nothing happened (occurs when the new block/data is identical to the old one). "keep" will only place the new block if the target space is empty, and "destroy" will first destroy the target block (and spawn resources) before placing the new block.
- dataTag is the NBT tag were you put information for tile entities such as chests. For example, "{Items:[{id:"minecraft:potato",Count:2}]}", and so on.
So, in short, the ability to add, remove, replace, and otherwise affect blocks with commands will get its own special command set, instead of relying on an unrelated script which may or may not bug out block replacement in future updates. Pretty awesome stuff for you mapmakers out there!
________________________________
The Gamepedia wiki network - which includes the Minecraft Wiki - is one of the most awesome wiki networks ever, thanks in no small part to all the awesome contributing editors! Wouldn't it be cool if you could win a free gaming console just for being a good wiki editor? Wait, you can?! Click here for details!
GREAT for adventure mappers.
imagine an everchanging maze...
(goes off and doodles redstone layouts)
Yeah, I was going to say. Imagine flipping a switch and all the sudden you are in a mansion.
So many uses for this... I dont know what one to use first! Lol
In all seriousness, Command Blocks are getting more and more powerful and useful.
This more for map makers who wish to use command blocks and create 'scripted' events. Such as a simple creation as shown with the post above.
Pretty awesome!
/setblock x y z 52 0 replace {EntityId:VillagerGolem}
enjoy
Yes, God, Yes
Very much.
You are a genius.
I will make you something for your Signature if you want me to.
Once again,
thank you.
You are welcome, but no thanks is necessary. And...
Here are some other spawner data tags that you might find interesting too.
{MaxSpawnDelay} Used to set variable time range (default 800)
{MinSpawnDelay} Used to set variable time range (default 200)
{Delay} Current delay time (will start randomly between the range set by max and min delay, and count down to spawn)
{MaxNearbyEntities} Number of mobs in range that will cause spawner to stop spawning (default 6)
{RequiredPlayerRange} Range at which a player will trigger the countdown to start (default 16)
{SpawnCount} Number of Mobs will spawn between 1 and n (n is the number you set, default 4)
{SpawnRange} Radius that Mobs can spawn around the northwest corner of the spawner (default 4)
Additionally there is a {Powered} data tag specifically for Creepers that governs whether they are normal (default 0) or Charged Creepers (1) and a {SkeletonType} tag for normal (default 0) and Wither Skeletons (1) but I haven't figured out exactly how to implement these yet.