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

function loops continue after exit

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Works As Intended
    • None
    • Minecraft 1.13-pre6
    • None
    • Server running on Ubuntu server

      Client running on Windows 10
    • Unconfirmed
    • (Unassigned)

      Been trouble shooting this for a while.

      Create a function loop with breaking criteria

      execute unless entity @s[tag=break] if entity @s[scores={Count=..499}] positioned ^ ^ ^0.1 run function methods:test/loop

       

      In the same file, create a command to run if loop breaks.

      execute if entity @s[tag=break] positioned ^ ^ ^ run function methods:test/saysomething
      

      Expected result, Breaking the loop causes saysomething to execute once providing a single message.

      Actual result, Breaking the loop results in saysomething spamming the screen.

      I do not believe the positioned tag has anything to do with it but I left it in to show how im using it.

      ( *** Edit *** ) It just occurred to me that this is not necessarily a bad thing as some functions may benefit from this sort of behavior. I would like to suggest actually making it official but activated by some sort of parameter at call time.

            Unassigned Unassigned
            Stuperfied Michael Hurt
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: