Exile icon indicating copy to clipboard operation
Exile copied to clipboard

Rework point temperature to use param2

Open jeremyshannon opened this issue 3 years ago • 1 comments

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.

jeremyshannon avatar Feb 25 '22 23:02 jeremyshannon

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.

jeremyshannon avatar Jun 30 '22 00:06 jeremyshannon