Allow using ResourceLocations in CompoundCondition #3

Closed
opened 2024-11-20 04:46:31 +00:00 by sylv256 · 1 comment
sylv256 commented 2024-11-20 04:46:31 +00:00 (Migrated from github.com)

Use Codec.either for the conditions field in CompoundCondition to allow datapacks to specify ResourceLocations where other conditions are stored in datapacks 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"
	]
}
Use `Codec.either` for the `conditions` field in `CompoundCondition` to allow datapacks to specify `ResourceLocation`s where other conditions are stored in datapacks rather than a condition object verbatim. For example, instead of: ```json5 { "type": "silicate:compound", "conditions": [ { "type": "silicate:entity_type", "param_type": "silicate:this_entity", "entity_types": ["minecraft:player"] }, // ... ] } ``` ...you could use this: ```json5 { "type": "silicate:compound", "conditions": [ "examplemod:foo", "examplemod:bar" ] } ```
sylv256 commented 2025-02-11 20:50:53 +00:00 (Migrated from github.com)

Added in 0.5.0

Added in `0.5.0`
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Modding/silicate#3
No description provided.