Um, what if I just unequip my armor and throw out the tool when I want to collect xp? I mean, not that bad of an idea, but think about that. For now, no support.
Type these in to repeating command blocks and put them at your spawn
/gamemode 0 @a[m=2,rm=31]
/gamemode 2 @a[m=0,r=30]
Players will be in adventure mode when they are 30 block away from the command block and in survival mode when 31 blocks or further from the command block
Unless you want to use a lot of commands to select each mob, here is a simple(r) way to do it.
First, add a new dummy objective (in this case i name it Mob) (/scoreboard objectives add Mob dummy)
Then, put this in a repeating command block: scoreboard players set @e[type=!Player] Mob 1 {Attributes:[{Name:"generic.knockbackResistance",Base:0.0d}]}
Since only mobs and players have attributes and the default knockback resistance is 0 for all entity, this will track all mobs.
1
Um, what if I just unequip my armor and throw out the tool when I want to collect xp? I mean, not that bad of an idea, but think about that. For now, no support.
1
This definitely does make jack o' lantern way spookier, I support
Also the toggle with redstone is a good idea
1
I should point out that FallFlying:1b is a better way of testing that
1
/testforblock ~-1 ~ ~ minecraft:chest 5 {Items:[{id:minecraft:lingering_potion,tag:{Potion:"minecraft:long_water_breathing"},Count:1b,Damage:0s}]}
1
Type these in to repeating command blocks and put them at your spawn
/gamemode 0 @a[m=2,rm=31]
/gamemode 2 @a[m=0,r=30]
Players will be in adventure mode when they are 30 block away from the command block and in survival mode when 31 blocks or further from the command block
1
Unless you want to use a lot of commands to select each mob, here is a simple(r) way to do it.
First, add a new dummy objective (in this case i name it Mob) (/scoreboard objectives add Mob dummy)
Then, put this in a repeating command block: scoreboard players set @e[type=!Player] Mob 1 {Attributes:[{Name:"generic.knockbackResistance",Base:0.0d}]}
Since only mobs and players have attributes and the default knockback resistance is 0 for all entity, this will track all mobs.
Hope this helped