From 21992dc2653616db974ebfc6f0c48e436592fa34 Mon Sep 17 00:00:00 2001 From: NO11 Date: Sat, 3 Jul 2021 12:10:32 +0000 Subject: [PATCH 1/7] Fix #1746 (make anvils destroy items when falling) --- mods/ITEMS/mcl_anvils/init.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mods/ITEMS/mcl_anvils/init.lua b/mods/ITEMS/mcl_anvils/init.lua index fbf6fb751..e641183de 100644 --- a/mods/ITEMS/mcl_anvils/init.lua +++ b/mods/ITEMS/mcl_anvils/init.lua @@ -276,6 +276,12 @@ local function damage_anvil_by_using(pos) end local function damage_anvil_by_falling(pos, distance) + for _,object in pairs(minetest.get_objects_inside_radius(pos, 0.8)) do + local entity = object:get_luaentity() + if not object:is_player() and entity and entity.name == "__builtin:item" then + object:remove() + end + end local r = math.random(1, 100) if distance > 1 then if r <= (5*distance) then From d45e1c07bdb00f62d592d4984c63da789b8cdc2c Mon Sep 17 00:00:00 2001 From: NO11 Date: Sat, 3 Jul 2021 12:19:49 +0000 Subject: [PATCH 2/7] Remove unnecessary code --- mods/ITEMS/mcl_anvils/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_anvils/init.lua b/mods/ITEMS/mcl_anvils/init.lua index e641183de..509e78321 100644 --- a/mods/ITEMS/mcl_anvils/init.lua +++ b/mods/ITEMS/mcl_anvils/init.lua @@ -278,7 +278,7 @@ end local function damage_anvil_by_falling(pos, distance) for _,object in pairs(minetest.get_objects_inside_radius(pos, 0.8)) do local entity = object:get_luaentity() - if not object:is_player() and entity and entity.name == "__builtin:item" then + if entity and entity.name == "__builtin:item" then object:remove() end end From 0a474ee5781fa84147dd478e8a9cfa9c5007273a Mon Sep 17 00:00:00 2001 From: Nils Dagsson Moskopp Date: Wed, 23 Jun 2021 03:06:24 +0200 Subject: [PATCH 3/7] Reduce snow layer silk touch drop amount MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It was possible to duplicate snow layers by placing them and then mining them using a tool enchanted with silk touch. This commit fixes the “snow dupe” by reducing the amount of snow layers dropped in this case by one. --- mods/ITEMS/mcl_core/nodes_base.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_core/nodes_base.lua b/mods/ITEMS/mcl_core/nodes_base.lua index d4bfd7636..abc650bb0 100644 --- a/mods/ITEMS/mcl_core/nodes_base.lua +++ b/mods/ITEMS/mcl_core/nodes_base.lua @@ -1041,7 +1041,7 @@ for i=1,8 do drop = "mcl_throwing:snowball "..(i+1), _mcl_blast_resistance = 0.1, _mcl_hardness = 0.1, - _mcl_silk_touch_drop = {"mcl_core:snow " .. (i+1)}, + _mcl_silk_touch_drop = {"mcl_core:snow " .. i}, }) end From 4afdea56dbbca4ea0a9cc15343a64f8d1d18583d Mon Sep 17 00:00:00 2001 From: NO11 Date: Mon, 5 Jul 2021 12:28:14 +0000 Subject: [PATCH 4/7] Move code of making anvils destroy items when falling --- mods/ENTITIES/mcl_falling_nodes/init.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mods/ENTITIES/mcl_falling_nodes/init.lua b/mods/ENTITIES/mcl_falling_nodes/init.lua index 01681a159..d527603de 100644 --- a/mods/ENTITIES/mcl_falling_nodes/init.lua +++ b/mods/ENTITIES/mcl_falling_nodes/init.lua @@ -19,7 +19,10 @@ local function deal_falling_damage(self, dtime) end self._hit = self._hit or {} for _, obj in ipairs(minetest.get_objects_inside_radius(pos, 1)) do - if mcl_util.get_hp(obj) > 0 and not self._hit[obj] then + local entity = obj:get_luaentity() + if entity and entity.name == "__builtin:item" then + obj:remove() + elseif mcl_util.get_hp(obj) > 0 and not self._hit[obj] then self._hit[obj] = true local way = self._startpos.y - pos.y local damage = (way - 1) * 2 From 5cc4fe955fc083e86503fdf2c3d10302b70f3168 Mon Sep 17 00:00:00 2001 From: NO11 Date: Mon, 5 Jul 2021 12:30:01 +0000 Subject: [PATCH 5/7] Remove old code of making anvils destroy items when falling --- mods/ITEMS/mcl_anvils/init.lua | 6 ------ 1 file changed, 6 deletions(-) diff --git a/mods/ITEMS/mcl_anvils/init.lua b/mods/ITEMS/mcl_anvils/init.lua index 509e78321..fbf6fb751 100644 --- a/mods/ITEMS/mcl_anvils/init.lua +++ b/mods/ITEMS/mcl_anvils/init.lua @@ -276,12 +276,6 @@ local function damage_anvil_by_using(pos) end local function damage_anvil_by_falling(pos, distance) - for _,object in pairs(minetest.get_objects_inside_radius(pos, 0.8)) do - local entity = object:get_luaentity() - if entity and entity.name == "__builtin:item" then - object:remove() - end - end local r = math.random(1, 100) if distance > 1 then if r <= (5*distance) then From ae2c5ede3058bbb4ad868ea5e128b4ed9143bf7e Mon Sep 17 00:00:00 2001 From: erlehmann Date: Mon, 3 May 2021 14:30:47 +0000 Subject: [PATCH 6/7] Merge pull request 'Remove wrong preview banner crafting recipes' (#55) from banner-crafting-fix into master Reviewed-on: https://git.minetest.land/Mineclonia/Mineclonia/pulls/55 Reviewed-by: E --- mods/ITEMS/mcl_banners/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_banners/init.lua b/mods/ITEMS/mcl_banners/init.lua index 490e22643..a396caf7d 100644 --- a/mods/ITEMS/mcl_banners/init.lua +++ b/mods/ITEMS/mcl_banners/init.lua @@ -573,7 +573,7 @@ for colorid, colortab in pairs(mcl_banners.colors) do end, }) - if mod_mcl_core and minetest.get_modpath("mcl_wool") then + if mod_mcl_core and minetest.get_modpath("mcl_wool") and pattern_name == "" then minetest.register_craft({ output = itemstring, recipe = { From 2f22ce79cc5839b94f926186ce51be3653fc8393 Mon Sep 17 00:00:00 2001 From: erlehmann Date: Sat, 19 Jun 2021 13:01:11 +0000 Subject: [PATCH 7/7] Merge pull request 'ITEMS/mcl_banners: Allow more layers for banners with gradients' (#74) from e/Mineclonia:banner-gradient-limits into master MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-on: https://git.minetest.land/Mineclonia/Mineclonia/pulls/74 Reviewed-by: Elias Åström Reviewed-by: erlehmann --- mods/ITEMS/mcl_banners/patterncraft.lua | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/mods/ITEMS/mcl_banners/patterncraft.lua b/mods/ITEMS/mcl_banners/patterncraft.lua index bc2771fee..79778a665 100644 --- a/mods/ITEMS/mcl_banners/patterncraft.lua +++ b/mods/ITEMS/mcl_banners/patterncraft.lua @@ -8,9 +8,6 @@ local N = function(s) return s end -- Maximum number of layers which can be put on a banner by crafting. local max_layers_crafting = 12 --- Maximum number of layers when banner includes a gradient (workaround, see below). -local max_layers_gradient = 3 - -- Max. number lines in the descriptions for the banner layers. -- This is done to avoid huge tooltips. local max_layer_lines = 6 @@ -398,16 +395,6 @@ local function banner_pattern_craft(itemstack, player, old_craft_grid, craft_inv if #layers >= max_layers_crafting then return ItemStack("") end - -- Lower layer limit when banner includes any gradient. - -- Workaround to circumvent Minetest bug (https://github.com/minetest/minetest/issues/6210) - -- TODO: Remove this restriction when bug #6210 is fixed. - if #layers >= max_layers_gradient then - for l=1, #layers do - if layers[l].pattern == "gradient" or layers[l].pattern == "gradient_up" then - return ItemStack("") - end - end - end local matching_pattern local max_i = player:get_inventory():get_size("craft")