From 7f5b19cda81b792ca36532a11e8bf6142b5b839a Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Thu, 25 Jul 2024 18:14:50 +0700 Subject: [PATCH 1/3] Fix missing dependencies for random_mod_load_order --- mods/CORE/_mcl_autogroup/mod.conf | 1 + mods/ENVIRONMENT/mcl_void_damage/mod.conf | 2 +- mods/HUD/mcl_death_messages/mod.conf | 2 +- mods/HUD/mcl_title/mod.conf | 4 ++-- mods/ITEMS/REDSTONE/mesecons_button/mod.conf | 2 +- mods/ITEMS/mcl_crimson/mod.conf | 2 +- mods/ITEMS/mcl_fences/mod.conf | 2 +- mods/ITEMS/mcl_grindstone/mod.conf | 2 +- 8 files changed, 9 insertions(+), 8 deletions(-) diff --git a/mods/CORE/_mcl_autogroup/mod.conf b/mods/CORE/_mcl_autogroup/mod.conf index db43aff39..f62edd60b 100644 --- a/mods/CORE/_mcl_autogroup/mod.conf +++ b/mods/CORE/_mcl_autogroup/mod.conf @@ -1,3 +1,4 @@ name = _mcl_autogroup +depends = mcl_autogroup author = ryvnf description = VoxeLibre core mod which automatically adds groups to all items. Very important for digging times. diff --git a/mods/ENVIRONMENT/mcl_void_damage/mod.conf b/mods/ENVIRONMENT/mcl_void_damage/mod.conf index 1358e5217..83d76956f 100644 --- a/mods/ENVIRONMENT/mcl_void_damage/mod.conf +++ b/mods/ENVIRONMENT/mcl_void_damage/mod.conf @@ -1,4 +1,4 @@ name = mcl_void_damage author = Wuzzy description = Deal damage to entities stuck in the deep void -depends = mcl_worlds +depends = mcl_worlds, mcl_spawn diff --git a/mods/HUD/mcl_death_messages/mod.conf b/mods/HUD/mcl_death_messages/mod.conf index a634e16de..5497e9473 100644 --- a/mods/HUD/mcl_death_messages/mod.conf +++ b/mods/HUD/mcl_death_messages/mod.conf @@ -1,4 +1,4 @@ name = mcl_death_messages author = 4Evergreen4 description = Shows messages in chat when a player dies. -depends = mcl_colors +depends = mcl_colors, mcl_damage diff --git a/mods/HUD/mcl_title/mod.conf b/mods/HUD/mcl_title/mod.conf index 0f29a8118..ee6104479 100644 --- a/mods/HUD/mcl_title/mod.conf +++ b/mods/HUD/mcl_title/mod.conf @@ -1,4 +1,4 @@ name = mcl_title -description = Add an API to add in HUD title -depends = mcl_colors +description = Add an API to add in HUD title +depends = mcl_colors, mcl_util author = AFCMS \ No newline at end of file diff --git a/mods/ITEMS/REDSTONE/mesecons_button/mod.conf b/mods/ITEMS/REDSTONE/mesecons_button/mod.conf index be127362b..a554792a1 100644 --- a/mods/ITEMS/REDSTONE/mesecons_button/mod.conf +++ b/mods/ITEMS/REDSTONE/mesecons_button/mod.conf @@ -1,3 +1,3 @@ name = mesecons_button -depends = mesecons +depends = mesecons, mesecons_mvps optional_depends = doc diff --git a/mods/ITEMS/mcl_crimson/mod.conf b/mods/ITEMS/mcl_crimson/mod.conf index b4303cd48..fcfa34a2f 100644 --- a/mods/ITEMS/mcl_crimson/mod.conf +++ b/mods/ITEMS/mcl_crimson/mod.conf @@ -1,3 +1,3 @@ name = mcl_crimson author = debiankaios, Exhale -depends = mcl_core, mcl_stairs, mobs_mc, mcl_util, mcl_dye, mcl_flowerpots +depends = mcl_core, mcl_fences, mcl_stairs, mobs_mc, mcl_util, mcl_dye, mcl_flowerpots diff --git a/mods/ITEMS/mcl_fences/mod.conf b/mods/ITEMS/mcl_fences/mod.conf index 8b20dd169..aba4a33c3 100644 --- a/mods/ITEMS/mcl_fences/mod.conf +++ b/mods/ITEMS/mcl_fences/mod.conf @@ -1,3 +1,3 @@ name = mcl_fences -depends = mcl_core, mcl_sounds +depends = mcl_core, mcl_nether, mcl_sounds optional_depends = doc, screwdriver diff --git a/mods/ITEMS/mcl_grindstone/mod.conf b/mods/ITEMS/mcl_grindstone/mod.conf index 66773c57f..42f792ef9 100644 --- a/mods/ITEMS/mcl_grindstone/mod.conf +++ b/mods/ITEMS/mcl_grindstone/mod.conf @@ -1,4 +1,4 @@ name = mcl_grindstone author = TheRandomLegoBrick, ChrisPHP -depends = mcl_experience, mcl_sounds +depends = mcl_experience, mcl_formspec, mcl_sounds description = Add block that disenchants tools and armour except for curses, and repairs two items of the same type it is also the weapon smith's work station. From fb3e9dae8494d5bff0c408ce528c1e8b1a5c2705 Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Thu, 25 Jul 2024 19:30:44 +0700 Subject: [PATCH 2/3] autogroup: Do node overwrites after all mods have loaded --- mods/CORE/_mcl_autogroup/init.lua | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/mods/CORE/_mcl_autogroup/init.lua b/mods/CORE/_mcl_autogroup/init.lua index 884508032..7139535d2 100644 --- a/mods/CORE/_mcl_autogroup/init.lua +++ b/mods/CORE/_mcl_autogroup/init.lua @@ -117,10 +117,6 @@ end -- Array of unique hardness values for each group which affects dig time. local hardness_values = get_hardness_values_for_groups() --- Map indexed by hardness values which return the index of that value in --- hardness_value. Used for quick lookup. -local hardness_lookup = get_hardness_lookup_for_groups(hardness_values) - --[[local function compute_creativetimes(group) local creativetimes = {} @@ -186,6 +182,7 @@ local function add_groupcaps(toolname, groupcaps, groupcaps_def, efficiency) local mult = capsdef.speed or 1 local uses = capsdef.uses local def = mcl_autogroup.registered_diggroups[g] + assert(def, toolname .. " has unknown diggroup '" .. dump(g) .. "'") local max_level = def.levels and #def.levels or 1 assert(capsdef.level, toolname .. ' is missing level for ' .. g) @@ -313,6 +310,13 @@ function mcl_autogroup.get_wear(toolname, diggroup) end local function overwrite() + -- Refresh, now that all groups are known. + hardness_values = get_hardness_values_for_groups() + + -- Map indexed by hardness values which return the index of that value in + -- hardness_value. Used for quick lookup. + local hardness_lookup = get_hardness_lookup_for_groups(hardness_values) + for nname, ndef in pairs(minetest.registered_nodes) do local newgroups = table.copy(ndef.groups) if (nname ~= "ignore" and ndef.diggable) then @@ -374,4 +378,5 @@ local function overwrite() end end -overwrite() +-- Make sure all tools and groups are registered +minetest.register_on_mods_loaded(overwrite) From 1707eef6725f14cd2d9b26afed52ba771d74feb9 Mon Sep 17 00:00:00 2001 From: teknomunk Date: Sat, 14 Sep 2024 08:53:16 -0500 Subject: [PATCH 3/3] Fix two additional dependency issues --- mods/ENTITIES/mobs_mc/mod.conf | 2 +- mods/ITEMS/mcl_crimson/mod.conf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/ENTITIES/mobs_mc/mod.conf b/mods/ENTITIES/mobs_mc/mod.conf index ec7446505..f90989d1a 100644 --- a/mods/ENTITIES/mobs_mc/mod.conf +++ b/mods/ENTITIES/mobs_mc/mod.conf @@ -1,5 +1,5 @@ name = mobs_mc author = maikerumine description = Adds Minecraft-like monsters and animals. -depends = mcl_init, mcl_particles, mcl_mobs, mcl_wip, mcl_core, mcl_util +depends = mcl_init, mcl_particles, mcl_mobs, mcl_wip, mcl_core, mcl_util, mcl_entity_invs optional_depends = default, mcl_tnt, mcl_bows, mcl_throwing, mcl_fishing, bones, mesecons_materials, doc_items, mcl_worlds diff --git a/mods/ITEMS/mcl_crimson/mod.conf b/mods/ITEMS/mcl_crimson/mod.conf index fcfa34a2f..86be6bfe8 100644 --- a/mods/ITEMS/mcl_crimson/mod.conf +++ b/mods/ITEMS/mcl_crimson/mod.conf @@ -1,3 +1,3 @@ name = mcl_crimson author = debiankaios, Exhale -depends = mcl_core, mcl_fences, mcl_stairs, mobs_mc, mcl_util, mcl_dye, mcl_flowerpots +depends = mcl_core, mcl_fences, mcl_stairs, mobs_mc, mcl_util, mcl_dye, mcl_flowerpots, mcl_doors