Minecraft: Force Mobs to move to a specific location

minecraft-commandsminecraft-java-edition

I would like to have bedrock riding silverfish. Then move to a specific location to slowly build a bedrock cage. I have figured out for bedrock riding silverfish part but I do not know how to move them.

So I would like 2 commands:

1) Them building a bedrock cage at specific coords

2) Them building a bedrock cage around the player

Best Answer

I am not sure how you could build around the player, but I have figured out how to have a cage built around a player. I'm assuming you know some basic command block phrases (impulse, chain, repeat).                    First, you will need a setup like this:

TopLeft                       Top                        TopRight






                                 S
                              S    S
Left                        S Center S                   Right








BottomLeft                    Bottom                     BottomRight

(S = where silverfish will stop)
The outer bedrock blocks are where the silverfish will spawn, and the inner blocks are where they will end up.
Once you are done, put signs on the outer blocks (temporarily) noting what corners are designated as what. The block named "Top" should be the furthest north (negative Z). Then place a 9-block-long repeat chain of command blocks, filling them in with the commands listed at http://pastebin.com/LbC0xSJw .
In the last command, fill in the coordinates of the center block (where the player would be standing). Last, place an 8-block-long impulse chain to summon the silverfish, using CustomName:"<position>" for each, replacing position with the position it will be in according to the sign. The silverfish will move to the center, stopping on the bedrock ring. Silverfish moving gif (sped up)
There you go! The silverfish will now move to the center when you spawn them on the blocks and you turn on the repeating command chain. You can adjust the speed by changing the .1 in the repeat chain.