0

I'm making a map and I want every time a player walks on top of an orange terracotta block, the player receives levitation for 1 second. The problem is when I run the command, the game just does nothing, there is no output even with /gamerule commandBlockOutput true.

execute as @a at @s if block ~ ~ ~ minecraft:orange_terracotta run effect give @s minecraft:levitation 1 40 true

This is the command I am using; I've put it in a command block with repeat mode, unconditional and needs redstone.

SuperStormer
  • 4,997
  • 5
  • 25
  • 35

1 Answers1

0

Try to do ~ ~-1 ~ or something like that. You are saying at the specific block that the player is at. If you do execute as @a at @s if block ~ ~-1 ~ minecraft:orange_terracotta run effect give @s minecraft:levitation 1 40 true it will do the block under the player.

SuperStormer
  • 4,997
  • 5
  • 25
  • 35