Sign in
Skip to main content

Commands let players perform actions and customize gameplay using text-based instructions. Use this topic to share feedback and ideas for improving commands and related tools.

13

New /Execute feature

3 Comments

Post a new comment:

Please sign in to leave a comment.

Sorted by oldest
  • 3
    Registered User commented
    Comment actions Permalink

    I do like this idea but I think for the most part it is already possible just by putting 2 if clauses. Such as this for your example:
    /execute at @p if block ~ ~-1 ~ bedrock if entity @p[gamemode=survival] run effect give @p blindness 100 2
    But I see where you're coming from. It seems weird to have both ifs so adding the and so it would be more like this would help it read easier:
    /execute at @p if block ~ ~-1 ~ bedrock and entity @p[gamemode=survival] run effect give @p blindness 100 2

  • 2
    Registered User commented
    Comment actions Permalink

    /execute as @a[ gamemode= survival] at @s if block ~ ~-1 ~ bedrock run effect give @s blindness

  • 3
    Registered User commented
    Comment actions Permalink

    As TenThunder25611 stated, AND is already possible. With unless, we have NOT. What we are missing is OR in form of elseif which refers to the if before.

    Currently we have to repeat the command with different conditions but this means, that, especially with longer, more complex ones, the game has to do all the execute arguments twice:

    /execute if block ~ ~-1 ~ stone run ...
    /execute if block ~ ~-1 ~ grass run ...

    Could look like this:

    /execute if block ~ ~-1 ~ stone elseif block ~ ~-1 ~ grass run ...

    This would increase efficiency dramatically.