mojira.dev
MC-130375

Return of the executed command number is false for the /function

The number of executed commands in the message following the execution of a /function command is false when one of called functions contains a /function command. Like we can see on my screenshot, the /function command doesn't count for one but for two (I tested without execute, the result is the same)

Linked issues

Attachments

Comments 6

Can confirm for 1.13-pre6

Should probably confirm for pre7 since it just came out a few minutes ago.

First, I think it is intentional when a function commands returns 0 for chained executions to prevent vm stack overflow.

Second, functions got count twice in execution is actually MC-148612 (where I've posted a fix) and MC-143269 (poster misunderstood the cause).

The first part of this issue is actually the same as MC-135636. Should close this issue and move the corresponding topics to those single-topic issues linked instead.

Confirmed in 1.14 Pre-Release 5. Has a set of code that hacked to solve this issue by calling the result consumers twice. https://github.com/liachmodded/MC-126946-128565/tree/b42d0455329408c2e2156d913be4ca2fd4255f8a/src/main/java/com/github/liachmodded/datapacks

The other report is the dupe it seems

Théo

(Unassigned)

Confirmed

(Unassigned)

command, datapack, function, number, return

Minecraft 18w21b, Minecraft 1.13-pre3, Minecraft 1.14 Pre-Release 2, Minecraft 1.14 Pre-Release 3, Minecraft 1.14 Pre-Release 4, Minecraft 1.14 Pre-Release 5

Retrieved