This command makes the mobs stop attacking you.
How to install
How to import this command into your world
First, you must give yourself a command block (If you are on a server, you must be 'OP'ed, and have access to /gamemode 1)
To get a command block, type
/give @p command_block in the chat.
Once you have a command block, right click it to open it's GUI.
Now, you must copy and paste the command from your browser into the game. Select the entire command from below, then right click and press 'copy'.
Next, go back to your minecraft world, and paste the command you just copied into the command block. There are a few different keys that may be used to do this, depending on your keyboard. The most common ones are 'CTRL + V', 'COMMAND + V', or 'STRG + V'
Finally, you can press done to exit the GUI, and execute the command block by powering it with a redstone block, a lever, or any thing you can get your grubby hands on. Just make sure you don't place it on top of the command block, or the machine will not be installed!
Show source commands
# This user did not upload the source commands!
summon falling_block ~ ~1 ~ {Block:stone,Time:1,Passengers:[{id:falling_block,Block:redstone_block,Time:1,Passengers:[{id:falling_block,Block:activator_rail,Time:1,Passengers:[{id:commandblock_minecart,Command:gamerule commandBlockOutput false},{id:commandblock_minecart,Command:fill ~2 ~-3 ~-1 ~10 ~-1 ~1 lapis_block 0 hollow},{id:commandblock_minecart,Command:fill ~2 ~-2 ~-1 ~10 ~-2 ~1 stained_glass 11 0 lapis_block},{id:commandblock_minecart,Command:/scoreboard objectives add fs dummy},{id:commandblock_minecart,Command:/scoreboard teams add fs},{id:commandblock_minecart,Command:/scoreboard teams option fs friendlyfire false},{id:commandblock_minecart,Command:"/tellraw @a [\"\",{\"text\":\"Friendly Mobs\\n\",\"color\":\"yellow\",\"bold\":true,\"underlined\":true},{\"text\":\"Feito por jean224\\n\",\"color\":\"yellow\",\"bold\":true,\"underlined\":true},{\"text\":\"Clique aqui para ver mais comandos meus\",\"color\":\"yellow\",\"bold\":true,\"underlined\":true,\"clickEvent\":{\"action\":\"open_url\",\"value\":\"http://onecmd.com/?creator=jean224\"}}]"},{id:commandblock_minecart,Command:setblock ~1 ~-3 ~ wall_sign 4 0 {Text1:"{\\\"text\\\":\\\"Destruir\\\",\\\"clickEvent\\\":{\\\"action\\\":\\\"run_command\\\",\\\"value\\\":\\\"fill ~ ~ ~-1 ~9 ~2 ~1 air\\\"},\\\"bold\\\":true}",Text2:"{\\\"text\\\":\\\"\\\",\\\"clickEvent\\\":{\\\"action\\\":\\\"run_command\\\",\\\"value\\\":\\\"/scoreboard teams remove fs\\\"}}",Text3:"{\\\"text\\\":\\\"\\\"}",Text4:"{\\\"text\\\":\\\"\\\"}"}},{id:commandblock_minecart,Command:setblock ~1 ~-2 ~ wall_sign 4 0 {Text1:"{\\\"text\\\":\\\"Ajuda \\\",\\\"clickEvent\\\":{\\\"action\\\":\\\"run_command\\\",\\\"value\\\":\\\"/say Quando você ver partículas verdes os mobs não vão te bater \\\"},\\\"bold\\\":true}",Text2:"{\\\"text\\\":\\\"\\\",\\\"clickEvent\\\":{\\\"action\\\":\\\"run_command\\\",\\\"value\\\":\\\"/say Quando você ver partículas vermelhas os mobs vão te bater \\\"}}",Text3:"{\\\"text\\\":\\\"\\\",\\\"clickEvent\\\":{\\\"action\\\":\\\"run_command\\\",\\\"value\\\":\\\"/say Para usar o sistema use o ovo de villager que foi dado\\\"}}",Text4:"{\\\"text\\\":\\\"\\\"}"}},{id:commandblock_minecart,Command:setblock ~1 ~-1 ~ wall_sign 4 0 {Text1:"{\\\"text\\\":\\\"Pegar itens\\\",\\\"clickEvent\\\":{\\\"action\\\":\\\"run_command\\\",\\\"value\\\":\\\"/give @p minecraft:spawn_egg 64 120 {display:{Name:\\\\\\\"Friends\\\\\\\"},EntityTag:{id:minecraft:villager}}\\\"},\\\"bold\\\":true}",Text2:"{\\\"text\\\":\\\"\\\"}",Text3:"{\\\"text\\\":\\\"\\\"}",Text4:"{\\\"text\\\":\\\"\\\"}"}},{id:commandblock_minecart,Command:fill ~3 ~-2 ~ ~9 ~-2 ~ chain_command_block 5},{id:commandblock_minecart,Command:setblock ~7 ~-2 ~ chain_command_block 13},{id:commandblock_minecart,Command:setblock ~5 ~-2 ~ chain_command_block 13},{id:commandblock_minecart,Command:setblock ~3 ~-2 ~ repeating_command_block 5},{id:commandblock_minecart,Command:blockdata ~9 ~-2 ~ {auto:1,Command:/kill @e[type=villager,name=Friends]}},{id:commandblock_minecart,Command:blockdata ~8 ~-2 ~ {auto:1,Command:/scoreboard players set @a[score_fs_min=2,score_fs=2] fs 0}},{id:commandblock_minecart,Command:blockdata ~7 ~-2 ~ {auto:1,Command:/execute @e[type=villager,name=Friends] ~ ~ ~ particle lava ~ ~ ~ 0.1 0.1 0.1 1 20 normal}},{id:commandblock_minecart,Command:blockdata ~6 ~-2 ~ {auto:1,Command:/execute @a[score_fs_min=2,score_fs=2] ~ ~ ~ scoreboard teams empty fs }},{id:commandblock_minecart,Command:blockdata ~5 ~-2 ~ {auto:1,Command:/execute @e[type=villager,name=Friends] ~ ~ ~ particle happyVillager ~ ~ ~ 0.1 0.1 0.1 1 20 normal}},{id:commandblock_minecart,Command:blockdata ~4 ~-2 ~ {auto:1,Command:/execute @a[score_fs_min=1,score_fs=1] ~ ~ ~ scoreboard teams join fs @e}},{id:commandblock_minecart,Command:blockdata ~3 ~-2 ~ {auto:1,Command:/execute @e[type=villager,name=Friends] ~ ~ ~ scoreboard players add @a fs 1}},{id:commandblock_minecart,Command:setblock ~ ~ ~1 command_block 0 0 {Command:fill ~ ~-3 ~-1 ~ ~ ~ air}},{id:commandblock_minecart,Command:setblock ~ ~-1 ~1 redstone_block},{id:commandblock_minecart,Command:kill @e[type=commandblock_minecart,r=1]}]}]}]}