liquid_alternative_source = "main:water",
liquid_viscosity = 1,
post_effect_color = {a = 103, r = 30, g = 60, b = 90},
- groups = {water = 1, liquid = 1, cools_lava = 1, bucket = 1, source = 1,pathable = 1,drowning=1},
+ groups = {water = 1, liquid = 1, cools_lava = 1, bucket = 1, source = 1,pathable = 1,drowning=1,disable_fall_damage=1},
--sounds = default.node_sound_water_defaults(),
--water explodes in the nether
liquid_alternative_source = "main:water",
liquid_viscosity = 1,
post_effect_color = {a = 103, r = 30, g = 60, b = 90},
- groups = {water = 1, liquid = 1, notInCreative = 1, cools_lava = 1,pathable = 1,drowning=1},
+ groups = {water = 1, liquid = 1, notInCreative = 1, cools_lava = 1,pathable = 1,drowning=1,disable_fall_damage=1},
--sounds = default.node_sound_water_defaults(),
})
---hurt sound
+--hurt sound and disable fall damage group handling
minetest.register_on_player_hpchange(function(player, hp_change, reason)
+ if reason.type == "fall" then
+ if minetest.get_node_group(minetest.get_node(player:get_pos()).name, "disable_fall_damage") > 0 then
+ return(0)
+ end
+ end
if hp_change < 0 then
minetest.sound_play("hurt", {object=player, gain = 1.0, max_hear_distance = 60,pitch = math.random(80,100)/100})
end
-end)
+ return(hp_change)
+end, true)
--throw all items on death
minetest.register_on_dieplayer(function(player, reason)