From b56ae38939bd1389cd4227aade573d608fad4b7b Mon Sep 17 00:00:00 2001 From: MysticTempest Date: Tue, 22 Dec 2020 08:29:24 -0600 Subject: [PATCH 1/7] Make lava/fire wait 2 seconds before destroying items to allow chance for pickup, fix dogs following when sitting, and add some rotation so mobs don't idle at cliffs. --- mods/ENTITIES/mcl_item_entity/init.lua | 13 ++++++++----- mods/ENTITIES/mcl_mobs/api.lua | 10 ++++++++++ 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/mods/ENTITIES/mcl_item_entity/init.lua b/mods/ENTITIES/mcl_item_entity/init.lua index 641348132..214ee5504 100644 --- a/mods/ENTITIES/mcl_item_entity/init.lua +++ b/mods/ENTITIES/mcl_item_entity/init.lua @@ -632,12 +632,15 @@ minetest.register_entity(":__builtin:item", { local fg = minetest.get_item_group(nn, "fire") local dg = minetest.get_item_group(nn, "destroys_items") if (def and (lg ~= 0 or fg ~= 0 or dg == 1)) then - if dg ~= 2 then - minetest.sound_play("builtin_item_lava", {pos = self.object:get_pos(), gain = 0.5}, true) + --Wait 2 seconds to allow mob drops to be cooked, & picked up instead of instantly destroyed. + if self.age > 2 then + if dg ~= 2 then + minetest.sound_play("builtin_item_lava", {pos = self.object:get_pos(), gain = 0.5}) + end + self._removed = true + self.object:remove() + return end - self._removed = true - self.object:remove() - return end -- Push item out when stuck inside solid opaque node diff --git a/mods/ENTITIES/mcl_mobs/api.lua b/mods/ENTITIES/mcl_mobs/api.lua index 596843ac6..dffbd8b39 100644 --- a/mods/ENTITIES/mcl_mobs/api.lua +++ b/mods/ENTITIES/mcl_mobs/api.lua @@ -2059,6 +2059,7 @@ local follow_flop = function(self) or self.order == "follow") and not self.following and self.state ~= "attack" + and self.order ~= "sit" and self.state ~= "runaway" then local s = self.object:get_pos() @@ -2079,6 +2080,7 @@ local follow_flop = function(self) if self.type == "npc" and self.order == "follow" and self.state ~= "attack" + and self.order ~= "sit" and self.owner ~= "" then -- npc stop following player if not owner @@ -2364,6 +2366,8 @@ local do_states = function(self, dtime) set_velocity(self, 0) self.state = "stand" set_animation(self, "stand") + local yaw = self.object:get_yaw() or 0 + yaw = set_yaw(self, yaw + 0.78, 8) else set_velocity(self, self.walk_velocity) @@ -2390,6 +2394,8 @@ local do_states = function(self, dtime) set_velocity(self, 0) self.state = "stand" set_animation(self, "stand") + local yaw = self.object:get_yaw() or 0 + yaw = set_yaw(self, yaw + 0.78, 8) else set_velocity(self, self.run_velocity) set_animation(self, "run") @@ -2622,6 +2628,8 @@ local do_states = function(self, dtime) set_velocity(self, 0) set_animation(self, "stand") + local yaw = self.object:get_yaw() or 0 + yaw = set_yaw(self, yaw + 0.78, 8) else if self.path.stuck then @@ -3516,6 +3524,8 @@ local mob_step = function(self, dtime) set_velocity(self, 0) self.state = "stand" set_animation(self, "stand") + local yaw = self.object:get_yaw() or 0 + yaw = set_yaw(self, yaw + 0.78, 8) end -- Despawning: when lifetimer expires, remove mob From 38f89fc9634aa22f96df165a16f83c56d9061fb4 Mon Sep 17 00:00:00 2001 From: MysticTempest Date: Wed, 23 Dec 2020 06:23:55 -0600 Subject: [PATCH 2/7] Fix concrete powder mechanics. --- mods/ITEMS/mcl_colorblocks/init.lua | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/mods/ITEMS/mcl_colorblocks/init.lua b/mods/ITEMS/mcl_colorblocks/init.lua index dad97f62f..4981b39b0 100644 --- a/mods/ITEMS/mcl_colorblocks/init.lua +++ b/mods/ITEMS/mcl_colorblocks/init.lua @@ -97,7 +97,7 @@ for _, row in ipairs(block.dyes) do _doc_items_create_entry = create_entry, _doc_items_entry_name = ename_cp, tiles = {"mcl_colorblocks_concrete_powder_"..name..".png"}, - groups = {handy=1,shovely=1, concrete_powder=1,building_block=1,falling_node=1, material_sand=1}, + groups = {handy=1,shovely=1, concrete_powder=1,building_block=1,falling_node=1, material_sand=1, float=1}, stack_max = 64, is_ground_content = false, sounds = mcl_sounds.node_sound_sand_defaults(), @@ -208,11 +208,20 @@ minetest.register_abm({ neighbors = {"group:water"}, action = function(pos, node) local harden_to = minetest.registered_nodes[node.name]._mcl_colorblocks_harden_to - -- It should be impossible for harden_to to be nil, but a Minetest bug might call - -- the ABM on the new concrete node, which isn't part of this ABM! - if harden_to then - node.name = harden_to - minetest.set_node(pos, node) - end + -- It should be impossible for harden_to to be nil, but a Minetest bug might call + -- the ABM on the new concrete node, which isn't part of this ABM! + if harden_to then + node.name = harden_to + --Fix "float" group not lowering concrete into the water by 1. + local water_pos = { x = pos.x, y = pos.y-1, z = pos.z } + local water_node = minetest.get_node(water_pos) + if minetest.get_item_group(water_node.name, "water") == 0 then + minetest.set_node(pos, node) + else + minetest.set_node(water_pos,node) + minetest.set_node(pos, {name = "air"}) + minetest.check_for_falling(pos) -- Update C. Powder that stacked above so they fall down after setting air. + end + end end, }) From c85f2f60646eb7a65125ba00f59ea17ea811d3d0 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Thu, 24 Dec 2020 04:05:07 +0100 Subject: [PATCH 3/7] Version 0.69.0 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 83bd4d861..eab5068cc 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ An unofficial Minecraft-like game for Minetest. Forked from MineClone by davedevils. Developed by Wuzzy and contributors. Not developed or endorsed by Mojang AB. -Version: 0.68.0 +Version: 0.69.0 ### Gameplay You start in a randomly-generated world made entirely of cubes. You can explore From 5385a3f2027bcb326cae61e0e12551369e8badc0 Mon Sep 17 00:00:00 2001 From: kay27 Date: Sun, 27 Dec 2020 17:11:22 +0400 Subject: [PATCH 4/7] Fix piston protection check --- mods/ITEMS/REDSTONE/mesecons_mvps/init.lua | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/mods/ITEMS/REDSTONE/mesecons_mvps/init.lua b/mods/ITEMS/REDSTONE/mesecons_mvps/init.lua index a9a11bce5..669edbcbb 100644 --- a/mods/ITEMS/REDSTONE/mesecons_mvps/init.lua +++ b/mods/ITEMS/REDSTONE/mesecons_mvps/init.lua @@ -145,7 +145,7 @@ function mesecon.mvps_get_stack(pos, dir, maximum, piston_pos) if not node_replaceable(nn.name) then if #nodes >= maximum then return nil, false end - table.insert(nodes, {node = nn, pos = np}) + table.insert(nodes, {node = nn, pos = {x=np.x, y=np.y, z=np.z}}) -- add connected nodes to frontiers, connected is a vector list -- the vectors must be absolute positions @@ -195,10 +195,9 @@ function mesecon.mvps_set_owner(pos, placer) end end -local function are_protected(positions, player_name) - local name = player_name - for _, pos in pairs(positions) do - if is_protected(pos, name) then +local function are_protected(nodes, player_name) + for _, node in pairs(nodes) do + if minetest.is_protected(node.pos, player_name) then return true end end From a4b2172ac5395368b284c65524ec918f7fecacd3 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sun, 27 Dec 2020 16:59:34 +0100 Subject: [PATCH 5/7] Version 0.69.1 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index eab5068cc..139e2b51c 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ An unofficial Minecraft-like game for Minetest. Forked from MineClone by davedevils. Developed by Wuzzy and contributors. Not developed or endorsed by Mojang AB. -Version: 0.69.0 +Version: 0.69.1 ### Gameplay You start in a randomly-generated world made entirely of cubes. You can explore From e8573189d81d8e5a38e0689243d99c43fad3f596 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Mon, 28 Dec 2020 15:32:24 +0100 Subject: [PATCH 6/7] Fix XP bar overflow after enchant --- mods/HUD/mcl_experience/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/HUD/mcl_experience/init.lua b/mods/HUD/mcl_experience/init.lua index 048bd43c6..b2768013f 100644 --- a/mods/HUD/mcl_experience/init.lua +++ b/mods/HUD/mcl_experience/init.lua @@ -148,7 +148,7 @@ function mcl_experience.set_player_xp_level(player,level) return end pool[name].level = level - pool[name].xp, pool[name].bar_step, pool[name].next_level = mcl_experience.bar_to_xp(pool[name].bar, level) + pool[name].xp, pool[name].bar_step, pool[name].xp_next_level = mcl_experience.bar_to_xp(pool[name].bar, level) hud_manager.change_hud({player = player, hud_name = "xp_level", element = "text", data = tostring(level)}) -- we may don't update the bar end From d42ee00290719d1080841dc81f672440cfad89f8 Mon Sep 17 00:00:00 2001 From: kay27 Date: Fri, 1 Jan 2021 22:53:13 +0000 Subject: [PATCH 7/7] Fix piston owner metadata storage --- mods/ITEMS/REDSTONE/mesecons_pistons/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/ITEMS/REDSTONE/mesecons_pistons/init.lua b/mods/ITEMS/REDSTONE/mesecons_pistons/init.lua index fba702ede..3230d9804 100644 --- a/mods/ITEMS/REDSTONE/mesecons_pistons/init.lua +++ b/mods/ITEMS/REDSTONE/mesecons_pistons/init.lua @@ -97,7 +97,7 @@ local piston_on = function (pos, node) local meta = minetest.get_meta(pos) local success, stack, oldstack = mesecon.mvps_push(np, dir, PISTON_MAXIMUM_PUSH, meta:get_string("owner"), pos) if success then - minetest.set_node(pos, {param2 = node.param2, name = pistonspec.onname}) + minetest.swap_node(pos, {param2 = node.param2, name = pistonspec.onname}) minetest.set_node(np, {param2 = node.param2, name = pistonspec.pusher}) local below = minetest.get_node({x=np.x,y=np.y-1,z=np.z}) if below.name == "mcl_farming:soil" or below.name == "mcl_farming:soil_wet" then @@ -115,7 +115,7 @@ end local piston_off = function (pos, node) local pistonspec = minetest.registered_nodes[node.name].mesecons_piston - minetest.add_node(pos, {param2 = node.param2, name = pistonspec.offname}) + minetest.swap_node(pos, {param2 = node.param2, name = pistonspec.offname}) piston_remove_pusher (pos, node) if not pistonspec.sticky then return