Item effect condition
Various conditions that can be used to determine what to do depending on the state of the game.
Fixed item effect condition
Either always passes or always fails.
Format:The condition passes if this is set to true.
{
"type": "tetra:fixed",
"value": true
}
Fixed item effect condition shorthand
Shorthand for the fixed item effect condition, using a boolean value instead of a typed object.
Format:Shorthand for the fixed item effect condition, using a boolean value instead of a typed object.
true
Expression item effect condition
An item effect condition that is based on a comparative mathematical expression, additional numerical data may be passed to the expression.
Format:Must contain a single comparator (>, <, >=, <=, ==, !=) with an expression (same as for numbers) on both sides.
And item effect condition
Passes if ALL of the given conditions pass.
Format:{
"type": "tetra:and",
"conditions": [
{
"type": "tetra:fixed",
"value": true
},
{
"type": "tetra:fixed",
"value": false
}
]
}
Or item effect condition
Passes if ANY of the given conditions pass.
Format:{
"type": "tetra:or",
"conditions": [
{
"type": "tetra:fixed",
"value": true
},
{
"type": "tetra:fixed",
"value": false
}
]
}
Block item effect condition
Tests if the block at the given position passes the given condition.
Format:{
"type": "tetra:block",
"position": "target",
"block": {
"tag": "forge:ores"
}
}
Random item effect condition
A condition that has a chance (equal to the provided chance value) to pass.
Format:{
"type": "tetra:random",
"chance": 0.3
}
Entity item effect condition
Tests if the given entity passes the given condition(s).
Format:{
"type": "tetra:entity",
"entity": "target",
"condition": {
"type": "#minecraft:freeze_hurts_extra_types"
}
}