From 4d922d9edf9938320643c5d8deb519bd835ccf64 Mon Sep 17 00:00:00 2001 From: GuyLiner Date: Sat, 4 Feb 2023 23:21:33 -0500 Subject: [PATCH 01/10] Added conditional based on existing fire damage conditional that will apply fire damage to a mob standing on top of a magma node that belongs to the "fire" group. The magma node has also been added to the fire group, making it so that standing on the node will do damage to the mob. In official Minecraft, magma blocks just do fire damage without the fire animation. Source: https://minecraft.fandom.com/wiki/Magma_Block --- mods/ENTITIES/mcl_mobs/physics.lua | 13 +++++++++++++ mods/ITEMS/mcl_nether/init.lua | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/mods/ENTITIES/mcl_mobs/physics.lua b/mods/ENTITIES/mcl_mobs/physics.lua index c7ea98c57..0c908b639 100644 --- a/mods/ENTITIES/mcl_mobs/physics.lua +++ b/mods/ENTITIES/mcl_mobs/physics.lua @@ -644,6 +644,7 @@ function mob_class:do_env_damage() end local nodef = minetest.registered_nodes[self.standing_in] + local nodef2 = minetest.registered_nodes[self.standing_on] -- rain if self.rain_damage > 0 then @@ -675,7 +676,19 @@ function mob_class:do_env_damage() return true end end + -- magma damage + elseif self.fire_damage > 0 + and (nodef2.groups.fire) then + if self.fire_damage ~= 0 then + + self.health = self.health - self.fire_damage + + if self:check_for_death("fire", {type = "environment", + pos = pos, node = self.standing_in}) then + return true + end + end -- lava damage elseif self.lava_damage > 0 and (nodef.groups.lava) then diff --git a/mods/ITEMS/mcl_nether/init.lua b/mods/ITEMS/mcl_nether/init.lua index 3f63c4333..548bd90d5 100644 --- a/mods/ITEMS/mcl_nether/init.lua +++ b/mods/ITEMS/mcl_nether/init.lua @@ -130,7 +130,7 @@ minetest.register_node("mcl_nether:magma", { is_ground_content = true, light_source = 3, sunlight_propagates = false, - groups = {pickaxey=1, building_block=1, material_stone=1}, + groups = {pickaxey=1, building_block=1, material_stone=1, fire=1}, sounds = mcl_sounds.node_sound_stone_defaults(), -- From walkover mod on_walk_over = function(loc, nodeiamon, player) From ccef2d11472897c0baa96a981833e09755b52899 Mon Sep 17 00:00:00 2001 From: FossFanatic Date: Thu, 2 Feb 2023 13:42:04 +0000 Subject: [PATCH 02/10] More sky improvements --- mods/ENVIRONMENT/mcl_weather/skycolor.lua | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/mods/ENVIRONMENT/mcl_weather/skycolor.lua b/mods/ENVIRONMENT/mcl_weather/skycolor.lua index ed3a1a8ce..d8ef50787 100644 --- a/mods/ENVIRONMENT/mcl_weather/skycolor.lua +++ b/mods/ENVIRONMENT/mcl_weather/skycolor.lua @@ -11,16 +11,22 @@ function mcl_weather.set_sky_box_clear(player, sky, fog) local sc = { day_sky = "#7BA4FF", day_horizon = "#C0D8FF", - dawn_sky = "#B4BAFA", - dawn_horizon = "#BAC1F0", + dawn_sky = "#7BA4FF", + dawn_horizon = "#C0D8FF", night_sky = "#000000", night_horizon = "#4A6790", + indoors = "#C0D8FF", + fog_sun_tint = "#ff5f33", + fog_moon_tint = nil, + fog_tint_type = "custom" } if sky then sc.day_sky = sky + sc.dawn_sky = sky end if fog then sc.day_horizon = fog + sc.dawn_horizon = fog end player:set_sky({ type = "regular", @@ -128,8 +134,12 @@ mcl_weather.skycolor = { dawn_horizon = water_color, night_sky = water_color, night_horizon = water_color, + indoors = water_color, + fog_sun_tint = water_color, + fog_moon_tint = water_color, + fog_tint_type = "custom" }, - clouds = true, + clouds = false, }) end if dim == "overworld" then @@ -258,6 +268,10 @@ mcl_weather.skycolor = { dawn_horizon = biomefog, night_sky = biomefog, night_horizon = biomefog, + indoors = biomefog, + fog_sun_tint = biomefog, + fog_moon_tint = biomefog, + fog_tint_type = "custom" }, clouds = false, }) From ce2011218ccf3f7a7770df99e0c367980d62435b Mon Sep 17 00:00:00 2001 From: FossFanatic Date: Thu, 2 Feb 2023 13:46:52 +0000 Subject: [PATCH 03/10] Make the default sunrisebg invisible --- textures/sunrisebg.png | Bin 0 -> 106 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 textures/sunrisebg.png diff --git a/textures/sunrisebg.png b/textures/sunrisebg.png new file mode 100644 index 0000000000000000000000000000000000000000..561afbfcbbfdfbb84e27ea066ad7eedfbeacd913 GIT binary patch literal 106 zcmeAS@N?(olHy`uVBq!ia0vp^AAneckr_z-`u21(kYWq)330tr6AEO$u@qeaq!>$r z{DK)Ap4~_Ta)dlx978NlCnrd-E=~~XX?n=Yz;c6uvEO%=I#8Cu)78&qol`;+074!c AegFUf literal 0 HcmV?d00001 From 9aeafe60531cf6b6cfd1a79db220b7ebcf8c5aa4 Mon Sep 17 00:00:00 2001 From: ancientmarinerdev Date: Sun, 22 Jan 2023 20:27:57 +0000 Subject: [PATCH 04/10] Fix mapgen issue for mcl5 to mcl2 conversion --- mods/MAPGEN/mcl_villages/utils.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mods/MAPGEN/mcl_villages/utils.lua b/mods/MAPGEN/mcl_villages/utils.lua index 3b882af0c..32ae04c1f 100644 --- a/mods/MAPGEN/mcl_villages/utils.lua +++ b/mods/MAPGEN/mcl_villages/utils.lua @@ -198,6 +198,9 @@ end ------------------------------------------------------------------------------- function settlements.evaluate_heightmap() local heightmap = minetest.get_mapgen_object("heightmap") + + if not heightmap then return max_height_difference + 1 end + -- max height and min height, initialize with impossible values for easier first time setting local max_y = -50000 local min_y = 50000 From ace6f8db435d78b7f90731f860ee7568cbe3e339 Mon Sep 17 00:00:00 2001 From: ancientmarinerdev Date: Fri, 3 Feb 2023 22:03:49 +0000 Subject: [PATCH 05/10] Ensure index for heightmap entry is within bounds --- mods/MAPGEN/mcl_villages/init.lua | 15 ++++++++--- mods/MAPGEN/mcl_villages/utils.lua | 43 +++++++++++++++++++++++------- 2 files changed, 46 insertions(+), 12 deletions(-) diff --git a/mods/MAPGEN/mcl_villages/init.lua b/mods/MAPGEN/mcl_villages/init.lua index 7ada9bbcb..0cb0712b5 100644 --- a/mods/MAPGEN/mcl_villages/init.lua +++ b/mods/MAPGEN/mcl_villages/init.lua @@ -80,20 +80,29 @@ end local mg_name = minetest.get_mapgen_setting("mg_name") if mg_name ~= "singlenode" then mcl_mapgen_core.register_generator("villages", nil, function(minp, maxp, blockseed) - -- don't build settlement underground if maxp.y < 0 then return end + -- randomly try to build settlements if blockseed % 77 ~= 17 then return end + --minetest.log("Rng good. Generate attempt") + -- needed for manual and automated settlement building -- don't build settlements on (too) uneven terrain local n=minetest.get_node_or_nil(minp) if n and n.name == "mcl_villages:structblock" then return end + --minetest.log("No existing village attempt here") + if villagegen[minetest.pos_to_string(minp)] ~= nil then return end + + --minetest.log("Not in village gen. Put down placeholder: " .. minetest.pos_to_string(minp) .. " || " .. minetest.pos_to_string(maxp)) minetest.set_node(minp,{name="mcl_villages:structblock"}) local height_difference = settlements.evaluate_heightmap() - if height_difference > max_height_difference then return end - + if not height_difference or height_difference > max_height_difference then + minetest.log("action", "Do not spawn village here as heightmap not good") + return + end + --minetest.log("Build me a village: " .. minetest.pos_to_string(minp) .. " || " .. minetest.pos_to_string(maxp)) villagegen[minetest.pos_to_string(minp)]={minp=vector.new(minp), maxp=vector.new(maxp), blockseed=blockseed} end) end diff --git a/mods/MAPGEN/mcl_villages/utils.lua b/mods/MAPGEN/mcl_villages/utils.lua index 32ae04c1f..5ed3cbbe0 100644 --- a/mods/MAPGEN/mcl_villages/utils.lua +++ b/mods/MAPGEN/mcl_villages/utils.lua @@ -199,7 +199,12 @@ end function settlements.evaluate_heightmap() local heightmap = minetest.get_mapgen_object("heightmap") - if not heightmap then return max_height_difference + 1 end + if not heightmap then + minetest.log("action", "No heightmap. That should not happen") + return max_height_difference + 1 + end + + --minetest.log("action", "heightmap size: " .. tostring(#heightmap)) -- max height and min height, initialize with impossible values for easier first time setting local max_y = -50000 @@ -208,16 +213,32 @@ function settlements.evaluate_heightmap() local square_start = 1621 local square_end = 1661 for j = 1 , 40, 1 do + if square_start >= #heightmap then + --minetest.log("action", "Heightmap size reached. Go no further outside") + break + end for i = square_start, square_end, 1 do - -- skip buggy heightmaps, return high value - if heightmap[i] == -31000 or heightmap[i] == 31000 then - return max_height_difference + 1 + --minetest.log("action", "current hm index: " .. tostring(i) .. "current hm entry: " .. tostring(heightmap[i])) + + if i >= #heightmap then + --minetest.log("action", "Heightmap size reached. Go no further") + break end - if heightmap[i] < min_y then - min_y = heightmap[i] - end - if heightmap[i] > max_y then - max_y = heightmap[i] + local current_hm_entry = heightmap[i] + if current_hm_entry then + -- skip buggy heightmaps, return high value. Converted mcl5 maps can be -31007 + if current_hm_entry == -31000 or heightmap[i] == 31000 then + --minetest.log("action", "incorrect heighmap values. abandon") + return max_height_difference + 1 + end + if current_hm_entry < min_y then + min_y = current_hm_entry + end + if current_hm_entry > max_y then + max_y = current_hm_entry + end + else + --minetest.log("action", "Failed to get hm index: " .. tostring(i) .. "and ... " .. tostring(#heightmap)) end end -- set next line @@ -226,10 +247,14 @@ function settlements.evaluate_heightmap() end -- return the difference between highest and lowest pos in chunk local height_diff = max_y - min_y + + --minetest.log("action", "height_diff = " .. tostring(height_diff)) + -- filter buggy heightmaps if height_diff <= 1 then return max_height_difference + 1 end + --minetest.log("action", "return heigh diff = " .. tostring(height_diff)) -- debug info settlements.debug("heightdiff ".. height_diff) return height_diff From 156d096a78d76ac73672b62158a31686261ed9f6 Mon Sep 17 00:00:00 2001 From: SmokeyDope Date: Sun, 5 Feb 2023 23:30:41 +0000 Subject: [PATCH 06/10] Add compostability to warped fungus and crimson fungus --- mods/ITEMS/mcl_crimson/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/ITEMS/mcl_crimson/init.lua b/mods/ITEMS/mcl_crimson/init.lua index 0c61f3cee..5f763ea74 100644 --- a/mods/ITEMS/mcl_crimson/init.lua +++ b/mods/ITEMS/mcl_crimson/init.lua @@ -74,7 +74,7 @@ minetest.register_node("mcl_crimson:warped_fungus", { sunlight_propagates = true, paramtype = "light", walkable = false, - groups = {dig_immediate=3,mushroom=1,attached_node=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1,enderman_takable=1,deco_block=1}, + groups = {dig_immediate=3,mushroom=1,attached_node=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1,enderman_takable=1,deco_block=1,compostability=65}, light_source = 1, sounds = mcl_sounds.node_sound_leaves_defaults(), node_placement_prediction = "", @@ -458,7 +458,7 @@ minetest.register_node("mcl_crimson:crimson_fungus", { sunlight_propagates = true, paramtype = "light", walkable = false, - groups = {dig_immediate=3,mushroom=1,attached_node=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1,enderman_takable=1,deco_block=1}, + groups = {dig_immediate=3,mushroom=1,attached_node=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1,enderman_takable=1,deco_block=1,compostability=65}, light_source = 1, sounds = mcl_sounds.node_sound_leaves_defaults(), selection_box = { From cac6e15736c8a9d934d9e476536dced6375a9294 Mon Sep 17 00:00:00 2001 From: SmokeyDope Date: Sun, 5 Feb 2023 23:40:12 +0000 Subject: [PATCH 07/10] Add compostability to twisting vines and weeping vines --- mods/ITEMS/mcl_crimson/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/ITEMS/mcl_crimson/init.lua b/mods/ITEMS/mcl_crimson/init.lua index 5f763ea74..05f43d0ae 100644 --- a/mods/ITEMS/mcl_crimson/init.lua +++ b/mods/ITEMS/mcl_crimson/init.lua @@ -109,7 +109,7 @@ minetest.register_node("mcl_crimson:twisting_vines", { walkable = false, climbable = true, buildable_to = true, - groups = {dig_immediate=3, shearsy=1, vines=1, dig_by_water=1, destroy_by_lava_flow=1, dig_by_piston=1, deco_block=1}, + groups = {dig_immediate=3, shearsy=1, vines=1, dig_by_water=1, destroy_by_lava_flow=1, dig_by_piston=1, deco_block=1, compostability=50}, sounds = mcl_sounds.node_sound_leaves_defaults(), selection_box = { type = "fixed", @@ -184,7 +184,7 @@ minetest.register_node("mcl_crimson:weeping_vines", { walkable = false, climbable = true, buildable_to = true, - groups = {dig_immediate=3, shearsy=1, vines=1, dig_by_water=1, destroy_by_lava_flow=1, dig_by_piston=1, deco_block=1}, + groups = {dig_immediate=3, shearsy=1, vines=1, dig_by_water=1, destroy_by_lava_flow=1, dig_by_piston=1, deco_block=1, compostability=50}, sounds = mcl_sounds.node_sound_leaves_defaults(), selection_box = { type = "fixed", From 1401652015450d110140e13968d8c102c5946aa2 Mon Sep 17 00:00:00 2001 From: SmokeyDope Date: Sun, 5 Feb 2023 23:45:37 +0000 Subject: [PATCH 08/10] Add compostability to warped roots and crimson roots --- mods/ITEMS/mcl_crimson/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/ITEMS/mcl_crimson/init.lua b/mods/ITEMS/mcl_crimson/init.lua index 05f43d0ae..f5b23b3fc 100644 --- a/mods/ITEMS/mcl_crimson/init.lua +++ b/mods/ITEMS/mcl_crimson/init.lua @@ -280,7 +280,7 @@ minetest.register_node("mcl_crimson:warped_roots", { paramtype = "light", walkable = false, buildable_to = true, - groups = {dig_immediate=3,vines=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1,deco_block=1, shearsy = 1}, + groups = {dig_immediate=3,vines=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1,deco_block=1,shearsy = 1,compostability=65}, sounds = mcl_sounds.node_sound_leaves_defaults(), selection_box = { type = "fixed", @@ -496,7 +496,7 @@ minetest.register_node("mcl_crimson:crimson_roots", { paramtype = "light", walkable = false, buildable_to = true, - groups = {dig_immediate=3,vines=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1,deco_block=1, shearsy = 1}, + groups = {dig_immediate=3,vines=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1,deco_block=1,shearsy = 1,compostability=65}, sounds = mcl_sounds.node_sound_leaves_defaults(), selection_box = { type = "fixed", From 88cf3a590093e420d3f11f101f59d47c1f76e6ec Mon Sep 17 00:00:00 2001 From: SmokeyDope Date: Sun, 5 Feb 2023 23:48:50 +0000 Subject: [PATCH 09/10] Add compostability to nether sprouts --- mods/ITEMS/mcl_crimson/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_crimson/init.lua b/mods/ITEMS/mcl_crimson/init.lua index f5b23b3fc..213237351 100644 --- a/mods/ITEMS/mcl_crimson/init.lua +++ b/mods/ITEMS/mcl_crimson/init.lua @@ -258,7 +258,7 @@ minetest.register_node("mcl_crimson:nether_sprouts", { paramtype = "light", walkable = false, buildable_to = true, - groups = {dig_immediate=3,vines=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1,deco_block=1, shearsy = 1}, + groups = {dig_immediate=3,vines=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1,deco_block=1,shearsy=1,compostability=50}, sounds = mcl_sounds.node_sound_leaves_defaults(), selection_box = { type = "fixed", From 48eb934d64b9584b8b13b6f91e534fcd81b60472 Mon Sep 17 00:00:00 2001 From: SmokeyDope Date: Mon, 6 Feb 2023 00:01:10 +0000 Subject: [PATCH 10/10] Add compostability to warped wart blocks and shroomlight --- mods/ITEMS/mcl_crimson/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/ITEMS/mcl_crimson/init.lua b/mods/ITEMS/mcl_crimson/init.lua index 213237351..039268c13 100644 --- a/mods/ITEMS/mcl_crimson/init.lua +++ b/mods/ITEMS/mcl_crimson/init.lua @@ -301,7 +301,7 @@ mcl_flowerpots.register_potted_flower("mcl_crimson:warped_roots", { minetest.register_node("mcl_crimson:warped_wart_block", { description = S("Warped Wart Block"), tiles = {"warped_wart_block.png"}, - groups = {handy = 1, hoey = 7, swordy = 1, deco_block = 1}, + groups = {handy = 1, hoey = 7, swordy = 1, deco_block = 1, compostability = 85}, _mcl_hardness = 1, sounds = mcl_sounds.node_sound_leaves_defaults({ footstep={name="default_dirt_footstep", gain=0.7}, @@ -312,7 +312,7 @@ minetest.register_node("mcl_crimson:warped_wart_block", { minetest.register_node("mcl_crimson:shroomlight", { description = S("Shroomlight"), tiles = {"shroomlight.png"}, - groups = {handy = 1, hoey = 7, swordy = 1, deco_block = 1}, + groups = {handy = 1, hoey = 7, swordy = 1, deco_block = 1, compostability = 65}, light_source = minetest.LIGHT_MAX, _mcl_hardness = 1, sounds = mcl_sounds.node_sound_leaves_defaults({