Last active
August 29, 2015 14:05
-
-
Save Korko/2fa1772cc20f504c92a5 to your computer and use it in GitHub Desktop.
[Minecraft][Command Blocks][1.8][WIP] Diving secretly # While he's diving, 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 Diving stat.diveOneCm | |
/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 ~ ~ ~ scoreboard players set @e[r=50,score_Stupid_min=1] Stupid 0 | |
# Set the score for mobs around a player which is diving | |
/execute @a[score_Diving_min=1] ~ ~ ~ scoreboard players set @e[r=40] 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment