Mojira Archive
MC-132851

function loops continue after exit

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.

Works As Intended

Michael Hurt

2018-07-06, 07:35 AM

2019-10-26, 07:06 PM

2019-10-26, 07:06 PM

0

1

Unconfirmed

(Unassigned)

Minecraft 1.13-pre6

-