Exile
Exile copied to clipboard
Rework point temperature to use param2
Currently hot air nodes interact with each other and their environment by using a "temp =" metadata string. Metadata access is relatively slow, however, and invisible nodes like hot air have no use for the param2 field. We could set param2type to "none" and use it to store the node's temperature instead of metadata. This should allow much faster performance on air node manipulation and permit us to run more often and/or more widely, improving, for example, temperature leveling inside buildings. The code would need to be able to deal with "temp" metadata on some things where param2 is used for the node's facing, but those are corner cases.
Note to self: ice blocks can cause a temperature drop of up to -31 degrees below ambient temperature (50c to 19c) so a good param2 range might be -33 to +221, or raw value -34 , with -33 and +221 values indicating "read metadata for the correct value." This would cover pretty much all naturally occuring temperature changes apart from lava, and cover most player activity other than firing pottery, roasting and smelting.