Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-117663

Conditional function commands do not work inside of functions

XMLWordPrintable

    • Confirmed

      (See also this comment on Reddit by brianmcn)

      Conditional commands do not work inside of functions. Here's how to reproduce:

      1. Create a function foo:bar with the following content:
        say foo:bar succeeded
        function foo:bar2 if @e[c=1]
        

        The [c=1] is important here, see MC-117661.

      2. Create a second function foo:bar2 with the following content:
        say foo:bar2 succeeded
        
      3. Run /reload.
      4. Run /function foo:bar
      5. Notice that the only thing written into the chat is foo:bar succeeded and the success message telling you that both commands have been run

            dinnerbone [Mojang] Nathan Adams
            violine1101 [Mod] violine1101
            Votes:
            18 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: