Vector provider
Provides vectors for item effects
Context vector provider
Provides a vector from the item effect context based on the 'key' field, either coming from the trigger, the providers in the data object of the effect or added from some other outcome or provider.
Format:The key of a vector in the item effect context.
{
"type": "tetra:context",
"key": "target"
}
Context vector provider shorthand
Shorthand for the context vector provider using a single string referencing a vector in the effect context.
Format:Shorthand for the context vector provider using a single string referencing a vector in the effect context.
"target"
"source"
Number vector provider
Allows the construction of a vector from three number providers.
Format:{
"type": "tetra:number",
"x": 1,
"y": {
"type": "tetra:effect_level",
"effect": "bleeding"
},
"z": {
"type": "tetra:sum",
"values": [
{
"type": "tetra:vector",
"vector": "target",
"field": "y"
},
1
]
}
}
Number vector provider shorthand
Shorthand for the number vector provider, which is an array of three number providers rather than a typed object with three fields.
Format:[
{
"type": "tetra:vector",
"vector": "target",
"field": "x"
},
64,
"a + 4"
]
Entity facing vector provider
Provides the facing of the given entity, with some optional parameters.
Format:{
"type": "tetra:entity_facing",
"entity": "target"
}
Expression vector provider
Allows number expressions to be used (in number vector providers) based on the vectors (and numbers) in the context, as well as the 'vectors' and 'numbers' objects on this provider. Values from a vector can be accessed in an expression by affixing the key used for the vector with X, Y or Z. E.g. to access the X coordinate for a vector keyed 'player' is done using 'playerX' in an expression. Expressions in the values object can reference values that are defined earlier than that expression. The result field is the vector that will be returned from this provider.
Format:{
"type": "tetra:expression",
"vectors": {
"facing": {
"type": "tetra:entity_facing",
"entity": "miner"
}
},
"numbers": {
"distance": {
"type": "tetra:effect_efficiency",
"effect": "ravenous"
}
},
"result": [
"minerX + facingX * distance",
"minerY + facingY * distance",
"minerZ + facingZ * distance"
]
}