From 0cfb60a82650e4e8bc9e10574457a1c24583cb92 Mon Sep 17 00:00:00 2001 From: Elias Fleckenstein Date: Sun, 3 Jan 2021 19:20:23 +0100 Subject: [PATCH 1/6] Fix #941 --- mods/ITEMS/REDSTONE/mcl_observers/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/ITEMS/REDSTONE/mcl_observers/init.lua b/mods/ITEMS/REDSTONE/mcl_observers/init.lua index 841ab98b4a..759e05996c 100644 --- a/mods/ITEMS/REDSTONE/mcl_observers/init.lua +++ b/mods/ITEMS/REDSTONE/mcl_observers/init.lua @@ -24,7 +24,7 @@ local rules_up = {{ x = 0, y = -1, z = 0, spread = true }} function mcl_observers.observer_activate(pos) minetest.after(mcl_vars.redstone_tick, function(pos) - node = minetest.get_node(pos) + local node = minetest.get_node(pos) if not node then return end From abdb76c2a065d8d4391cd6802953bb527c83a010 Mon Sep 17 00:00:00 2001 From: Elias Fleckenstein Date: Mon, 4 Jan 2021 10:09:44 +0100 Subject: [PATCH 2/6] Fix #942 --- mods/ITEMS/mcl_core/functions.lua | 7 +++++-- mods/ITEMS/mcl_core/nodes_base.lua | 8 ++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/mods/ITEMS/mcl_core/functions.lua b/mods/ITEMS/mcl_core/functions.lua index 0d9a1f6011..2888288441 100644 --- a/mods/ITEMS/mcl_core/functions.lua +++ b/mods/ITEMS/mcl_core/functions.lua @@ -1450,10 +1450,11 @@ end -- * tiles: Optional custom tiles -- * sounds: Optional custom sounds -- * clear_colorization: Optional. If true, will clear all paramtype2="color" related node def. fields +-- * desc: Item description -- -- The snowable nodes also MUST have _mcl_snowed defined to contain the name -- of the snowed node. -mcl_core.register_snowed_node = function(itemstring_snowed, itemstring_clear, tiles, sounds, clear_colorization) +mcl_core.register_snowed_node = function(itemstring_snowed, itemstring_clear, tiles, sounds, clear_colorization, desc) local def = table.copy(minetest.registered_nodes[itemstring_clear]) local create_doc_alias if def.description then @@ -1462,7 +1463,7 @@ mcl_core.register_snowed_node = function(itemstring_snowed, itemstring_clear, ti create_doc_alias = false end -- Just some group clearing - def.description = nil + def.description = desc def._doc_items_longdesc = nil def._doc_items_usagehelp = nil def._doc_items_create_entry = false @@ -1503,6 +1504,8 @@ mcl_core.register_snowed_node = function(itemstring_snowed, itemstring_clear, ti def.sounds = sounds end + def._mcl_silk_touch_drop = {itemstring_clear} + -- Register stuff minetest.register_node(itemstring_snowed, def) diff --git a/mods/ITEMS/mcl_core/nodes_base.lua b/mods/ITEMS/mcl_core/nodes_base.lua index 82ce39e1ab..658b390814 100644 --- a/mods/ITEMS/mcl_core/nodes_base.lua +++ b/mods/ITEMS/mcl_core/nodes_base.lua @@ -380,7 +380,7 @@ minetest.register_node("mcl_core:dirt_with_grass", { _mcl_hardness = 0.6, _mcl_silk_touch_drop = true, }) -mcl_core.register_snowed_node("mcl_core:dirt_with_grass_snow", "mcl_core:dirt_with_grass", nil, nil, true) +mcl_core.register_snowed_node("mcl_core:dirt_with_grass_snow", "mcl_core:dirt_with_grass", nil, nil, true, S("Dirt with Snow")) minetest.register_node("mcl_core:grass_path", { tiles = {"mcl_core_grass_path_top.png", "default_dirt.png", "mcl_core_grass_path_side.png"}, @@ -424,7 +424,7 @@ minetest.register_node("mcl_core:mycelium", { _mcl_hardness = 0.6, _mcl_silk_touch_drop = true, }) -mcl_core.register_snowed_node("mcl_core:mycelium_snow", "mcl_core:mycelium") +mcl_core.register_snowed_node("mcl_core:mycelium_snow", "mcl_core:mycelium", nil, nil, false, S("Mycelium with Snow")) minetest.register_node("mcl_core:podzol", { description = S("Podzol"), @@ -441,7 +441,7 @@ minetest.register_node("mcl_core:podzol", { _mcl_hardness = 0.6, _mcl_silk_touch_drop = true, }) -mcl_core.register_snowed_node("mcl_core:podzol_snow", "mcl_core:podzol") +mcl_core.register_snowed_node("mcl_core:podzol_snow", "mcl_core:podzol", nil, nil, false, S("Podzol with Snow")) minetest.register_node("mcl_core:dirt", { description = S("Dirt"), @@ -924,7 +924,7 @@ for i=1,8 do desc = S("Top Snow") tt_help = S("Stackable") longdesc = S("Top snow is a layer of snow. It melts near light sources other than the sun with a light level of 12 or higher.").."\n"..S("Top snow can be stacked and has one of 8 different height levels. At levels 2-8, top snow is collidable. Top snow drops 2-9 snowballs, depending on its height.") - usagehelp = S("This block can only be placed on full solid blocks and on another top snow (which increases its height).") + usagehelp = S("This block can only be placed on full solid blocks and on another top snow (which increases its height).") walkable = false else id = "mcl_core:snow_"..i From c36dc165275800c5cd46278ceeb30d7ef395db62 Mon Sep 17 00:00:00 2001 From: Elias Fleckenstein Date: Mon, 4 Jan 2021 10:15:28 +0100 Subject: [PATCH 3/6] Fix #948 --- mods/ENTITIES/mcl_item_entity/init.lua | 10 +++++----- mods/ITEMS/mcl_core/nodes_base.lua | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mods/ENTITIES/mcl_item_entity/init.lua b/mods/ENTITIES/mcl_item_entity/init.lua index dda2bc91c1..946f219978 100644 --- a/mods/ENTITIES/mcl_item_entity/init.lua +++ b/mods/ENTITIES/mcl_item_entity/init.lua @@ -297,9 +297,9 @@ function minetest.handle_node_drops(pos, drops, digger) * true: Drop itself when dug by shears / silk touch tool * table: Drop every itemstring in this table when dug by shears _mcl_silk_touch_drop ]] - + local enchantments = tool and mcl_enchanting.get_enchantments(tool, "silk_touch") - + local silk_touch_drop = false local nodedef = minetest.registered_nodes[dug_node.name] if toolcaps ~= nil and toolcaps.groupcaps and toolcaps.groupcaps.shearsy_dig and nodedef._mcl_shears_drop then @@ -316,7 +316,7 @@ function minetest.handle_node_drops(pos, drops, digger) drops = nodedef._mcl_silk_touch_drop end end - + if tool and nodedef._mcl_fortune_drop and enchantments.fortune then local fortune_level = enchantments.fortune local fortune_drop = nodedef._mcl_fortune_drop @@ -331,7 +331,7 @@ function minetest.handle_node_drops(pos, drops, digger) end else -- Fixed Behavior - local drop = get_fortune_drops(fortune_drops, fortune_level) + local drop = get_fortune_drops(fortune_drop, fortune_level) drops = get_drops(drop, tool:get_name(), dug_node.param2, nodedef.paramtype2) end end @@ -342,7 +342,7 @@ function minetest.handle_node_drops(pos, drops, digger) mcl_experience.throw_experience(pos, experience_amount) end end - + for _,item in ipairs(drops) do local count if type(item) == "string" then diff --git a/mods/ITEMS/mcl_core/nodes_base.lua b/mods/ITEMS/mcl_core/nodes_base.lua index 658b390814..01dd2d3651 100644 --- a/mods/ITEMS/mcl_core/nodes_base.lua +++ b/mods/ITEMS/mcl_core/nodes_base.lua @@ -503,7 +503,7 @@ minetest.register_node("mcl_core:gravel", { {items = {'mcl_core:gravel'}} } }, - [3] = "mcl_core:flint" + [3] = "mcl_core:flint", }, }) From f86cf37ac9663e89cfee7fdc3c5c22376925ec75 Mon Sep 17 00:00:00 2001 From: Elias Fleckenstein Date: Mon, 4 Jan 2021 13:30:30 +0100 Subject: [PATCH 4/6] Fix zombies sometimes just disappearing when dieing to fire --- mods/ENTITIES/mcl_burning/engine.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mods/ENTITIES/mcl_burning/engine.lua b/mods/ENTITIES/mcl_burning/engine.lua index 266aa791f7..d7728f8971 100644 --- a/mods/ENTITIES/mcl_burning/engine.lua +++ b/mods/ENTITIES/mcl_burning/engine.lua @@ -106,9 +106,10 @@ function mcl_burning.damage(obj) damage = 1 end local new_hp = hp - damage - obj:set_hp(new_hp) if health then luaentity.health = new_hp + else + obj:set_hp(new_hp) end end end From 269ebc2718bbfd715855f020db2783ba9f6417f5 Mon Sep 17 00:00:00 2001 From: Elias Fleckenstein Date: Mon, 4 Jan 2021 13:34:57 +0100 Subject: [PATCH 5/6] Fix Silk Touch drop of Top Snow --- 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 01dd2d3651..3dedca2097 100644 --- a/mods/ITEMS/mcl_core/nodes_base.lua +++ b/mods/ITEMS/mcl_core/nodes_base.lua @@ -1028,7 +1028,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 = true, + _mcl_silk_touch_drop = {"mcl_core:snow " .. (i+1)}, }) end From 507f2d872b9b266718b0d436671ae1e352910d91 Mon Sep 17 00:00:00 2001 From: Elias Fleckenstein Date: Mon, 4 Jan 2021 14:21:28 +0100 Subject: [PATCH 6/6] Fix #949 --- mods/ENTITIES/mcl_boats/init.lua | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/mods/ENTITIES/mcl_boats/init.lua b/mods/ENTITIES/mcl_boats/init.lua index 9d0e455572..dda6321f97 100644 --- a/mods/ENTITIES/mcl_boats/init.lua +++ b/mods/ENTITIES/mcl_boats/init.lua @@ -59,6 +59,15 @@ local boat = { _animation = 0, -- 0: not animated; 1: paddling forwards; -1: paddling forwards } +local function detach_player(player) + player:set_detach() + player:set_properties({visual_size = {x=1, y=1}}) + mcl_player.player_attached[player:get_player_name()] = false + mcl_player.player_set_animation(player, "stand" , 30) +end + +minetest.register_on_respawnplayer(detach_player) + function boat.on_rightclick(self, clicker) if not clicker or not clicker:is_player() then return @@ -66,10 +75,7 @@ function boat.on_rightclick(self, clicker) local name = clicker:get_player_name() if self._driver and clicker == self._driver then self._driver = nil - clicker:set_detach() - clicker:set_properties({visual_size = {x=1, y=1}}) - mcl_player.player_attached[name] = false - mcl_player.player_set_animation(clicker, "stand" , 30) + detach_player(clicker) local pos = clicker:get_pos() pos = {x = pos.x, y = pos.y + 0.2, z = pos.z} clicker:set_pos(pos)