Minecraft / Data Packs

Dynamic Temperature in Minecraft

  • 7
  • 6
  • comment4
  • playlist_add
  • share
  • more_horiz
avatar JohnTempest
Level 14 : Journeyman Engineer
>>> Minecraft Forums Project Link: Click Here <<<

>>> Older Versions: Click Here <<<

Dynamic Temperature in Minecraft is a project inspired by the development of temperature mechanics for Vech's latest map Iceolation and is designed to add relatively unobtrusive content to the game. The way the system works is based on a variety of environmental factors which detects nearby blocks, the player's current biome, whether the player is swimming in water or lava, and more.

Your temperature can range between -1000 and 1000 heat units (HU) and will give the player debuffs if your temperature wanders toward the extremes (±600 HU). These debuffs include slowness, mining fatigue, blindness, hunger, weakness, and wither with the effects being mild around ±600 HU but deadly around ±900 HU.

Armor serves as insulation for the player, decreasing the effect environmental factors have on the player while equipped. Should the player need to warm up, they can stand by a fire, a torch, or a lit furnace; or if they should need to cool off, they can jump into water or curl up by some ice. When heating up or cooling down, changes to your temperature will occur every two seconds.

To start, I seriously need to thank TheRedEngineer for his work in creating a biome detection system. I cannot even begin to imagine the time and headache he saved me. If you want to check out any of his Minecraft commands you can visit his website at www.theredengineer.com or check out his YouTube Channel.

Each biome has a base temperature which serves as the largest contribution to calculating the ambient temperature of a biome. Although other factors like time of day, altitude [upcoming], and the weather [upcoming] can also affect the temperature of a biome, adjustments from those other environmental factors only serve to modify the base temperature of a biome. These values can be viewed in the spoiler below, and the effects of those temperature values will be explained in the Ambient Temperature description.

Biome Temperatures

Outdated Description for Version 1.0 - 1.1

As of Dynamic Temperature in Minecraft Version 2.0 air temperature has been implemented as a modifier for a biome's temperature. During the day, the air temperature of each biome is programmed to increase while the opposite is true for at night (exact values can be found in the spoiler below). Another feature of air temperature is that unlike biome temperature, the temperature of the air will not affect a player that is underwater or swimming in lava. If you would like to know how Minecraft represents time, you can either go to the Minecraft Wiki or type the command "/time query daytime" into chat to see check the current time of day in-game. Generally though, one can get by just with remembering that Time 0 is basically the start of daytime, Time 6000 is noon, Time 12000 is the start of the night, and Time 18000 is midnight.

Air Temperature Modifiers

As of Dynamic Temperature in Minecraft Version 2.0 ambient temperature has taken over the role of biome temperature as a way to integrate the new air temperature mechanic. The ambient temperature will attempt to drag the player's temperature down if it is above the ambient temperature and pull it up if the player's temperature is lower than the ambient temperature. This effect will become more drastic if the difference between the player's temperate and the ambient temperature is greater than ±200 HU. For instance, if the ambient temperature is 400 HU and the player's temperature is -200 HU, the player will have 10 HU added to their temperature; but when the player's temperature reaches 200 HU, the biome will only add 5 HU. As such, the effect of ambient temperature on the player will disappear if the ambient temperature and the player's temperature is the same.

As opposed to ambient temperature, blocks and fluids require close proximity to the player to have an effect. As a general rule, if a block is solid (e.g. magma blocks and lit furnaces), then it will only affect players immediately next to it. However, if the player can occupy the same space as the block (e.g. torches, and snow layers) then the player must occupy the space of the block. The one exception to this rule is fire. If the player is standing in fire, they will gain heat faster than if they stand adjacent to it, however, the player is not required to occupy the same space to get an effect.

Block/Fluid Temperatures

Installing a datapack is very similar to downloading a Minecraft world. The only difference is that instead of pasting the datapack into Minecraft's 'save' folder you have to place the extracted datapack into the save's 'datapack' folder. For a more detailed walkthrough, please reference the spoiler below:

Installing a Datapack

Change Temperature Based on Time of Day:
- Have ambient biome temperatures increase in the morning and decrease at night
- Increase heating effect during the day for deserts and other hot biomes (e.g. mesa and savannah)
- Increase cooling effect at night for deserts and cool biomes

Change Temperature Based on Weather:
- Increase temperature in Jungle when raining
- Decrease temperature in warm biomes slightly when raining
- Decrease temperature in hot biomes significantly when raining
- Decrease temperature in cool biomes slightly when raining
- Decrease temperature in cool biomes significantly when raining
- Decrease temperature in cold biomes drastically when snowing

Change Temperature Based on Player Y-Level:
- Decrease temperature as altitude increases from sea-level
- Increase temperature as altitude decreases from sea-level

Change Temperature Based on Player Movement:
- Increase temperature if the player is running
- Decrease temperature if the player is flying (using elytra) or falling

Changes From Suggestions:
- Comment below if you have any thoughts on what else should be added

CreditTheRedEngineer - Biome Detection
Progress100% complete
Game VersionMinecraft 1.13

1 Update Logs

Air Temperature Update : 01/17/2019 2:53:06 pmJan 17th

Dynamic Temperature in Minecraft Version 2.0
- Added Air Temperature Mechanic
  - Air Temperature fluctuates according to the time of day
  - Air Temperature does not affect players below y-level 62 or players swimming in water or lava
- Added Ambient Temperature to merge Biome Temperature with Air Temperature

Comments : 4

star Login or register to post a comment.

Show Comments

1 - 4 of 4

  • Sir_Steggles
  • Level 4
  • Apprentice Architect
  • February 4, 2019, 5:14 am
could you please make it so tourches magma blocks and fire etc. emit heat further out frm the source. make it decrease the further away you are kind of like the light levels emitted by the blocks themselves

  • JohnTempest
  • Level 14
  • Journeyman Engineer
  • February 4, 2019, 4:15 pm
What you're asking for is possible, however, the issue is that for each additional block away from the heat source, the number of functions needed increases at an exponential rate. As of right now, each block that effects temperature has about 11 commands actively calculating temperature. If I want to increase the range by one block, I need to add probably 20 to 30 commands per block. If I want to increase the range by two blocks, I probably need an additional 30 commands on top of the existing ones. And this is just a rough estimation without doing any math so this might be a bit exaggerated, but I can only imagine computers crying over an additional thousand lines needing to be calculated per player.

So, is it possible, yes, but I think I'd need to create a separate single-player version, or simply label it as a more resource intensive option. If you think your computer can deal with the extra stress, I can probably develop a version along the lines of what you're suggesting, but it might take a while since I'm currently working on updating another project called "Super Hostile Online" to 1.13 for Vechs (if you're unfamiliar with his work, I'd recommend Googling Super Hostile CTM).
  • Sir_Steggles
  • Level 4
  • Apprentice Architect
  • February 5, 2019, 12:41 am
oh boi yikes. yeah if it is going to cause massive issues for computures i think i can live without. wish mojang would add something like this data pack to the base game. really cool thing you've got here

  • JohnTempest
  • Level 14
  • Journeyman Engineer
  • February 5, 2019, 9:06 am
First off, thanks for supporting the project! I really do appreciate your interest.

To be fair, it really just depends on how much memory you can dedicate to your game. If I spent some time reworking and optimizing the code, it should be possible to do what you're asking. For instance, I believe that to some extent, my computer could handle a larger system, but that I wouldn't be able to manage a server with the same data requirements. It's up to your discretion to determine if your computer could handle a larger datapack and how long you'd be willing to wait for an upgraded version.

1 - 4 of 4

Show Comments

Planet Minecraft



© 2010 - 2019