Indoor/Underground
thorjelly opened this issue ยท 1 comments
First, temperature shouldn't make a big difference no matter what weather or biome you are in if you're underground. Underground temperature is very consistent, and tends to be ~50F 30 beneath the surface. While you're mining, you shouldn't need to worry very much about surface temperature. It is unfortunate, and very unrealistic, that I freeze while it is night outside 40 blocks above me. Although not perfect, since there are mountain zones with high surface elevations, it'd still be a huge improvement to make temperature effects fall off between the y values of 64 and 40.
Second, being indoor or outdoor in general should make a decent effect. Maybe not by reducing ambient temperature, but significantly reducing the rate that it lowers? I know this is probably harder to implement and check for. But the simplest effective method might be to check a 3x3 area above the head of the player to see if all blocks are exposed to sky (not obstructed by opaque blocks; leaves dont count) would be fine. No tree would shelter the player, only natural overhangs. Can make a 3x3 roof of blocks above you, but thats not too much different than building a structure, doesn't protect you from mobs, and really doesn't seem like much of an exploit.
I've made it so biome and seasonal temperatures have no effect undergrund. Now, the indoor/outdoor thing is a bit trickier, because as you said, there aren't really many good ways to check for it.
Simply checking an area above the player's head is easily exploitable by not having walls. And it wouldn't make sense for the temperature to change if you just place a few dirt blocks above you, but are still completely exposed on all other sides.