Skip to content

Incorrect Molang Evaluation #5

@ciosciaa

Description

@ciosciaa

The following Molang will incorrectly evaluate such that t.r is 0.5:

t.r = 0;
false ? {
	true ? {
		t.r = 1;
	} : {
		t.r = 0.5;
	};
};

Indeed, in Minecraft, it will resolve to 0. This issue can be easily recreated using the color fields, setting red to…

t.r = 0;
false ? {
	true ? {
		t.r = 1;
	} : {
		t.r = 0.5;
	};
};
return t.r;

…and setting green and blue to 0.

I do not recall seeing this issue before Snowstorm 3, but it's possible I'm wrong and that it was there previously.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions