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 using ResourceLocations in CompoundCondition #3

Open
sylv256 opened this issue Nov 20, 2024 · 0 comments
Open

Allow using ResourceLocations in CompoundCondition #3

sylv256 opened this issue Nov 20, 2024 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@sylv256
Copy link
Member

sylv256 commented Nov 20, 2024

Use Codec.either for the conditions field in CompoundCondition to allow datapacks to specify ResourceLocations where other conditions are stored rather than a condition object verbatim.
For example, instead of:

{
	"type": "silicate:compound",
	"conditions": [
		{
			"type": "silicate:entity_type",
			"param_type": "silicate:this_entity",
			"entity_types": ["minecraft:player"]
		},
		// ...
	]
}

...you could use this:

{
	"type": "silicate:compound",
	"conditions": [
		"examplemod:foo",
		"examplemod:bar"
	]
}
@sylv256 sylv256 added the enhancement New feature or request label Nov 20, 2024
@sylv256 sylv256 added this to the 1.0 milestone Nov 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant