Files
system_temperatury
Code
10 83
system_temperatury/data/temper/function/temperature/update_player.mcfunction
scoreboard players set @s temp_delta 0
execute if score @s temperature matches ..49 run scoreboard players add @s temp_delta 1
execute if score @s temperature matches 51.. run scoreboard players add @s temp_delta -1
execute if dimension minecraft:the_nether run scoreboard players add @s temp_delta 4
execute if dimension minecraft:the_end run scoreboard players add @s temp_delta -1
execute if biome ~ ~ ~ minecraft:desert run scoreboard players add @s temp_delta 2
execute if biome ~ ~ ~ minecraft:badlands run scoreboard players add @s temp_delta 2
execute if biome ~ ~ ~ minecraft:eroded_badlands run scoreboard players add @s temp_delta 2
execute if biome ~ ~ ~ minecraft:wooded_badlands run scoreboard players add @s temp_delta 2
execute if biome ~ ~ ~ minecraft:savanna run scoreboard players add @s temp_delta 1
execute if biome ~ ~ ~ minecraft:savanna_plateau run scoreboard players add @s temp_delta 1
execute if biome ~ ~ ~ minecraft:windswept_savanna run scoreboard players add @s temp_delta 1
execute if biome ~ ~ ~ minecraft:snowy_plains run scoreboard players add @s temp_delta -2
execute if biome ~ ~ ~ minecraft:ice_spikes run scoreboard players add @s temp_delta -2
execute if biome ~ ~ ~ minecraft:frozen_ocean run scoreboard players add @s temp_delta -2
execute if biome ~ ~ ~ minecraft:deep_frozen_ocean run scoreboard players add @s temp_delta -2
execute if biome ~ ~ ~ minecraft:snowy_taiga run scoreboard players add @s temp_delta -2
execute if biome ~ ~ ~ minecraft:grove run scoreboard players add @s temp_delta -2
execute if biome ~ ~ ~ minecraft:snowy_slopes run scoreboard players add @s temp_delta -2
execute if biome ~ ~ ~ minecraft:jagged_peaks run scoreboard players add @s temp_delta -2
execute if biome ~ ~ ~ minecraft:frozen_peaks run scoreboard players add @s temp_delta -2
execute if biome ~ ~ ~ minecraft:cold_ocean run scoreboard players add @s temp_delta -1
execute if biome ~ ~ ~ minecraft:deep_cold_ocean run scoreboard players add @s temp_delta -1
execute if block ~ ~ ~ minecraft:water run scoreboard players add @s temp_delta -1
execute if block ~ ~1 ~ minecraft:water run scoreboard players add @s temp_delta -1
execute if block ~ ~ ~ minecraft:lava run scoreboard players add @s temp_delta 4
execute if block ~ ~-1 ~ minecraft:lava run scoreboard players add @s temp_delta 2
execute if block ~ ~ ~ minecraft:fire run scoreboard players add @s temp_delta 2
execute if block ~ ~ ~ minecraft:soul_fire run scoreboard players add @s temp_delta 2
execute if block ~ ~-1 ~ minecraft:campfire[lit=true] run scoreboard players add @s temp_delta 2
execute if block ~ ~-1 ~ minecraft:soul_campfire[lit=true] run scoreboard players add @s temp_delta 2
execute if block ~ ~-1 ~ minecraft:powder_snow run scoreboard players add @s temp_delta -1
scoreboard players operation @s temperature += @s temp_delta
execute if score @s temperature matches ..0 run scoreboard players set @s temperature 0
execute if score @s temperature matches 100.. run scoreboard players set @s temperature 100
execute if score @s temperature matches ..15 unless score @s temp_state matches 1 run function temper:temperature/cold_warning
execute if score @s temperature matches 85.. unless score @s temp_state matches 2 run function temper:temperature/hot_warning
execute if score @s temperature matches 16..84 unless score @s temp_state matches 0 run function temper:temperature/neutral_warning
execute if score @s temperature matches ..15 run effect give @s minecraft:slowness 3 0 true
execute if score @s temperature matches ..5 run effect give @s minecraft:weakness 3 0 true
execute if score @s temperature matches 85.. run effect give @s minecraft:slowness 3 0 true
execute if score @s temperature matches 95.. run effect give @s minecraft:weakness 3 0 true
title @s actionbar [{"text":"✦ TEMPERATURA ","color":"gray","bold":true},{"score":{"name":"@s","objective":"temperature"},"color":"aqua","bold":true},{"text":" / 100","color":"dark_gray"}]