From 1abd226e07112df5b96d8d79e914dbde939465f6 Mon Sep 17 00:00:00 2001 From: FossFanatic Date: Fri, 27 Jan 2023 15:46:53 +0000 Subject: [PATCH 1/4] Remove water HUD --- .../textures/mcl_playerplus_water.png | Bin 9421 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 mods/PLAYER/mcl_playerplus/textures/mcl_playerplus_water.png diff --git a/mods/PLAYER/mcl_playerplus/textures/mcl_playerplus_water.png b/mods/PLAYER/mcl_playerplus/textures/mcl_playerplus_water.png deleted file mode 100644 index 0524ce8d692852c626f5818d9160d069f0e86b2d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9421 zcmV;;Br@BHP) zaB^>EX>4U6ba`-PAZ2)IW&i+q+O1e?a>ghQ{Ld-&2q50a!C+VI4d(dUEn&xBl9`>U znmDmRU|ZcS2^@F+@!!k+2R~AycPZCadMO@1si!UjjppsA>pA$OXZ^W{(EqTzXFymvpaeO?I&jG|%{{d(JUDs;YbsD;n3K%Ur zqP)A=;XRmmfbyuf6&w|R8SSb^$I<-o6XGmC{efeK9t5gfE~K!+2v<1uI>UsENlvM_ zicE=WYq3g~8BHe~;X-2cxMG8nQ%)Bn%<}jW^u1l*H$%glSHM&Wcvw*R|KxCgHTX{s zcU_Yd1>YX7;FmCR;RcoC8M7crxVCOt3BHdlzkkIKLKO;TrMUs%@P|F($l)utqUszm zFXL)i5nNsS0iX!)&Ts}Pkb*BE=1_vKA~gi?*dWk==Yrfgpg_o37Mv7hMiEz~3Ez!- zYS6ior3lTaO%Ni-5-YUnaX_q;GUBJEh8P+-=9F_Tx#s3_&!fbWN-m|;!Xh_ntf}T& zYOSsII$CV0Q;SwX0v_QEjXG zHZDn9HjfH+b^muu5(irvn(X1J|g?T61;HI z#zJWV%it30$pOUd;fnxbHgTXe@oT6!-LfgI_b_Nwr8r z1BD%9$iY*s0@pAdkEpmEW~7KO*1QH^g$K;ZT5>e-*orD#cCZgMjBO z#Ay~hI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k`{2LRQZEDlTLJ9#73XWskid5gMH(mueR?&p@ZgEzWM5M=g1K1! zq3!~fN+3Wl9tcVKVC=U8K0f91C&AxS!0Rg};&~F(y#fsT^{C3qln9(``HuSklMjIq z@8zJYiedbekhQ3{N5J1(!LKjv#-1dBh`7$3x0Qk|DgqZ2;+_wXlSEl44#hlz@Z=Qt zV93R&SG|Q*@OuSVC4mGh|qtT8rPM*4nY((pAY;5@FVcE$KZ{@H#7S`C)a3f T Date: Fri, 27 Jan 2023 15:47:25 +0000 Subject: [PATCH 2/4] Remove water HUD code --- mods/PLAYER/mcl_playerplus/init.lua | 43 ++--------------------------- 1 file changed, 3 insertions(+), 40 deletions(-) diff --git a/mods/PLAYER/mcl_playerplus/init.lua b/mods/PLAYER/mcl_playerplus/init.lua index 28822d1bc..e01a7bd12 100644 --- a/mods/PLAYER/mcl_playerplus/init.lua +++ b/mods/PLAYER/mcl_playerplus/init.lua @@ -3,8 +3,6 @@ mcl_playerplus = { is_pressing_jump = {}, } -local hud_water = {} - local get_connected_players = minetest.get_connected_players local dir_to_yaw = minetest.dir_to_yaw local get_item_group = minetest.get_item_group @@ -27,26 +25,6 @@ local mcl_playerplus_internal = {} local time = 0 local look_pitch = 0 - -local function calculate_water_depth(pos) - for i=1, 50 do - if get_item_group(minetest.get_node(vector.new(pos.x,pos.y+i,pos.z)).name, "water") == 0 then - return i - end - end - return 50 -end - -local function remove_water_hud(player) - if hud_water[player] then - mcl_weather.skycolor.update_sky_color() - for i=1, #hud_water[player] do - player:hud_remove(hud_water[player][i]) - end - hud_water[player] = nil - end -end - local function player_collision(player) local pos = player:get_pos() @@ -417,23 +395,8 @@ minetest.register_globalstep(function(dtime) set_bone_pos(player,"Body_Control", nil, vector.new(0, -player_vel_yaw + yaw, 0)) end - if get_item_group(mcl_playerinfo[name].node_head, "water") ~= 0 then - if not hud_water[player] or hud_water[player] and calculate_water_depth(player:get_pos()) ~= #hud_water[player] then - remove_water_hud(player) - hud_water[player] = {} - for i=1, calculate_water_depth(player:get_pos()) do - table.insert(hud_water[player], player:hud_add({ - hud_elem_type = "image", - text = "mcl_playerplus_water.png", - position = {x = 0.5, y = 0.5}, - scale = {x = 32, y = 16}, - offset = {x = 0, y = 0}, - z_index = -1002, - })) - end - end - else - remove_water_hud(player) + if get_item_group(mcl_playerinfo[name].node_head, "water") ~= 0 or get_item_group(mcl_playerinfo[name].node_head, "water") ~= 1 then + mcl_weather.skycolor.update_sky_color() end elytra.last_yaw = player:get_look_horizontal() @@ -643,7 +606,7 @@ minetest.register_globalstep(function(dtime) local vi = area:indexp({x=x, y=y, z=z}) local nodename = get_name_from_content_id(data[vi]) local light_block_group = minetest.get_item_group(nodename, "light_block") - + local tex if nodename == "mcl_core:barrier" then tex = "mcl_core_barrier.png" From 24b1078b61f78d458206c74e96d68e6dba00c137 Mon Sep 17 00:00:00 2001 From: FossFanatic Date: Fri, 27 Jan 2023 15:49:58 +0000 Subject: [PATCH 3/4] Make the post effect alpha the same between water source and flow --- mods/ITEMS/mcl_core/nodes_liquid.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_core/nodes_liquid.lua b/mods/ITEMS/mcl_core/nodes_liquid.lua index 081f1978a..972c3b973 100644 --- a/mods/ITEMS/mcl_core/nodes_liquid.lua +++ b/mods/ITEMS/mcl_core/nodes_liquid.lua @@ -50,7 +50,7 @@ minetest.register_node("mcl_core:water_flowing", { liquid_viscosity = WATER_VISC, liquid_range = 7, waving = 3, - post_effect_color = {a=20, r=0x03, g=0x3C, b=0x5C}, + post_effect_color = {a=60, r=0x03, g=0x3C, b=0x5C}, groups = { water=3, liquid=3, puts_out_fire=1, not_in_creative_inventory=1, freezes=1, melt_around=1, dig_by_piston=1}, _mcl_blast_resistance = 100, -- Hardness intentionally set to infinite instead of 100 (Minecraft value) to avoid problems in creative mode From 0c0845c1bd189d222115d744c74f41a2a7dbd6d8 Mon Sep 17 00:00:00 2001 From: FossFanatic Date: Fri, 27 Jan 2023 16:29:24 +0000 Subject: [PATCH 4/4] Change the underwater detection code a bit --- mods/PLAYER/mcl_playerplus/init.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mods/PLAYER/mcl_playerplus/init.lua b/mods/PLAYER/mcl_playerplus/init.lua index e01a7bd12..0e774ee2f 100644 --- a/mods/PLAYER/mcl_playerplus/init.lua +++ b/mods/PLAYER/mcl_playerplus/init.lua @@ -395,8 +395,13 @@ minetest.register_globalstep(function(dtime) set_bone_pos(player,"Body_Control", nil, vector.new(0, -player_vel_yaw + yaw, 0)) end - if get_item_group(mcl_playerinfo[name].node_head, "water") ~= 0 or get_item_group(mcl_playerinfo[name].node_head, "water") ~= 1 then + local underwater + if get_item_group(mcl_playerinfo[name].node_head, "water") ~= 0 and underwater ~= true then mcl_weather.skycolor.update_sky_color() + local underwater = true + elseif get_item_group(mcl_playerinfo[name].node_head, "water") == 0 and underwater == true then + mcl_weather.skycolor.update_sky_color() + local underwater = false end elytra.last_yaw = player:get_look_horizontal()