Last active
August 29, 2015 14:05
-
-
Save Korko/22b6ee2c91fb7d969f92 to your computer and use it in GitHub Desktop.
[Minecraft][Command Blocks][1.8] Real invisibility # While he's invisible, mobs around ignore the player
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# CommandBlock order : West, East, Down, Up, North, South | |
# Only call once | |
/scoreboard objectives add Invisible dummy | |
/scoreboard objectives add Stupid dummy | |
# Around a fast clock (20t/s) | |
# /fill ~ ~-1 ~ ~ ~-1 ~-1 redstone_block | |
# /fill ~ ~1 ~ ~ ~1 ~-1 stone | |
# Reset "Stupid" objective | |
/execute @a[score_Invisible_min=1] ~ ~ ~ scoreboard players set @e[r=20,score_Stupid_min=1] Stupid 0 | |
# Reset "Invisible" objective | |
/scoreboard players set @a[score_Invisible_min=1] Invisible 0 | |
/scoreboard players set @a Invisible 1 {ActiveEffects:[{Id:14b}]} | |
# Set the score for mobs around a player which is invisible | |
/execute @a[score_Invisible_min=1] ~ ~ ~ scoreboard players set @e[type=!Player,r=10] Stupid 1 | |
# Reset followRange for out of range mobs | |
/entitydata @e[score_Stupid=0] {Attributes:[{Name:generic.followRange,Base:16.0}]} | |
/entitydata @e[score_Stupid=0,type=Zombie] {Attributes:[{Name:generic.followRange,Base:40.0}]} | |
# Now make in range mobs stupids | |
/entitydata @e[score_Stupid_min=1] {Attributes:[{Name:generic.followRange,Base:0.0}]} | |
# Remove reseted mobs from the score (optimization) | |
/scoreboard players reset @e[score_Stupid=0] Stupid | |
--- or in 1 command --- | |
/summon FallingSand ~ ~1 ~ {Block:redstone_block,Time:1,Riding:{id:"FallingSand",Block:command_block,TileEntityData:{Command:/fill ~ ~0 ~1 ~ ~-16 ~1 redstone_block},Time:1,Riding:{id:"FallingSand",Block:command_block,TileEntityData:{Command:setblock ~ ~3 ~1 stone},Time:1,Riding:{id:"FallingSand",Block:command_block,TileEntityData:{Command:setblock ~ ~4 ~ command_block 0 replace {Command:fill ~ ~2 ~ ~ ~-20 ~1 air}},Time:1,Riding:{id:"FallingSand",Block:command_block,TileEntityData:{Command:/scoreboard objectives add Stupid dummy},Time:1,Riding:{id:"FallingSand",Block:command_block,TileEntityData:{Command:/scoreboard objectives add Invisible dummy},Time:1,Riding:{id:"FallingSand",Block:command_block,TileEntityData:{Command:setblock ~3 ~-11 ~-1 command_block 0 replace {Command:/execute @a[score_Invisible_min=1] ~ ~ ~ scoreboard players set @e[r=20,score_Stupid_min=1] Stupid 0}},Time:1,Riding:{id:"FallingSand",Block:command_block,TileEntityData:{Command:setblock ~3 ~-10 ~1 command_block 0 replace {Command:/scoreboard players set @a[score_Invisible_min=1] Invisible 0}},Time:1,Riding:{id:"FallingSand",Block:command_block,TileEntityData:{Command:setblock ~4 ~-9 ~-1 command_block 0 replace {Command:/scoreboard players set @a Invisible 1 {ActiveEffects:[{Id:14b}]}}},Time:1,Riding:{id:"FallingSand",Block:command_block,TileEntityData:{Command:setblock ~4 ~-8 ~1 command_block 0 replace {Command:/execute @a[score_Invisible_min=1] ~ ~ ~ scoreboard players set @e[type=!Player,r=10] Stupid 1}},Time:1,Riding:{id:"FallingSand",Block:command_block,TileEntityData:{Command:setblock ~5 ~-7 ~-1 command_block 0 replace {Command:/entitydata @e[score_Stupid=0] {Attributes:[{Name:generic.followRange,Base:16.0}]}}},Time:1,Riding:{id:"FallingSand",Block:command_block,TileEntityData:{Command:setblock ~5 ~-6 ~1 command_block 0 replace {Command:/entitydata @e[score_Stupid=0,type=Zombie] {Attributes:[{Name:generic.followRange,Base:40.0}]}}},Time:1,Riding:{id:"FallingSand",Block:command_block,TileEntityData:{Command:setblock ~6 ~-5 ~-1 command_block 0 replace {Command:/entitydata @e[score_Stupid_min=1] {Attributes:[{Name:generic.followRange,Base:0.0}]}}},Time:1,Riding:{id:"FallingSand",Block:command_block,TileEntityData:{Command:setblock ~6 ~-4 ~1 command_block 0 replace {Command:/scoreboard players reset @e[score_Stupid=0] Stupid}},Time:1,Riding:{id:"FallingSand",Block:command_block,TileEntityData:{Command:gamerule commandBlockOutput false},Time:1,Riding:{id:"FallingSand",Block:command_block,TileEntityData:{Command:"fill ~2 ~-2 ~ ~6 ~-2 ~ redstone_block"},Time:1,Riding:{id:"FallingSand",Block:command_block,TileEntityData:{Command:"setblock ~2 ~-1 ~-1 command_block 0 replace {Command:/fill ~ ~ ~1 ~5 ~ ~1 stone 0 replace redstone_block}"},Time:1,Riding:{id:"FallingSand",Block:command_block,TileEntityData:{Command:"setblock ~2 ~ ~1 command_block 0 replace {Command:/fill ~ ~ ~-1 ~5 ~ ~-1 redstone_block 0 replace stone}"},Time:1,Riding:{id:"FallingSand",Block:stone,Time:1}}}}}}}}}}}}}}}}}}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment