stormfrenzy

/setblock command

Dec 13th, 2014
2,568
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.40 KB | None | 0 0
  1. setblock <x> <y> <z> <tilename> [datavalue] [oldblockHandling] [dataTag]
  2.  
  3. ► Create an enchanting table at a particular location regardless of what block was in this location previously.
  4.  
  5. /setblock -251 68 254 minecraft:enchanting_table
  6.  
  7. ► Create an apple spawner that spawns a new apple every 10 seconds. 1 in 5 apples are a golden
  8.  
  9. apple and they despawn after 3 seconds.
  10.  
  11. /setblock -241 72 259 minecraft:mob_spawner 0 replace {EntityId:Item,SpawnData:{Age:5940,Item:{id:minecraft:apple,Count:1}},SpawnPotentials:[{Type:Item,Weight:5,Properties:{Age:5940,Item:{id:minecraft:apple,Count:1}}},Type:Item,Weight:1,Properties:{Age:5940,Item:{id:minecraft:golden_apple,Count:1}}}],SpawnCount:1,SpawnRange:7,RequiredPlayerRange:10,MinSpawnDelay:1,MaxSpawnDelay:10,MaxNearbyEntities:10}
  12.  
  13. ► Replace the block beneath a horse with a hay block.
  14.  
  15. /execute @e[type=EntityHorse] ~ ~ ~ setblock ~ ~-1 ~ minecraft:hay_block
  16.  
  17. ► Place layers of snow if a thrown snowball is found within a particular area.
  18.  
  19. /execute @e[type=Snowball,x=-258,y=58,z=250,r=15] ~ ~ ~ setblock ~ ~ ~ minecraft:snow_layer 3 replace
  20.  
  21. Notes:
  22. Values for oldBlockHandling include replace, keep or destroy. Replace is the default value if oldBlockHandling isn't defined.
  23.  
  24. More information:
  25. http://minecraft.gamepedia.com/Data_Values#Block_IDs
  26. http://minecraft.gamepedia.com/Chunk_format#Tile_Entity_Format
  27. http://minecraft.gamepedia.com/Commands
Advertisement
Add Comment
Please, Sign In to add comment