From b82da0559008297a9668f28cd2c72726af666f22 Mon Sep 17 00:00:00 2001 From: epCode Date: Tue, 16 Mar 2021 19:18:07 -0700 Subject: [PATCH 1/4] Fix #1277 --- mods/ITEMS/mcl_armor/armor.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/ITEMS/mcl_armor/armor.lua b/mods/ITEMS/mcl_armor/armor.lua index a879f7240..ec06f19ee 100644 --- a/mods/ITEMS/mcl_armor/armor.lua +++ b/mods/ITEMS/mcl_armor/armor.lua @@ -149,8 +149,8 @@ armor.set_player_armor = function(self, player) if level then local texture = def.texture or item:gsub("%:", "_") local enchanted_addition = (mcl_enchanting.is_enchanted(item) and mcl_enchanting.overlay or "") - table.insert(textures, "("..texture..".png"..enchanted_addition..")") - preview = "(player.png^[opacity:0^"..texture.."_preview.png"..enchanted_addition..")"..(preview and "^"..preview or "") + table.insert(textures, texture..".png"..enchanted_addition) + preview = "player.png^[opacity:0^"..texture.."_preview.png"..enchanted_addition..""..(preview and "^"..preview or "") armor_level = armor_level + level items = items + 1 mcl_armor_points = mcl_armor_points + (def.groups["mcl_armor_points"] or 0) From 6c49c4669726c7b43b27c1948c1fd44931ac5a57 Mon Sep 17 00:00:00 2001 From: ZeDique la Ruleta Date: Tue, 16 Mar 2021 23:10:34 -0400 Subject: [PATCH 2/4] Chests now open 90 degrees, regardless - Removed 'block' check with chests, they will always open 90 degrees regardless of what's behind them --- mods/ITEMS/mcl_chests/init.lua | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/mods/ITEMS/mcl_chests/init.lua b/mods/ITEMS/mcl_chests/init.lua index 42e39f520..fb8c59f28 100644 --- a/mods/ITEMS/mcl_chests/init.lua +++ b/mods/ITEMS/mcl_chests/init.lua @@ -11,10 +11,8 @@ local entity_animations = { }, chest = { speed = 25, - open = {x = 0, y = 10}, - open_partly = {x = 0, y = 7}, - close = {x = 10, y = 20}, - close_partly = {x = 13, y = 20}, + open = {x = 0, y = 7}, + close = {x = 13, y = 20}, } } @@ -34,15 +32,14 @@ minetest.register_entity("mcl_chests:chest", { self.object:set_animation(anim, anim_table.speed, 0, false) end, - open = function(self, playername, partly) + open = function(self, playername) self.players[playername] = true if not self.is_open then - self:set_animation(partly and "open_partly" or "open") + self:set_animation("open") minetest.sound_play(self.sound_prefix .. "_open", { pos = self.node_pos, }) self.is_open = true - self.opened_partly = partly end end, @@ -53,12 +50,11 @@ minetest.register_entity("mcl_chests:chest", { for _ in pairs(playerlist) do return end - self:set_animation(self.opened_partly and "close_partly" or "close") + self:set_animation("close") minetest.sound_play(self.sound_prefix .. "_close", { pos = self.node_pos, }) self.is_open = false - self.opened_partly = false end end, @@ -179,8 +175,7 @@ local player_chest_open = function(player, pos, node_name, textures, param2, dou open_chests[name] = {pos = pos, node_name = node_name, textures = textures, param2 = param2, double = double, sound = sound, mesh = mesh, shulker = shulker} if animate_chests then local dir = minetest.facedir_to_dir(param2) - local blocked = not shulker and (back_is_blocked(pos, dir) or double and back_is_blocked(mcl_util.get_double_container_neighbor_pos(pos, param2, node_name:sub(-4)), dir)) - find_or_create_entity(pos, node_name, textures, param2, double, sound, mesh, shulker and "shulker" or "chest", dir):open(name, blocked) + find_or_create_entity(pos, node_name, textures, param2, double, sound, mesh, shulker and "shulker" or "chest", dir):open(name) end end From 7441f0269b199bde790606f45734949537eb9a5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elias=20=C3=85str=C3=B6m?= Date: Wed, 17 Mar 2021 09:09:13 +0100 Subject: [PATCH 3/4] Use get_node_light for sunlight in 5.3 Avoids servers running 5.3 crashing. --- mods/ENTITIES/mcl_mobs/api.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mods/ENTITIES/mcl_mobs/api.lua b/mods/ENTITIES/mcl_mobs/api.lua index 7d93f2bad..3b929a119 100644 --- a/mods/ENTITIES/mcl_mobs/api.lua +++ b/mods/ENTITIES/mcl_mobs/api.lua @@ -1047,7 +1047,10 @@ local do_env_damage = function(self) end end - local sunlight = minetest.get_natural_light(pos, self.time_of_day) + -- Use get_node_light for Minetest version 5.3 where get_natural_light + -- does not exist yet. + local get_light = minetest.get_natural_light or minetest.get_node_light + local sunlight = get_light(pos, self.time_of_day) -- bright light harms mob if self.light_damage ~= 0 and (sunlight or 0) > 12 then From ae18ca7602183a15f02cd6aa2f516be114d1f1b5 Mon Sep 17 00:00:00 2001 From: AFCMS Date: Wed, 17 Mar 2021 10:48:59 +0100 Subject: [PATCH 4/4] fix wrong value in walkover --- mods/CORE/walkover/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/CORE/walkover/init.lua b/mods/CORE/walkover/init.lua index f5507efbf..220157c8b 100644 --- a/mods/CORE/walkover/init.lua +++ b/mods/CORE/walkover/init.lua @@ -22,7 +22,7 @@ minetest.register_on_mods_loaded(function() end end for _,func in ipairs(walkover.registered_globals) do --cache registered globals - table.insert(registered_globals, value) + table.insert(registered_globals, func) end end)