25w42a added the "environment attributes" system, including biome-specific (and later also time-specific) modifiers for attributes. For the case of boolean values, lots of modifier behaviours are available: override and, nand, or, nor, xor and xnor. That made me wonder which logic tables are possible. If the dimension-wide value is "A" and the biome-specific value is "B", then the resulting boolean value with these modifier types for each possible combination of A and B follows this table:
A│B│over│and│nand│or│nor│xor│xnor
0│0│ 0 │ 0 │ 1 │ 0│ 1 │ 0 │1
0│1│ 1 │ 0 │ 1 │ 1│ 0 │ 1 │0
1│0│ 0 │ 0 │ 1 │ 1│ 0 │ 1 │0
1│1│ 1 │ 1 │ 0 │ 1│ 0 │ 0 │1
Out of the 16 possible arrangements of 0s and 1s in the columns, that's 7. Since the modifier type and the value B are specified in the same place, you can just choose B differently to get 1010, 0000 and 1111 as well. That means that the missing cases are 1101 (known as the "implication" operator), 1100 (inverting the dimension's value) and combinations of everything mentioned already: 0010, 0100, 1011.
My suggestion: Adding the "implies" modifier type (which is only FALSE if the dimension-wide value is TRUE and the biome-specific or time-specific value is FALSE) and adding the ability to invert the output, on top of all the existing boolean modifiers. This can also replace "nand", "nor" and "xnor". With those two features, every combination can be achieved by datapacks.
Please sign in to leave a comment.
0 Comments