Pack Making JSON Conditions - DonBruce64/MinecraftTransportSimulator GitHub Wiki
Conditions, as the name suggests, are used to check if a variable(s) meet certain conditions that are defined within it. These are then used, say within a part slot's activeConditions
, to say if that part slot is active or not.
Condition Parameters
-
type – The type for this condition. Valid values are as below:
Value Condition Description active
input > 0
True if input
is greater than 0match
input == parameter1
True if input
is equal toparameter1
match_var
input == variable1
True if input
is equal tovariable
greater
input > parameter1
True if input
is greater thanparameter1
greater_var
input > variable1
True if input
is greater thanvariable1
bounds
input > parameter1 and input < parameter2
True if input
is greater thanparameter1
AND ifinput
is less thanparameter2
bounds_var
input > variable1 and input < variable2
True if input
is greater thanvariable1
AND ifinput
is less thanvariable2
conditions
- True if at least one of the entries in conditons
is True -
input – Input variable. It may be a number prefixed with
#
to indicate a constant. -
variable1 – A variable used in these types:
match_var
,greater_var
,bounds_var
. -
variable2 – Like
variable1
, but only used in these types:bounds_var
. -
parameter1 – A constant value used in these types:
match
,greater
,bounds
. -
variable2 – Like
parameter1
, but only used in these types:bounds
. -
conditions – Only if type is
conditions
. A list of conditions to use for this condition. -
invert – If
true
, inverts the logic of this condition.