I have encountered an issue in my map.
So when encountering a sword in the stone, when the player stands on a particular block the scoreboard will be upticked by one, causing them to teleport. The issue I'm encountering is how finicky this command is. I'm trying to make it only go off when a player is standing on a quartz half slab at the coordinates x = 243, y=69.5, z=-41.
However, when testing, no matter where the player is located this command block will go off.
Here is the command I've been attempting to use:
execute at @e[type=player,x=243,y=69.5,z=-41] if entity @e[type=minecraft:player,scores={silent_realm=0}] if block ~ ~-0.5 ~ quartz_slab[type=bottom] run scoreboard players add @a silent_realm 1
In summary, what the command should do is execute at a player located at previously listed coordinates, if their scoreboard for the objective is equal to zero and if the block directly below them is a quartz half-slab.
Thanks in advance!
@s
is your friend. Currently you're checking if there is a player at the location (if that was correct) and if there is a player with the score, they can be two different people. You can also just combine the selector, no need for a second one. 3.@a
is the same as@e[type=player]
. 4. If the player is just 0.000001 blocks above the slab for some reason, your command fails. Since the entire block is the slab, even though just half of it is filled, you don't need~-0.5
.