From 19337489f664f40edb82311c419daabac835c8d2 Mon Sep 17 00:00:00 2001 From: epCode Date: Thu, 11 Mar 2021 14:31:36 -0800 Subject: [PATCH 1/4] Fix crash with mcl_flowers --- mods/ITEMS/mcl_flowers/init.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mods/ITEMS/mcl_flowers/init.lua b/mods/ITEMS/mcl_flowers/init.lua index 8b1a605d3d..7e4b8e587b 100644 --- a/mods/ITEMS/mcl_flowers/init.lua +++ b/mods/ITEMS/mcl_flowers/init.lua @@ -56,9 +56,9 @@ end) function mcl_flowers.register_simple_flower(name, desc, image, simple_selection_box) local newname = "mcl_flowers:"..name mcl_flowers.registered_simple_flowers[newname] = { - desc=desc - image=image - simple_selection_box=simple_selection_box + desc=desc, + image=image, + simple_selection_box=simple_selection_box, } minetest.register_node(newname, { description = desc, From 360070bb6a02ae4f4519b4826f3ffaee5ba3a358 Mon Sep 17 00:00:00 2001 From: epCode Date: Thu, 11 Mar 2021 15:56:09 -0800 Subject: [PATCH 2/4] Fix player eye height above head --- mods/PLAYER/mcl_playerplus/init.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mods/PLAYER/mcl_playerplus/init.lua b/mods/PLAYER/mcl_playerplus/init.lua index 73e799a3ad..26cbd6072f 100644 --- a/mods/PLAYER/mcl_playerplus/init.lua +++ b/mods/PLAYER/mcl_playerplus/init.lua @@ -66,13 +66,13 @@ minetest.register_globalstep(function(dtime) -- set head pitch and yaw when swimming player:set_bone_position("Head", vector.new(0,6.3,0), vector.new(pitch+90-degrees(dir_to_pitch(player_velocity)),yaw - player_vel_yaw * -1,0)) -- sets eye height, and nametag color accordingly - player:set_properties({collisionbox = {-0.35,0,-0.35,0.35,0.8,0.35}, eye_height = 0.65, nametag_color = { r = 225, b = 225, a = 225, g = 225 }}) + player:set_properties({collisionbox = {-0.35,0,-0.35,0.35,0.8,0.35}, eye_height = 0.5, nametag_color = { r = 225, b = 225, a = 225, g = 225 }}) -- control body bone when swimming player:set_bone_position("Body_Control", vector.new(0,6.3,0), vector.new(degrees(dir_to_pitch(player_velocity)) - 90,player_vel_yaw * -1 - yaw + 180,0)) elseif player:get_attach() == nil then -- sets eye height, and nametag color accordingly - player:set_properties({collisionbox = {-0.35,0,-0.35,0.35,1.8,0.35}, eye_height = 1.65, nametag_color = { r = 225, b = 225, a = 225, g = 225 }}) + player:set_properties({collisionbox = {-0.35,0,-0.35,0.35,1.8,0.35}, eye_height = 1.5, nametag_color = { r = 225, b = 225, a = 225, g = 225 }}) if player_velocity.x > 0.35 or player_velocity.z > 0.35 or player_velocity.x < -0.35 or player_velocity.z < -0.35 then if player_vel_yaw * -1 - yaw < 90 or player_vel_yaw * -1 - yaw > 270 then @@ -91,7 +91,7 @@ minetest.register_globalstep(function(dtime) else local attached = player:get_attach(parent) local attached_yaw = degrees(attached:get_yaw()) - player:set_properties({collisionbox = {-0.35,0,-0.35,0.35,1.8,0.35}, eye_height = 1.65, nametag_color = { r = 225, b = 225, a = 225, g = 225 }}) + player:set_properties({collisionbox = {-0.35,0,-0.35,0.35,1.8,0.35}, eye_height = 1.5, nametag_color = { r = 225, b = 225, a = 225, g = 225 }}) player:set_bone_position("Head", vector.new(0,6.3,0), vector.new(pitch,degrees(player:get_look_horizontal()) * -1 + attached_yaw,0)) player:set_bone_position("Body_Control", vector.new(0,6.3,0), vector.new(0,0,0)) end @@ -201,7 +201,7 @@ minetest.register_globalstep(function(dtime) if minetest.get_item_group(node_feet, "liquid") ~= 0 and mcl_enchanting.get_enchantment(player:get_inventory():get_stack("armor", 5), "depth_strider") then local boots = player:get_inventory():get_stack("armor", 5) local depth_strider = mcl_enchanting.get_enchantment(boots, "depth_strider") - + if depth_strider > 0 then playerphysics.add_physics_factor(player, "speed", "mcl_playerplus:surface", (depth_strider / 3) + 0.75) end From eeb1f88e08d2d07d62ad1baaa3fa162de509c5a9 Mon Sep 17 00:00:00 2001 From: epCode Date: Thu, 11 Mar 2021 19:14:23 -0800 Subject: [PATCH 3/4] Fix invisibility to be more MC-like --- mods/ITEMS/mcl_potions/functions.lua | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/mods/ITEMS/mcl_potions/functions.lua b/mods/ITEMS/mcl_potions/functions.lua index f1384ab309..cd4939c2fe 100644 --- a/mods/ITEMS/mcl_potions/functions.lua +++ b/mods/ITEMS/mcl_potions/functions.lua @@ -590,23 +590,36 @@ function mcl_potions.make_invisible(player, toggle) local is_player = player:is_player() local entity = player:get_luaentity() + local playername = player:get_player_name() + local skin_file = "" if toggle then -- hide player - if player:is_player() then - EF.invisible[player].old_size = player:get_properties().visual_size - elseif entity then + skin_file = "mobs_mc_empty.png" + + if entity then EF.invisible[player].old_size = entity.visual_size - else -- if not a player or entity, do nothing + elseif not player:is_player() then -- if not a player or entity, do nothing return end - player:set_properties({visual_size = {x = 0, y = 0}}) + if minetest.get_modpath("mcl_armor") and player:is_player() then + armor.textures[playername].skin = skin_file + armor:update_player_visuals(player) + elseif not player:is_player() and minetest.get_modpath("mcl_armor") or not player:is_player() and not minetest.get_modpath("mcl_armor") then + player:set_properties({visual_size = {x = 0, y = 0}}) + end player:set_nametag_attributes({color = {a = 0}}) elseif EF.invisible[player] then -- show player - player:set_properties({visual_size = EF.invisible[player].old_size}) + if minetest.get_modpath("mcl_armor") and player:is_player() then + skin_file = mcl_skins.skins[playername] .. ".png" + armor.textures[playername].skin = skin_file + armor:update_player_visuals(player) + elseif not player:is_player() and minetest.get_modpath("mcl_armor") or not player:is_player() and not minetest.get_modpath("mcl_armor") then + player:set_properties({visual_size = EF.invisible[player].old_size}) + end player:set_nametag_attributes({color = {r = 255, g = 255, b = 255, a = 255}}) end @@ -999,4 +1012,3 @@ function mcl_potions._extinguish_nearby_fire(pos, radius) end return exting end - From cb10a5508b1a4ef3d4e4e751984ebf5ed5b38914 Mon Sep 17 00:00:00 2001 From: epCode Date: Thu, 11 Mar 2021 19:40:36 -0800 Subject: [PATCH 4/4] Make mob damage more red (MC-like) --- mods/ENTITIES/mcl_mobs/api.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/ENTITIES/mcl_mobs/api.lua b/mods/ENTITIES/mcl_mobs/api.lua index 6d74d9d78a..0c89530792 100644 --- a/mods/ENTITIES/mcl_mobs/api.lua +++ b/mods/ENTITIES/mcl_mobs/api.lua @@ -751,10 +751,10 @@ local check_for_death = function(self, cause, cmi_cause) -- play damage sound if health was reduced and make mob flash red. if damaged then - add_texture_mod(self, "^[colorize:#FF000040") + add_texture_mod(self, "^[colorize:red:130") minetest.after(.2, function(self) if self and self.object then - remove_texture_mod(self, "^[colorize:#FF000040") + remove_texture_mod(self, "^[colorize:red:130") end end, self) mob_sound(self, "damage")