Advertisement
Skylinerw

Replacing with tile entities

Feb 4th, 2016
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.68 KB | None | 0 0
  1. Unfortunately this cannot be done with /fill, due to the limitation of the command itself.
  2.  
  3. One work-around is to use a series of /testforblock commands followed by /setblock, but that may get out of hand depending on the size of the area.
  4.  
  5. Another method, which can potentially be laggy or complicated to set up, is to do a series of /clone commands in order to avoid /fill's limitation while also being able to use large areas of blocks with as few commands as possible.
  6.  
  7. Image example, where you will need 1 building area (obsidian) and 2 cloning areas (lapis for landing area, redstone blocks for intended replacement):
  8.  
  9. http://i.imgur.com/78opY6c.png
  10.  
  11. Set of commands to use, utilizing 1.9 command blocks (noting that all except the first is set to conditional to reduce server strain of constant /fill and /clone commands):
  12.  
  13. http://i.imgur.com/agd0aJr.png
  14.  
  15. The commands will assume the following coordinates, so be sure to change them as needed:
  16.  
  17. Obsidian (where the players place the stairs): 0, 1, 0 to 4, 1, 4
  18. Lapis block (where the stairs are cloned to): 20, 1, 20 to 24, 1, 24
  19. Redstone block (where the replacements are stored): 40, 1, 40 to 44, 1, 44
  20.  
  21. 1. Clone only stairs facing east to the lapis blocks, replacing glass where stairs exist.
  22.  
  23.  
  24. /clone 0 1 0 4 1 4 20 1 20 filtered normal minecraft:stone_stairs 0
  25.  
  26.  
  27. 2. Delete those stone stairs at lapis, replacing only those stairs with air.
  28.  
  29.  
  30. /fill 20 1 20 24 1 24 minecraft:air 0 replace minecraft:stone_stairs 0
  31.  
  32.  
  33. 3. Clone the glass over to comparators. Masked mode means air blocks are not cloned over, so the only comparators remaining will be in the exact same position that stone stairs would have been. This is essentially the most important part of this, which is why the glass is needed (though can really be any block).
  34.  
  35.  
  36. /clone 20 1 20 24 1 24 40 1 40 masked normal
  37.  
  38.  
  39. 4. Clone the remaining comparators to the lapis, which will then be in the same position as the stairs were.
  40.  
  41.  
  42. /clone 40 1 40 44 1 44 20 1 20 masked normal
  43.  
  44.  
  45. 5. Delete the glass on the landing pad so they are not cloned over to the obsidian.
  46.  
  47.  
  48. /fill 20 1 20 24 1 24 minecraft:air 0 replace minecraft:glass
  49.  
  50.  
  51. 6. Clone the fresh comparators over to the obsidian, which will be placed in the same position as the stone stairs facing east.
  52.  
  53.  
  54. /clone 20 1 20 24 1 24 0 1 0 masked normal
  55.  
  56.  
  57. 7. Reset the lapis board to glass.
  58.  
  59.  
  60. /fill 20 1 20 24 1 24 minecraft:glass
  61.  
  62.  
  63. 8. Reset the redstone board to comparators facing east.
  64.  
  65.  
  66. /fill 40 1 40 44 1 44 minecraft:unpowered_comparator 3
  67.  
  68.  
  69. ----
  70.  
  71. Here's a series of images demonstrating the steps used above to hopefully clarify what's happening: http://imgur.com/a/18Q3T
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement