Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for more complicated conditions #5

Open
moxvallix opened this issue Nov 11, 2024 · 1 comment
Open

Allow for more complicated conditions #5

moxvallix opened this issue Nov 11, 2024 · 1 comment

Comments

@moxvallix
Copy link
Contributor

moxvallix commented Nov 11, 2024

Currently we only have the basic if syntax for doing conditions. We want to be able to have more control over the underlying execute command.

One idea is maybe to have something like:

if `entity @s[tag=foo]` {
	...
}

Another idea is to add trailing lambda syntax for compile time functions, allowing for the standard library to provide:

&execute(`if entity @s[tag=foo]`) {
	...
}
@moxvallix
Copy link
Contributor Author

moxvallix commented Nov 12, 2024

These two could also be nicely nested:

&execute(`as @e[tag=example.entity]`) {
	if `predicate example:in_water` {
		...
	} else {
		...
	}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant