From 33903704410c76046ea1622d72f4bed50032c11e Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sun, 3 Jan 2021 14:21:50 +0100 Subject: [PATCH 1/7] Update README --- README.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 139e2b51cd..6e5712df9b 100644 --- a/README.md +++ b/README.md @@ -14,9 +14,10 @@ Or you can play in “creative mode” in which you can build almost anything in #### Gameplay summary -* Sandbox-style gameplay, no goals (for now) +* Sandbox-style gameplay, no goals * Survive: Fight against hostile monsters and hunger * Mine for ores and other treasures +* Magic: Gain experience and enchant your tools * Use the collected blocks to create great buildings, your imagination is the limit * Collect flowers (and other dye sources) and colorize your world * Find some seeds and start farming @@ -102,7 +103,7 @@ big bugs (such as “missing node” errors or even crashes). The following main features are available: * Tools, weapons -* Armor (unbalanced) +* Armor * Crafting system: 2×2 grid, crafting table (3×3 grid), furnace, including a crafting guide * Chests, large chests, ender chests, shulker boxes * Furnaces, hoppers @@ -117,6 +118,8 @@ The following main features are available: * Redstone circuits (partially) * Minecarts (partial) * Status effects (partial) +* Experience +* Enchanting * Brewing, potions, tipped arrow (partial) * Boats * Fire @@ -142,12 +145,9 @@ The following main features are available: The following features are incomplete: * Generated structures (especially villages) -* NPCs * Some monsters and animals * Redstone-related things * The End -* Enchanting -* Experience * Special minecarts * A couple of non-trivial blocks and items @@ -261,7 +261,6 @@ Various sources. See the respective mod directories for details. ## Info for programmers You find interesting and useful infos in `API.md`. -This project is currently mostly a one-person project. ## Legal information This is a fan game, not developed or endorsed by Mojang AB. From 4c2f3f2b7cea5b132d7485b4d54def1fe72b8e46 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sun, 3 Jan 2021 14:22:19 +0100 Subject: [PATCH 2/7] Fix possible crash in mcl_craftguide --- mods/HELP/mcl_craftguide/init.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mods/HELP/mcl_craftguide/init.lua b/mods/HELP/mcl_craftguide/init.lua index 86bd742a99..2474d20705 100644 --- a/mods/HELP/mcl_craftguide/init.lua +++ b/mods/HELP/mcl_craftguide/init.lua @@ -1108,8 +1108,12 @@ if progressive_mode then local meta = player:get_meta() local name = player:get_player_name() local data = player_data[name] + local inv_items = data.inv_items + if not inv_items then + inv_items = {} + end - meta:set_string("inv_items", serialize(data.inv_items)) + meta:set_string("inv_items", serialize(inv_items)) end M.register_on_leaveplayer(function(player) From 6cc029a6e4e95ea91509bcc0e2c4751d8d832668 Mon Sep 17 00:00:00 2001 From: Elias Fleckenstein Date: Sun, 3 Jan 2021 14:26:05 +0100 Subject: [PATCH 3/7] Fix #931 --- mods/HELP/mcl_craftguide/init.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mods/HELP/mcl_craftguide/init.lua b/mods/HELP/mcl_craftguide/init.lua index 86bd742a99..3fd89fbf7d 100644 --- a/mods/HELP/mcl_craftguide/init.lua +++ b/mods/HELP/mcl_craftguide/init.lua @@ -1100,7 +1100,7 @@ if progressive_mode then local meta = player:get_meta() local name = player:get_player_name() local data = player_data[name] - + data.inv_items = deserialize(meta:get_string("inv_items")) or {} end) @@ -1108,7 +1108,11 @@ if progressive_mode then local meta = player:get_meta() local name = player:get_player_name() local data = player_data[name] - + + if not data or not data.inv_items then + return + end + meta:set_string("inv_items", serialize(data.inv_items)) end From 0fe1707c2f26d108bc3a282b2b40b51e2209d490 Mon Sep 17 00:00:00 2001 From: Elias Fleckenstein Date: Sun, 3 Jan 2021 14:32:31 +0100 Subject: [PATCH 4/7] Remove spaces --- mods/HELP/mcl_craftguide/init.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mods/HELP/mcl_craftguide/init.lua b/mods/HELP/mcl_craftguide/init.lua index 3fd89fbf7d..d1258a71fb 100644 --- a/mods/HELP/mcl_craftguide/init.lua +++ b/mods/HELP/mcl_craftguide/init.lua @@ -1100,7 +1100,7 @@ if progressive_mode then local meta = player:get_meta() local name = player:get_player_name() local data = player_data[name] - + data.inv_items = deserialize(meta:get_string("inv_items")) or {} end) @@ -1108,11 +1108,11 @@ if progressive_mode then local meta = player:get_meta() local name = player:get_player_name() local data = player_data[name] - + if not data or not data.inv_items then return end - + meta:set_string("inv_items", serialize(data.inv_items)) end From 9e97331bdc3a15a63802f9676d68d3fc1c11b3f0 Mon Sep 17 00:00:00 2001 From: Elias Fleckenstein Date: Sun, 3 Jan 2021 15:10:50 +0100 Subject: [PATCH 5/7] Fix mobs despawning while close to player --- mods/ENTITIES/mcl_mobs/api.lua | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/mods/ENTITIES/mcl_mobs/api.lua b/mods/ENTITIES/mcl_mobs/api.lua index be7086e8d8..da25436458 100644 --- a/mods/ENTITIES/mcl_mobs/api.lua +++ b/mods/ENTITIES/mcl_mobs/api.lua @@ -647,9 +647,9 @@ local item_drop = function(self, cooked, looting_level) -- no drops if disabled by setting if not mobs_drop_items then return end - + looting_level = looting_level or 0 - + -- no drops for child mobs (except monster) if (self.child and self.type ~= "monster") then return @@ -938,7 +938,7 @@ local is_at_cliff_or_danger = function(self) return true else local def = minetest.registered_nodes[bnode.name] - if def and def.walkable then + if def and def.walkable then return false end end @@ -951,7 +951,7 @@ end -- copy the 'mob facing cliff_or_danger check' from above, and rework to avoid water local is_at_water_danger = function(self) - + if not self.object:get_luaentity() then return false end @@ -976,7 +976,7 @@ local is_at_water_danger = function(self) return true else local def = minetest.registered_nodes[bnode.name] - if def and def.walkable then + if def and def.walkable then return false end end @@ -2350,10 +2350,10 @@ local do_states = function(self, dtime) lp = minetest.find_nodes_in_area_under_air( {x = s.x - 5, y = s.y - 0.5, z = s.z - 5}, {x = s.x + 5, y = s.y + 1, z = s.z + 5}, - {"group:solid"}) + {"group:solid"}) lp = #lp > 0 and lp[random(#lp)] - + -- did we find land? if lp then @@ -3598,15 +3598,15 @@ local mob_step = function(self, dtime) for n = 1, #close_objs do if close_objs[n]:is_player() then self.lifetimer = 20 - else - if math.random(1,10) <= 3 then - minetest.log("action", "Mob "..self.name.." despawns in mob_step at "..minetest.pos_to_string(pos)) - mcl_burning.extinguish(self.object) - self.object:remove() - return - end + return end end + if math.random(1, 10) <= 3 then + minetest.log("action", "Mob "..self.name.." despawns in mob_step at "..minetest.pos_to_string(pos)) + mcl_burning.extinguish(self.object) + self.object:remove() + return + end else minetest.log("action", "Mob "..self.name.." despawns in mob_step at "..minetest.pos_to_string(pos)) mcl_burning.extinguish(self.object) @@ -3842,7 +3842,7 @@ minetest.register_entity(name, { get_staticdata = function(self) return mob_staticdata(self) end, - + harmed_by_heal = def.harmed_by_heal, }) From 1fda78667f7c17e29b9420c702d398e1f693699a Mon Sep 17 00:00:00 2001 From: Elias Fleckenstein Date: Sun, 3 Jan 2021 15:23:29 +0100 Subject: [PATCH 6/7] Properly merge mcl_craftguide --- mods/HELP/mcl_craftguide/init.lua | 4 ---- 1 file changed, 4 deletions(-) diff --git a/mods/HELP/mcl_craftguide/init.lua b/mods/HELP/mcl_craftguide/init.lua index 18989529f6..e56b5071db 100644 --- a/mods/HELP/mcl_craftguide/init.lua +++ b/mods/HELP/mcl_craftguide/init.lua @@ -1113,15 +1113,11 @@ if progressive_mode then inv_items = {} end -<<<<<<< HEAD if not data or not data.inv_items then return end - meta:set_string("inv_items", serialize(data.inv_items)) -======= meta:set_string("inv_items", serialize(inv_items)) ->>>>>>> 4c2f3f2b7cea5b132d7485b4d54def1fe72b8e46 end M.register_on_leaveplayer(function(player) From 02777b1f65bfe434d07d2fc44c020acecbfdc67a Mon Sep 17 00:00:00 2001 From: Elias Fleckenstein Date: Sun, 3 Jan 2021 15:25:06 +0100 Subject: [PATCH 7/7] Fix mcl_craftguide completely --- mods/HELP/mcl_craftguide/init.lua | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/mods/HELP/mcl_craftguide/init.lua b/mods/HELP/mcl_craftguide/init.lua index e56b5071db..eb98bcce08 100644 --- a/mods/HELP/mcl_craftguide/init.lua +++ b/mods/HELP/mcl_craftguide/init.lua @@ -1108,15 +1108,13 @@ if progressive_mode then local meta = player:get_meta() local name = player:get_player_name() local data = player_data[name] - local inv_items = data.inv_items - if not inv_items then - inv_items = {} - end - if not data or not data.inv_items then + if not data then return end + local inv_items = data.inv_items or {} + meta:set_string("inv_items", serialize(inv_items)) end