mojira.dev
MC-117722

Function if and unless always fail when executed in function

The bug

The /function command with if or unless always fails when it is executed in a function.

How to reproduce

  1. Create a function custom:test

    function custom:test2 if @s
  2. Create a function custom:test2

    say test2
  3. Run the function custom:test

    /function custom:test

    → "test2" is not printed

Note: As workaround you can use /execute

execute @s ~ ~ ~ /function custom:test2 if @s

Linked issues

Comments 1

Adam

(Unassigned)

Confirmed

function, selector

Minecraft 1.12 Pre-Release 5

Retrieved