Type Specific Predicates - DaFuqs/Spectrum GitHub Wiki
What are Type Specific Predicates?
If you do know what that they already: props to you.
Type Specific Predicates are sub-predicates usable in entity predicates. Specifically, in the type_specific
sub node. They allow you to check for specific properties, that only exist for certain entity types, for example a foxes variant or a players level.
New Type Specific Predicates
Shulker
color
(string): The entities color. Omit the value to only match the base vanilla color
Egg Laying Wooly Pig
color
(string): The entities colorsheared
(bool): Whether the entity is currently shearedhatless
(bool): Whether the entity has wool on it's head when grown
Lurking Lizard
frill_variant
(id): The entities frill variant, likespectrum:simple
horn_variant
(id): The entities horn variant, likespectrum:horny
color
(string): The entities color
Kindling
variant
(id): The entities variant, likespectrum:default
clipped
(bool): Whether the entity is clippedangry
(bool): Whether the entity is angry
Matching Type Specific Predicates
Type specific predicates can be matched in any entity predicate.
Vanilla example
Matching a type specific predicate, shown based on lightning_rod_with_villager_no_fire
advancement.
{
[...]
"criteria": {
"lightning_rod_with_villager_no_fire": {
"trigger": "minecraft:lightning_strike",
"conditions": {
"lightning": [
{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"type_specific": {
"type": "lightning",
"blocks_set_on_fire": 0
},
"distance": {
"absolute": {
"max": 30
}
[...]
}