#say Before grass_path test
execute as @a if block ~ ~ ~ grass_path run effect give @s speed 5 1 true
execute as @a if block ~ ~ ~ grass_path run say @s is standing on a grass path.
#say After grass_path test
If I remove the # comments, I get the "say" messages, but I don't get the intended effect.
If I invoke /function cfc3:speed_path on a grass path, EVERYONE on the server gets the effect, though only I should. I am misunderstanding the correct application of "execute" so ONLY those standing on a grass path get the speed effect.
#say Before grass_path test
execute as @a at @s if block ~ ~ ~ grass_path run effect give @s speed 5 1 true
#execute as @a at @s if block ~ ~ ~ grass_path run say @s is standing on a grass path.
#say After grass_path test
That seems to be the ticket. "as @allplayers, at @self" seems to bring the correct result. "~ ~-1 ~" would not be correct in this case as the players are partially within the grass path block. Everything *ELSE* that's full-block would need the ~-1 case.
If I remove the # comments, I get the "say" messages, but I don't get the intended effect.
If I invoke /function cfc3:speed_path on a grass path, EVERYONE on the server gets the effect, though only I should. I am misunderstanding the correct application of "execute" so ONLY those standing on a grass path get the speed effect.
OH OKAY I'm starting to understand now. You want it so that when you step on grass paths, you get speed, right?
So something like this right?
/execute at @a if block ~ ~-1 ~ minecraft:grass_path run effect give @p speed 1 1 true
==Links==
𝐒𝐞𝐜𝐨𝐧𝐝 𝐂𝐡𝐚𝐧𝐧𝐞𝐥- https://www.youtube.com/channel/UCQYroXqdZtYBnyspneetBGA/featured
𝐈𝐧𝐬𝐭𝐚𝐠𝐫𝐚𝐦- https://www.instagram.com/cowsdabest_yt/?hl=en
𝐓𝐰𝐢𝐭𝐭𝐞𝐫- https://twitter.com/cowsdabestyt
𝐃𝐢𝐬𝐜𝐨𝐫𝐝- https://discord.gg/H2NfhpQ
==DISCLAIMER!==
Please credit me if you are going to use it in a video or a map!
#say Before grass_path test
execute as @a at @s if block ~ ~ ~ grass_path run effect give @s speed 5 1 true
#execute as @a at @s if block ~ ~ ~ grass_path run say @s is standing on a grass path.
#say After grass_path test
That seems to be the ticket. "as @allplayers, at @self" seems to bring the correct result. "~ ~-1 ~" would not be correct in this case as the players are partially within the grass path block. Everything *ELSE* that's full-block would need the ~-1 case.
Ah okay.
==Links==
𝐒𝐞𝐜𝐨𝐧𝐝 𝐂𝐡𝐚𝐧𝐧𝐞𝐥- https://www.youtube.com/channel/UCQYroXqdZtYBnyspneetBGA/featured
𝐈𝐧𝐬𝐭𝐚𝐠𝐫𝐚𝐦- https://www.instagram.com/cowsdabest_yt/?hl=en
𝐓𝐰𝐢𝐭𝐭𝐞𝐫- https://twitter.com/cowsdabestyt
𝐃𝐢𝐬𝐜𝐨𝐫𝐝- https://discord.gg/H2NfhpQ
==DISCLAIMER!==
Please credit me if you are going to use it in a video or a map!