From e408dd45e576e92d3f7d8d35b7e552c9bac23687 Mon Sep 17 00:00:00 2001 From: ancientmarinerdev Date: Fri, 9 Dec 2022 19:30:06 +0000 Subject: [PATCH 01/39] Remove easter egg taking 3% of processing --- mods/ENTITIES/mcl_mobs/api.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mods/ENTITIES/mcl_mobs/api.lua b/mods/ENTITIES/mcl_mobs/api.lua index 4fb89dfa6..04c834ec3 100644 --- a/mods/ENTITIES/mcl_mobs/api.lua +++ b/mods/ENTITIES/mcl_mobs/api.lua @@ -471,7 +471,7 @@ local set_yaw = function(self, yaw, delay, dtime) if self.shaking and dtime then yaw = yaw + (random() * 2 - 1) * 5 * dtime end - update_roll(self) + --update_roll(self) return yaw end @@ -822,7 +822,7 @@ local update_tag = function(self) nametag = tag, }) - update_roll(self) + --update_roll(self) end -- drop items @@ -4457,7 +4457,7 @@ local mob_step = function(self, dtime) yaw = yaw + (random() * 2 - 1) * 5 * dtime end self.object:set_yaw(yaw) - update_roll(self) + --update_roll(self) end -- end rotation From f7f0a2be8b9ab7a387fec84c2b4c81ce77b305c0 Mon Sep 17 00:00:00 2001 From: ancientmarinerdev Date: Fri, 9 Dec 2022 22:59:58 +0000 Subject: [PATCH 02/39] Raids performance optimisation. Check for village less and over less distance. --- mods/CORE/mcl_events/init.lua | 4 ++++ mods/ENVIRONMENT/mcl_raids/init.lua | 4 +++- mods/ENVIRONMENT/mcl_zombie_sieges/init.lua | 21 +++++++++++++++------ 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/mods/CORE/mcl_events/init.lua b/mods/CORE/mcl_events/init.lua index 5ec2577a9..625076bae 100644 --- a/mods/CORE/mcl_events/init.lua +++ b/mods/CORE/mcl_events/init.lua @@ -102,6 +102,7 @@ function check_events(dtime) for _,e in pairs(mcl_events.registered_events) do local pp = e.cond_start() if pp then + --minetest.log("It's gonna start the raid maybe") for _,p in pairs(pp) do local start = true if e.exclusive_to_area then @@ -110,11 +111,14 @@ function check_events(dtime) end end if start then + --minetest.log("It's gonna start the raid definitely") start_event(p,e) elseif DBG then mcl_log("[mcl_events] Event "..e.readable_name.." already active at "..minetest.pos_to_string(vector.round(p.pos))) end end + else + --minetest.log("Do not start this raid") end end for idx,ae in pairs(active_events) do diff --git a/mods/ENVIRONMENT/mcl_raids/init.lua b/mods/ENVIRONMENT/mcl_raids/init.lua index 5a4575670..3c9c05157 100644 --- a/mods/ENVIRONMENT/mcl_raids/init.lua +++ b/mods/ENVIRONMENT/mcl_raids/init.lua @@ -217,7 +217,7 @@ function mcl_raids.find_villager(pos) end function mcl_raids.find_bed(pos) - return minetest.find_node_near(pos,128,{"mcl_beds:bed_red_bottom"}) + return minetest.find_node_near(pos,32,{"mcl_beds:bed_red_bottom"}) end function mcl_raids.find_village(pos) @@ -292,11 +292,13 @@ mcl_events.register_event("raid",{ exclusive_to_area = 128, enable_bossbar = true, cond_start = function(self) + --minetest.log("Cond start raid") local r = {} for _,p in pairs(minetest.get_connected_players()) do if mcl_potions.player_has_effect(p,"bad_omen") then local raid_pos = mcl_raids.find_village(p:get_pos()) if raid_pos then + --minetest.log("We have a raid position. Start raid") table.insert(r,{ player = p:get_player_name(), pos = raid_pos }) end end diff --git a/mods/ENVIRONMENT/mcl_zombie_sieges/init.lua b/mods/ENVIRONMENT/mcl_zombie_sieges/init.lua index 8a43b0e7e..3551d4734 100644 --- a/mods/ENVIRONMENT/mcl_zombie_sieges/init.lua +++ b/mods/ENVIRONMENT/mcl_zombie_sieges/init.lua @@ -26,15 +26,24 @@ mcl_events.register_event("zombie_siege",{ exclusive_to_area = 128, enable_bossbar = false, cond_start = function(self) + --minetest.log("Cond start zs") + local r = {} + + local t = minetest.get_timeofday() local pr = PseudoRandom(minetest.get_day_count()) local rnd = pr:next(1,10) - local t = minetest.get_timeofday() - local r = {} - for _,p in pairs(minetest.get_connected_players()) do - local village = mcl_raids.find_village(p:get_pos()) - if t < 0.04 and village and rnd == 1 then - table.insert(r,{ player = p:get_player_name(), pos = village}) + + if t < 0.04 and rnd == 1 then + --minetest.log("Well, it's siege time") + for _,p in pairs(minetest.get_connected_players()) do + local village = mcl_raids.find_village(p:get_pos()) + if village then + --minetest.log("Found village") + table.insert(r,{ player = p:get_player_name(), pos = village}) + end end + else + --minetest.log("Not night for a siege, or not success") end if #r > 0 then return r end end, From 9b94a752bd676b3060b83503a13a5508c6e224e2 Mon Sep 17 00:00:00 2001 From: ancientmarinerdev Date: Sun, 11 Dec 2022 20:22:06 +0000 Subject: [PATCH 03/39] Fixed bug that crashes zombie siege in context where z cannot spawn --- mods/ENVIRONMENT/mcl_zombie_sieges/init.lua | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/mods/ENVIRONMENT/mcl_zombie_sieges/init.lua b/mods/ENVIRONMENT/mcl_zombie_sieges/init.lua index 3551d4734..07db4bc7a 100644 --- a/mods/ENVIRONMENT/mcl_zombie_sieges/init.lua +++ b/mods/ENVIRONMENT/mcl_zombie_sieges/init.lua @@ -10,10 +10,14 @@ local function spawn_zombies(self) local p = vector.offset(nn[i%#nn],0,1,0) if check_spawn_pos(p) then local m = mcl_mobs.spawn(p,"mobs_mc:zombie") - local l = m:get_luaentity() - mcl_mobs:gopath(m:get_luaentity(),self.pos) - table.insert(self.mobs,m) - self.health_max = self.health_max + l.health + if m then + local l = m:get_luaentity() + mcl_mobs:gopath(m:get_luaentity(), self.pos) + table.insert(self.mobs, m) + self.health_max = self.health_max + l.health + else + --minetest.log("Failed to spawn zombie at location: " .. minetest.pos_to_string(p)) + end end end end From 35967caf71e09baf137e4d488eef093f7e21646f Mon Sep 17 00:00:00 2001 From: FossFanatic Date: Wed, 14 Dec 2022 14:43:45 +0000 Subject: [PATCH 04/39] Change some things --- mods/ITEMS/mcl_beds/respawn_anchor.lua | 27 +------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/mods/ITEMS/mcl_beds/respawn_anchor.lua b/mods/ITEMS/mcl_beds/respawn_anchor.lua index 565c2b665..f167599c7 100644 --- a/mods/ITEMS/mcl_beds/respawn_anchor.lua +++ b/mods/ITEMS/mcl_beds/respawn_anchor.lua @@ -6,27 +6,6 @@ local S = minetest.get_translator(minetest.get_current_modname()) --local mod_doc = minetest.get_modpath("doc") -> maybe add documentation ? for i=0,4 do - local nodebox_uncharged = { --Reused the composter nodebox, since it is basicly the same - type = "fixed", - fixed = { - {-0.5, -0.5, -0.5, -0.375, 0.5, 0.5}, -- Left wall - { 0.375, -0.5, -0.5, 0.5, 0.5, 0.5}, -- Right wall - {-0.375, -0.5, 0.375, 0.375, 0.5, 0.5}, -- Back wall - {-0.375, -0.5, -0.5, 0.375, 0.5, -0.375}, -- Front wall - {-0.5, -0.5, -0.5, 0.5, -0.47, 0.5}, -- Bottom level, -0.47 because -0.5 is so low that you can see the texture of the block below through - } - } - - local nodebox_charged = { --Reused the composter nodebox, since it is basicly the same - type = "fixed", - fixed = { - {-0.5, -0.5, -0.5, -0.375, 0.5, 0.5}, -- Left wall - { 0.375, -0.5, -0.5, 0.5, 0.5, 0.5}, -- Right wall - {-0.375, -0.5, 0.375, 0.375, 0.5, 0.5}, -- Back wall - {-0.375, -0.5, -0.5, 0.375, 0.5, -0.375}, -- Front wall - {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, -- Bottom level - } - } local function rightclick(pos, node, player, itemstack) if itemstack.get_name(itemstack) == "mcl_nether:glowstone" and i ~= 4 then @@ -54,8 +33,6 @@ for i=0,4 do "respawn_anchor_bottom.png", "respawn_anchor_side0.png" }, - drawtype = "nodebox", - node_box = nodebox_uncharged, on_rightclick = rightclick, groups = {pickaxey=1, material_stone=1}, _mcl_hardness = 22.5, @@ -68,14 +45,12 @@ for i=0,4 do description=S("Respawn Anchor"), tiles = { { - image="respawn_anchor_top_on.png", + image="respawn_anchor_top_on.png^[noalpha", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=2.0} }, "respawn_anchor_bottom.png", "respawn_anchor_side"..i ..".png" }, - drawtype = "nodebox", - node_box = nodebox_charged, on_rightclick = rightclick, groups = {pickaxey=1, material_stone=1, not_in_creative_inventory=1}, _mcl_hardness = 22.5, From 5b680079028399f07688157d520ab213ef27611e Mon Sep 17 00:00:00 2001 From: ancientmarinerdev Date: Wed, 14 Dec 2022 20:13:06 +0000 Subject: [PATCH 05/39] Pre-release update credits and set version 0.81.1 --- CREDITS.md | 4 ++-- README.md | 2 +- RELEASE.md | 15 +++++++++++++++ mods/HUD/mcl_credits/people.lua | 4 ++-- 4 files changed, 20 insertions(+), 5 deletions(-) create mode 100644 RELEASE.md diff --git a/CREDITS.md b/CREDITS.md index b258ca54b..dcbcee954 100644 --- a/CREDITS.md +++ b/CREDITS.md @@ -8,12 +8,13 @@ ## Maintainers +* AncientMariner * Nicu -* cora ## Previous Maintainers * Fleckenstein * jordan4ibanez +* cora ## Developers * bzoss @@ -35,7 +36,6 @@ * MrRar * talamh * Faerraven -* AncientMariner ## Contributors * Laurent Rocher diff --git a/README.md b/README.md index 1f6969e33..4e75fb4c1 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 many people. Not developed or endorsed by Mojang AB. -Version: 0.81 +Version: 0.81.1 ### Gameplay You start in a randomly-generated world made entirely of cubes. You can explore diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 000000000..7e302bd13 --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,15 @@ +#File to document release steps with a view to evolving into a script + +#Update CREDITS.md +#Update version in README.md (soon to be game.conf from of 0.82.0) + +lua tools/generate_ingame_credits.lua + +git add CREDITS.md +git add mods/HUD/mcl_credits/people.lua + +git add README.md +# To uncomment when applicable +#git add game.conf + +git commit -m "Pre-release update credits and set version" \ No newline at end of file diff --git a/mods/HUD/mcl_credits/people.lua b/mods/HUD/mcl_credits/people.lua index 6b674e0c8..9c4208ece 100644 --- a/mods/HUD/mcl_credits/people.lua +++ b/mods/HUD/mcl_credits/people.lua @@ -9,12 +9,13 @@ return { "Wuzzy", }}, {S("Maintainers"), 0xFF51D5, { + "AncientMariner", "Nicu", - "cora", }}, {S("Previous Maintainers"), 0xFFFFFF, { "Fleckenstein", "jordan4ibanez", + "cora", }}, {S("Developers"), 0xF84355, { "bzoss", @@ -36,7 +37,6 @@ return { "MrRar", "talamh", "Faerraven", - "AncientMariner", }}, {S("Contributors"), 0x52FF00, { "Laurent Rocher", From 1ac6c45c7fef220cf07176fe5b70dbdd2fe4d81e Mon Sep 17 00:00:00 2001 From: ancientmarinerdev Date: Wed, 14 Dec 2022 20:17:21 +0000 Subject: [PATCH 06/39] Update release readme --- RELEASE.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/RELEASE.md b/RELEASE.md index 7e302bd13..01eb71e7f 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -12,4 +12,8 @@ git add README.md # To uncomment when applicable #git add game.conf -git commit -m "Pre-release update credits and set version" \ No newline at end of file +git commit -m "Pre-release update credits and set version 0.81.1" + +git tag 0.81.1 + +git push origin 0.81.1 \ No newline at end of file From 39e9158c015adc0823d99c9472e9b9c692ae0cf5 Mon Sep 17 00:00:00 2001 From: FossFanatic Date: Thu, 15 Dec 2022 16:05:34 +0000 Subject: [PATCH 07/39] Make night sky darker --- mods/ENVIRONMENT/mcl_weather/skycolor.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/ENVIRONMENT/mcl_weather/skycolor.lua b/mods/ENVIRONMENT/mcl_weather/skycolor.lua index 6fb8ab56c..3f2d09117 100644 --- a/mods/ENVIRONMENT/mcl_weather/skycolor.lua +++ b/mods/ENVIRONMENT/mcl_weather/skycolor.lua @@ -13,8 +13,8 @@ function mcl_weather.set_sky_box_clear(player) day_horizon = "#B4D0FF", dawn_sky = "#B4BAFA", dawn_horizon = "#BAC1F0", - night_sky = "#006AFF", - night_horizon = "#4090FF", + night_sky = "#010102", + night_horizon = "#090A12", }, clouds = true, }) From 0f8cfbf1067c959caca77ab0cf2a83f1000142c1 Mon Sep 17 00:00:00 2001 From: FossFanatic Date: Thu, 15 Dec 2022 16:46:47 +0000 Subject: [PATCH 08/39] Some small night sky adjustments --- mods/ENVIRONMENT/mcl_weather/skycolor.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/ENVIRONMENT/mcl_weather/skycolor.lua b/mods/ENVIRONMENT/mcl_weather/skycolor.lua index 3f2d09117..7bc3ad1fe 100644 --- a/mods/ENVIRONMENT/mcl_weather/skycolor.lua +++ b/mods/ENVIRONMENT/mcl_weather/skycolor.lua @@ -13,8 +13,8 @@ function mcl_weather.set_sky_box_clear(player) day_horizon = "#B4D0FF", dawn_sky = "#B4BAFA", dawn_horizon = "#BAC1F0", - night_sky = "#010102", - night_horizon = "#090A12", + night_sky = "#000000", + night_horizon = "#4A6790", }, clouds = true, }) From 295970fbac9acd590dd71e49b6ca0a5e5ed9f81f Mon Sep 17 00:00:00 2001 From: ancientmarinerdev Date: Sat, 19 Nov 2022 23:37:27 +0000 Subject: [PATCH 09/39] Adding extra row of blocks in front of doors to schemas so villagers can get out --- .../mcl_villages/schematics/blacksmith.mts | Bin 988 -> 996 bytes .../mcl_villages/schematics/butcher.mts | Bin 804 -> 806 bytes .../mcl_villages/schematics/large_house.mts | Bin 1179 -> 1187 bytes .../mcl_villages/schematics/medium_house.mts | Bin 801 -> 807 bytes .../mcl_villages/schematics/small_house.mts | Bin 572 -> 578 bytes .../MAPGEN/mcl_villages/schematics/tavern.mts | Bin 1003 -> 1009 bytes 6 files changed, 0 insertions(+), 0 deletions(-) diff --git a/mods/MAPGEN/mcl_villages/schematics/blacksmith.mts b/mods/MAPGEN/mcl_villages/schematics/blacksmith.mts index dab65afa47314919237e6abc50d80bd51d3690dd..d4e26fb26b773bf8a4a06adbd1638a3ad9f41182 100644 GIT binary patch delta 263 zcmV+i0r>vh2jm9`O;l4&00aOCu?Xk_e~S)+FbwQAKu~;x;Okrcb-OX76i{9gO}NVl zM|ZuA1ppYt#H{Aa5(Ox52n+2ZotirLchC1MGylTO^C5tx>7VJ9xfWV8968@3`I>?0 z?-I9Ls*5k@^Zn-e;mG-#Youq-e`ERz*xK{nSuINEKW={E_i^mu07r;Sf8Y3Gb>xX? zy#o0rKYY+74 N$~u2PJONM@WvrA~gzf+U delta 255 zcmVs>&EMPo~YO&^>I znvorb!vH|QCMN|aOdxe=REA8wKI#j}%Uep{LRAz{!V<^SYNeh=Nv@;h7k{e{M&Torj$*P??v3;wUbAB=M3=8Z(z!6SR;h2T0uaW0YZRvky zIIjVLZ9Gq4^~Lj5a7EHt8&zWyB+2?j+x{t!V}RPVu#63Fo&l^YY`kH>VS)wzr3{tu4I~`lQoG0%kkyk(W^EQxp4SBEdee?3FfA#K7 z)H+Y-7_}4gHnZoAov+F%g7e}=58vllzsf5TdBxYx_rLC|anlyh=Y|a%R*U3)wE*~+ zDfy_8bDqN!3L08dOU73Hke_y}D;a#L?Mq!fn=g%)POXO~ed+kTat?Fq!Pw|hVwNw< a@;{q#4wCN`kuX~mLQJ!r1urR50_N6#&Wa5H delta 273 zcmV+s0q*{$2BZcEO;l4&00aOFu?QXle+dr4AP`&*wTI$G@wt9o$_=F&duY>iCc2v` z?l95-kOf)=^S~J*AdVQQVyo`ltXAC{)$$On^(>%NEF!gnTCqxYsnw~n9S!4b_E%K( zwXET+J)F!_7O3qSW~yfiXT>tf5Z8Aqa{HP(+a;ULK8>?6m2R2YuIl?1Wz+Q@f6cNg z&#DNT!P(es*}CVZGl}FZxKq=2vb$Di6WMHH=5t%`UGnXeMe?~}!-k)s=PvmdlDiFm zUd1^dXQe7h4T%?#Zy)m04DiCvjRbBaQYUaDnJ#S2v>rDyD4U!>!`9hZRSML*(UJe8 XofD$xEx{6YH$sS^X4B#Ywkf{eCfkLc diff --git a/mods/MAPGEN/mcl_villages/schematics/large_house.mts b/mods/MAPGEN/mcl_villages/schematics/large_house.mts index 3939a2c4342ea3895e8a89c67851b6dcfa0354ee..6cc19543ed79c76e15073519a4834b4c98a1bef5 100644 GIT binary patch delta 324 zcmV-K0lWU238M)JO;l4&00aOGu?TAee^%KNf-npWcyWj)f`Z4V`s>yL+CoEHM5;`8 zUm#7g*~w@DK;Vp&-Tk_RqWA=+#$9#uJ8Q72n!|$OoQr#eI`OtXMU6b)hk&8qyWa&A z8)o0wCl`r7PeNfF%U6pB+>}8lzf06_R4T0~-@5X6NLj_#<p-#wxmOZFo6>qz|`jQWi@-K4R{`aF?>-;@yddmO-T`|tNecal+7x;dTm+?XeS z&CmOFl>JU?`NR7yZleq?aMk#q!Tsv>8QSkS@1u5N-y65T{oWWM?-mvo78XAV^gc3) zI5s`OC&2G`wG#YAsmVl9Mzig!GI687uC9Zgh|!m>y5gt0;zk51QaSZ{l%nauJu=;W zD9xnVEFA~{3TqZ@ zzpGXojlSX$62)`X(XiH6*wEWb;4LoeuPNVZs%S*XcAIkD(#%(GMAx9!RRFsYf4uDp z`FlH{YKio%W8N%4e|ur?<8%A#B~)$**g#7xGl}9xhG&okaD*yz zNkVKnCt;`g{T|V*Dm`Y|1kA0$7yl7C1O=djJ3c delta 228 zcmV4e|ll><8%A#rRx%LCA1A#(uSGDIJ&G)1pt^t zVdv(N%;`Lh=VyiT>~d=z&T=$f;(bk4S$G;)*y9pbwqu{&*ie@CscTFd;?ZC*8>)AN zVY+vC#?NnA*1&mOc0A*Hfh@|q9^>hdV{6^>7_Yykx9ii6@$89b;LpKxU_1hjQdD`O z4(G4(bnJhb!v8BYe=hLZe7<73%`~4&ulF?P-w%uWUR6~!nF(x9Kw$Ta emcNiONyFoPgnuF+A5UT*Y?1Rj|F|BJk+dQnJ$DEI diff --git a/mods/MAPGEN/mcl_villages/schematics/small_house.mts b/mods/MAPGEN/mcl_villages/schematics/small_house.mts index a3789504eedee18849ec211439fa09659c898b5f..92c0c150ddf4059776607b7f9f22a38bc8f091d6 100644 GIT binary patch delta 200 zcmV;(05|`<1i}OiO;l4&00aOD00{sHu?&R)f0K(2gCGn=OJ#KK?HBLY*Pvsi5Zxvu zn0T8OthG6k0+7fwW_dzn>wH|--Lf5gtU-top#y>=yAzonPV6qKAyH#_k8oxu!ASmD z|H*nnQmbLMcui|;_#OoVPA={87vXh*@V%QO{A6rYRp$(EaEC`zXPC|*sX1KAjC0sm zGMU3tW?|qsD1x7E_H);+29&uen-GQ#>Q}kj|Fycwi>gdRV?wjygj&g=*47J>vPL?_ C9$Q5K delta 194 zcmV;z06qW01iSMgxszd0M6LJfrZn`=#(5;Uud~4=-?q+h6rCpF?qTI2U=&Vc%p9 wENhWrP(L^Yi+=Wf!-nPfFxYKD`9CT^H(FKHDTp`~tFF)^Yiese0N5iPzwf72EC2ui diff --git a/mods/MAPGEN/mcl_villages/schematics/tavern.mts b/mods/MAPGEN/mcl_villages/schematics/tavern.mts index c26c14dbccb6acadb9f4838d01dcb900aba03a74..32b9052610204f5ce4882b189fbc92f6b91b631c 100644 GIT binary patch delta 386 zcmV-|0e$}K2k{38O;l4&00aOGu?Twte+hDfFbwnoZ9@r3bM*Rbzg}N;BpDIo<{&d( z&45{CyjqO05Da9E$(Z&{CE5&ku_dcyZeJ?x*pT^nno;xE<<@NEb!>q85C+f4dn`8Hm6f2?m! z%RuRa8dsUz<&dcn+NaZ#9_ssi>%^sHgy7|EG@% z#k6lO!EIHvZ$u&N{zaZi;5R-caC$U(?AQ=8XKa68&zF%^6q}Sa;Dxk7A0(Fqa9wRG gXJTJeTh@rZHIP!0kMVmTsu^GsPeKE(1u^l=tf6wbu$w?wVP=wE`gox01pN&UB8O3e^UUe z2oHUBFh}iZ$#z;z#yj^7IT{O*>Fj*7ePZo!c7QyOD8mj_9$FFXbhelsjMBE49X^sB zIcfjVvIk~P0Xt`yc|m#p1YQlgLU~tKLw0JC9lw4GotvGZwbQTdNLHcVik)ZftR{AB zXVo^6Ibp7-iss~@&tD1bg#6ZkYW||EwjXdR=NmoFPFDVxB}8w@ch;wfAYWe< z*WCEBY1` Date: Sun, 20 Nov 2022 00:44:43 +0000 Subject: [PATCH 10/39] Fix village building foundations --- mods/MAPGEN/mcl_villages/const.lua | 11 ++++++----- mods/MAPGEN/mcl_villages/foundation.lua | 1 + 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/mods/MAPGEN/mcl_villages/const.lua b/mods/MAPGEN/mcl_villages/const.lua index 65f43f344..f99ace591 100644 --- a/mods/MAPGEN/mcl_villages/const.lua +++ b/mods/MAPGEN/mcl_villages/const.lua @@ -51,17 +51,18 @@ schem_path = settlements.modpath.."/schematics/" -- local basic_pseudobiome_villages = minetest.settings:get_bool("basic_pseudobiome_villages", true) +-- Existing bug in which blacksmith foundation is nowhere near as long as the build. Figure which is needed and expand. settlements.schematic_table = { - {name = "large_house", mts = schem_path.."large_house.mts", hwidth = 11, hdepth = 12, hheight = 9, hsize = 14, max_num = 0.08 , rplc = basic_pseudobiome_villages }, + {name = "large_house", mts = schem_path.."large_house.mts", hwidth = 12, hdepth = 12, hheight = 9, hsize = 14, max_num = 0.08 , rplc = basic_pseudobiome_villages }, {name = "blacksmith", mts = schem_path.."blacksmith.mts", hwidth = 7, hdepth = 7, hheight = 13, hsize = 13, max_num = 0.055, rplc = basic_pseudobiome_villages }, - {name = "butcher", mts = schem_path.."butcher.mts", hwidth = 11, hdepth = 8, hheight = 10, hsize = 14, max_num = 0.03 , rplc = basic_pseudobiome_villages }, + {name = "butcher", mts = schem_path.."butcher.mts", hwidth = 12, hdepth = 8, hheight = 10, hsize = 14, max_num = 0.03 , rplc = basic_pseudobiome_villages }, {name = "church", mts = schem_path.."church.mts", hwidth = 13, hdepth = 13, hheight = 14, hsize = 15, max_num = 0.04 , rplc = basic_pseudobiome_villages }, {name = "farm", mts = schem_path.."farm.mts", hwidth = 7, hdepth = 7, hheight = 13, hsize = 13, max_num = 0.1 , rplc = basic_pseudobiome_villages }, {name = "lamp", mts = schem_path.."lamp.mts", hwidth = 3, hdepth = 3, hheight = 13, hsize = 10, max_num = 0.1 , rplc = false }, {name = "library", mts = schem_path.."library.mts", hwidth = 12, hdepth = 12, hheight = 8, hsize = 13, max_num = 0.04 , rplc = basic_pseudobiome_villages }, - {name = "medium_house", mts = schem_path.."medium_house.mts", hwidth = 8, hdepth = 12, hheight = 8, hsize = 14, max_num = 0.08 , rplc = basic_pseudobiome_villages }, - {name = "small_house", mts = schem_path.."small_house.mts", hwidth = 9, hdepth = 7, hheight = 8, hsize = 13, max_num = 0.7 , rplc = basic_pseudobiome_villages }, - {name = "tavern", mts = schem_path.."tavern.mts", hwidth = 11, hdepth = 10, hheight = 10, hsize = 13, max_num = 0.050, rplc = basic_pseudobiome_villages }, + {name = "medium_house", mts = schem_path.."medium_house.mts", hwidth = 9, hdepth = 12, hheight = 8, hsize = 14, max_num = 0.08 , rplc = basic_pseudobiome_villages }, + {name = "small_house", mts = schem_path.."small_house.mts", hwidth = 9, hdepth = 8, hheight = 8, hsize = 13, max_num = 0.7 , rplc = basic_pseudobiome_villages }, + {name = "tavern", mts = schem_path.."tavern.mts", hwidth = 12, hdepth = 10, hheight = 10, hsize = 13, max_num = 0.050, rplc = basic_pseudobiome_villages }, {name = "well", mts = schem_path.."well.mts", hwidth = 6, hdepth = 8, hheight = 6, hsize = 10, max_num = 0.045, rplc = basic_pseudobiome_villages }, } diff --git a/mods/MAPGEN/mcl_villages/foundation.lua b/mods/MAPGEN/mcl_villages/foundation.lua index 71c5cfdda..d2659c52e 100644 --- a/mods/MAPGEN/mcl_villages/foundation.lua +++ b/mods/MAPGEN/mcl_villages/foundation.lua @@ -48,6 +48,7 @@ function settlements.terraform(settlement_info, pr) for yi = 0,fheight *3 do if yi == 0 then local p = {x=pos.x+xi, y=pos.y, z=pos.z+zi} + -- Pass in biome info and make foundations of same material (seed: apple for desert) settlements.ground(p, pr) else -- write ground From 89f5d41366a80279efd83ae00a6f8726538b4747 Mon Sep 17 00:00:00 2001 From: ancientmarinerdev Date: Tue, 29 Nov 2022 01:58:02 +0000 Subject: [PATCH 11/39] Fix village building foundation material for desert --- mods/MAPGEN/mcl_villages/foundation.lua | 30 ++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/mods/MAPGEN/mcl_villages/foundation.lua b/mods/MAPGEN/mcl_villages/foundation.lua index d2659c52e..e53a4a3ce 100644 --- a/mods/MAPGEN/mcl_villages/foundation.lua +++ b/mods/MAPGEN/mcl_villages/foundation.lua @@ -1,16 +1,34 @@ +local function mcl_log (message) + mcl_util.mcl_log (message, "[Village - Foundation]") +end + +local foundation_materials = {} + +foundation_materials["mcl_core:sand"] = "mcl_core:sandstone" +--"mcl_core:sandstonecarved" + ------------------------------------------------------------------------------- -- function to fill empty space below baseplate when building on a hill ------------------------------------------------------------------------------- -function settlements.ground(pos, pr) -- role model: Wendelsteinkircherl, Brannenburg +function settlements.ground(pos, pr, platform_material) -- role model: Wendelsteinkircherl, Brannenburg local p2 = vector.new(pos) local cnt = 0 + local mat = "mcl_core:dirt" + if not platform_material then + mat = "mcl_core:dirt" + else + mat = platform_material + end + p2.y = p2.y-1 while true do cnt = cnt+1 if cnt > 20 then break end if cnt>pr:next(2,4) then - mat = "mcl_core:stone" + if not platform_material then + mat = "mcl_core:stone" + end end minetest.swap_node(p2, {name=mat}) p2.y = p2.y-1 @@ -40,6 +58,12 @@ function settlements.terraform(settlement_info, pr) end --fheight = schematic_data["hheight"] * 3 -- remove trees and leaves above fheight = schematic_data["hheight"] -- remove trees and leaves above + + local surface_mat = settlement_info[i]["surface_mat"] + mcl_log("Surface material: " .. tostring(surface_mat)) + local platform_mat = foundation_materials[surface_mat] + mcl_log("Foundation material: " .. tostring(platform_mat)) + -- -- now that every info is available -> create platform and clear space above -- @@ -49,7 +73,7 @@ function settlements.terraform(settlement_info, pr) if yi == 0 then local p = {x=pos.x+xi, y=pos.y, z=pos.z+zi} -- Pass in biome info and make foundations of same material (seed: apple for desert) - settlements.ground(p, pr) + settlements.ground(p, pr, platform_mat) else -- write ground -- local p = {x=pos.x+xi, y=pos.y+yi, z=pos.z+zi} From 94a37790aa59c86aba613498fe4bf34632cb898d Mon Sep 17 00:00:00 2001 From: ancientmarinerdev Date: Thu, 15 Dec 2022 21:08:35 +0000 Subject: [PATCH 12/39] Fix incorrectly sized foundations --- mods/MAPGEN/mcl_villages/const.lua | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/mods/MAPGEN/mcl_villages/const.lua b/mods/MAPGEN/mcl_villages/const.lua index f99ace591..b844e6430 100644 --- a/mods/MAPGEN/mcl_villages/const.lua +++ b/mods/MAPGEN/mcl_villages/const.lua @@ -51,14 +51,13 @@ schem_path = settlements.modpath.."/schematics/" -- local basic_pseudobiome_villages = minetest.settings:get_bool("basic_pseudobiome_villages", true) --- Existing bug in which blacksmith foundation is nowhere near as long as the build. Figure which is needed and expand. settlements.schematic_table = { {name = "large_house", mts = schem_path.."large_house.mts", hwidth = 12, hdepth = 12, hheight = 9, hsize = 14, max_num = 0.08 , rplc = basic_pseudobiome_villages }, - {name = "blacksmith", mts = schem_path.."blacksmith.mts", hwidth = 7, hdepth = 7, hheight = 13, hsize = 13, max_num = 0.055, rplc = basic_pseudobiome_villages }, + {name = "blacksmith", mts = schem_path.."blacksmith.mts", hwidth = 8, hdepth = 11, hheight = 13, hsize = 13, max_num = 0.055, rplc = basic_pseudobiome_villages }, {name = "butcher", mts = schem_path.."butcher.mts", hwidth = 12, hdepth = 8, hheight = 10, hsize = 14, max_num = 0.03 , rplc = basic_pseudobiome_villages }, {name = "church", mts = schem_path.."church.mts", hwidth = 13, hdepth = 13, hheight = 14, hsize = 15, max_num = 0.04 , rplc = basic_pseudobiome_villages }, - {name = "farm", mts = schem_path.."farm.mts", hwidth = 7, hdepth = 7, hheight = 13, hsize = 13, max_num = 0.1 , rplc = basic_pseudobiome_villages }, - {name = "lamp", mts = schem_path.."lamp.mts", hwidth = 3, hdepth = 3, hheight = 13, hsize = 10, max_num = 0.1 , rplc = false }, + {name = "farm", mts = schem_path.."farm.mts", hwidth = 9, hdepth = 7, hheight = 13, hsize = 13, max_num = 0.1 , rplc = basic_pseudobiome_villages }, + {name = "lamp", mts = schem_path.."lamp.mts", hwidth = 3, hdepth = 4, hheight = 13, hsize = 10, max_num = 0.1 , rplc = false }, {name = "library", mts = schem_path.."library.mts", hwidth = 12, hdepth = 12, hheight = 8, hsize = 13, max_num = 0.04 , rplc = basic_pseudobiome_villages }, {name = "medium_house", mts = schem_path.."medium_house.mts", hwidth = 9, hdepth = 12, hheight = 8, hsize = 14, max_num = 0.08 , rplc = basic_pseudobiome_villages }, {name = "small_house", mts = schem_path.."small_house.mts", hwidth = 9, hdepth = 8, hheight = 8, hsize = 13, max_num = 0.7 , rplc = basic_pseudobiome_villages }, From a4ef367708b909c82cbbedd408710b9e936a67b3 Mon Sep 17 00:00:00 2001 From: kabou Date: Sun, 11 Dec 2022 20:54:29 +0100 Subject: [PATCH 13/39] Add "orphaned" leaves nodes. * Add "orphaned" leaves nodes, these are copies of the regular leaves nodes whose sole purpose is to replace leaves nodes when no more tree trunks are present nearby. The orphaned nodes are swapped in by a callback on destruction of tree trunk nodes and will be decayed by a dedicated abm that processes all nodes in `group:leaves_orphan`. * Add `mcl_core.update_leaves()` function, a `after_destruct` callback handler for tree trunk nodes. The function finds leaves nodes nearby destroyed tree trunk nodes and swaps these for orphaned leaves nodes if no other tree trunk nodes remain near them. * Add `after_destruct` callbacks to tree trunk node registrations in mcl_core/nodes_trees.lua and mcl_mangrove/init.lua to update orphaned leaves. * Add entry for group `leaves_orphan` to GROUPS.md * Also add entry for group `leaves` to GROUPS.md (it was missing). --- GROUPS.md | 2 ++ mods/ITEMS/mcl_core/nodes_trees.lua | 51 +++++++++++++++++++++++++++-- mods/ITEMS/mcl_mangrove/init.lua | 17 ++++++++-- 3 files changed, 66 insertions(+), 4 deletions(-) diff --git a/GROUPS.md b/GROUPS.md index 3c954111f..e6d878990 100644 --- a/GROUPS.md +++ b/GROUPS.md @@ -74,6 +74,8 @@ Please read to learn how digging times * `coral_species=X`: Specifies the species of a coral; equal X means equal species * `set_on_fire=X`: Sets any (not fire-resistant) mob or player on fire for X seconds when touching * `compostability=X`: Item can be used on a composter block; X (1-100) is the % chance of adding a level of compost +* `leaves=X`: Node will spotaneously decay if no tree trunk nodes remain within 6 blocks distance. +* `leaves_orphan`: See above, these nodes are in the process of decayed. #### Footnotes diff --git a/mods/ITEMS/mcl_core/nodes_trees.lua b/mods/ITEMS/mcl_core/nodes_trees.lua index 54a43d6bf..6e47da52c 100644 --- a/mods/ITEMS/mcl_core/nodes_trees.lua +++ b/mods/ITEMS/mcl_core/nodes_trees.lua @@ -8,6 +8,40 @@ if mod_screwdriver then on_rotate = screwdriver.rotate_3way end +-- Check dug/destroyed tree trunks for orphaned leaves. +-- +-- This function is meant to be called by the `after_destruct` handler of +-- treetrunk nodes. +-- +-- Whenever a trunk node is removed, all `group:leaves` nodes in a sphere +-- with radius 6 are checked. Every such node that does not have a trunk +-- node within a distance of 6 blocks is converted into a orphan leaf node. +-- An ABM will gradually decay these nodes. +-- +-- If param2 of the node is set to a nonzero value, the node will always +-- be preserved. This is set automatically when leaves are placed manually. +-- +-- @param pos the position of the removed trunk node. +-- @param oldnode the node table of the removed trunk node. +function mcl_core.update_leaves(pos, oldnode) + local pos1, pos2 = vector.offset(pos, -6, -6, -6), vector.offset(pos, 6, 6, 6) + local lnode + local leaves = minetest.find_nodes_in_area(pos1, pos2, "group:leaves") + for _, lpos in pairs(leaves) do + lnode = minetest.get_node(lpos) + -- skip already decaying leaf nodes + if minetest.get_item_group(lnode.name, "orphan_leaves") ~= 1 then + if not minetest.find_node_near(lpos, 6, "group:tree") then + -- manually placed leaf nodes have param2 + -- set and will never decay automatically + if lnode.param2 == 0 then + minetest.swap_node(lpos, {name = lnode.name .. "_orphan"}) + end + end + end + end +end + -- Register tree trunk (wood) and bark local function register_tree_trunk(subname, description_trunk, description_bark, longdesc, tile_inner, tile_bark, stripped_variant) minetest.register_node("mcl_core:"..subname, { @@ -17,6 +51,7 @@ local function register_tree_trunk(subname, description_trunk, description_bark, tiles = {tile_inner, tile_inner, tile_bark}, paramtype2 = "facedir", on_place = mcl_util.rotate_axis, + after_destruct = mcl_core.update_leaves, stack_max = 64, groups = {handy=1,axey=1, tree=1, flammable=2, building_block=1, material_wood=1, fire_encouragement=5, fire_flammability=5}, sounds = mcl_sounds.node_sound_wood_defaults(), @@ -141,7 +176,7 @@ local function register_leaves(subname, description, longdesc, tiles, sapling, d return drop end - minetest.register_node("mcl_core:"..subname, { + local l_def = { description = description, _doc_items_longdesc = longdesc, _doc_items_hidden = false, @@ -164,7 +199,19 @@ local function register_leaves(subname, description, longdesc, tiles, sapling, d _mcl_hardness = 0.2, _mcl_silk_touch_drop = true, _mcl_fortune_drop = { get_drops(1), get_drops(2), get_drops(3), get_drops(4) }, - }) + } + + minetest.register_node("mcl_core:" .. subname, l_def) + + local o_def = table.copy(l_def) + o_def._doc_items_create_entry = false + o_def.place_param2 = nil + o_def.groups.not_in_creative_inventory = 1 + o_def.groups.orphan_leaves = 1 + o_def._mcl_shears_drop = {"mcl_core:" .. subname} + o_def._mcl_silk_touch_drop = {"mcl_core:" .. subname} + + minetest.register_node("mcl_core:" .. subname .. "_orphan", o_def) end local function register_sapling(subname, description, longdesc, tt_help, texture, selbox) diff --git a/mods/ITEMS/mcl_mangrove/init.lua b/mods/ITEMS/mcl_mangrove/init.lua index 666b471de..e228e9f37 100644 --- a/mods/ITEMS/mcl_mangrove/init.lua +++ b/mods/ITEMS/mcl_mangrove/init.lua @@ -52,6 +52,7 @@ minetest.register_node("mcl_mangrove:mangrove_tree", { tiles = {"mcl_mangrove_log_top.png", "mcl_mangrove_log_top.png", "mcl_mangrove_log.png"}, paramtype2 = "facedir", on_place = mcl_util.rotate_axis, + after_destruct = mcl_core.update_leaves, groups = {handy=1,axey=1, tree=1, flammable=2, building_block=1, material_wood=1, fire_encouragement=5, fire_flammability=5}, sounds = mcl_sounds.node_sound_wood_defaults(), on_place = mcl_util.rotate_axis, @@ -86,7 +87,7 @@ minetest.register_node("mcl_mangrove:mangrove_wood", { _mcl_hardness = 2, }) -minetest.register_node("mcl_mangrove:mangroveleaves", { +local l_def = { description = S("Mangrove Leaves"), _doc_items_longdesc = S("mangrove leaves are grown from mangrove trees."), _doc_items_hidden = false, @@ -103,7 +104,19 @@ minetest.register_node("mcl_mangrove:mangroveleaves", { _mcl_hardness = 0.2, _mcl_silk_touch_drop = true, _mcl_fortune_drop = { get_drops(1), get_drops(2), get_drops(3), get_drops(4) }, -}) +} + +minetest.register_node("mcl_mangrove:mangroveleaves", l_def) + +local o_def = table.copy(l_def) +o_def._doc_items_create_entry = false +o_def.place_param2 = nil +o_def.groups.not_in_creative_inventory = 1 +o_def.groups.orphan_leaves = 1 +o_def._mcl_shears_drop = {"mcl_mangrove:mangroveleaves"} +o_def._mcl_silk_touch_drop = {"mcl_mangrove:mangroveleaves"} + +minetest.register_node("mcl_mangrove:mangroveleaves_orphan", o_def) minetest.register_node("mcl_mangrove:mangrove_stripped_trunk", { description = S("Stripped Mangrove Wood"), From adcf03e0c63cac1a6804e4a556e51fdb6e403927 Mon Sep 17 00:00:00 2001 From: kabou Date: Sun, 11 Dec 2022 21:30:05 +0100 Subject: [PATCH 14/39] Refactor leaf decay ABM. * The leaf decay ABM no longer scans all leaves nodes. Now only "orphaned" leaves are decayed. These nodes are placed by callbacks in tree trunk nodes upon their destruction. * This commit also removes the tree trunk node caching system and an abm throttling mechanism and its associated globalstep function. --- mods/ITEMS/mcl_core/functions.lua | 132 ++++++++---------------------- 1 file changed, 35 insertions(+), 97 deletions(-) diff --git a/mods/ITEMS/mcl_core/functions.lua b/mods/ITEMS/mcl_core/functions.lua index 5a01cd8c1..c26f31a54 100644 --- a/mods/ITEMS/mcl_core/functions.lua +++ b/mods/ITEMS/mcl_core/functions.lua @@ -1367,108 +1367,46 @@ function mcl_core.supports_vines(nodename) end -- Leaf Decay - --- To enable leaf decay for a node, add it to the "leafdecay" group. -- --- The rating of the group determines how far from a node in the group "tree" --- the node can be without decaying. +-- Whenever a tree trunk node is removed, all `group:leaves` nodes in a radius +-- of 6 blocks are checked from the trunk node's `after_destruct` handler. +-- Any such nodes within that radius that has no trunk node present within a +-- distance of 6 blocks is replaced with a `group:orphan_leaves` node. -- --- If param2 of the node is ~= 0, the node will always be preserved. Thus, if --- the player places a node of that kind, you will want to set param2=1 or so. --- - -mcl_core.leafdecay_trunk_cache = {} -mcl_core.leafdecay_enable_cache = true --- Spread the load of finding trunks -mcl_core.leafdecay_trunk_find_allow_accumulator = 0 - -minetest.register_globalstep(function(dtime) - --local finds_per_second = 5000 - mcl_core.leafdecay_trunk_find_allow_accumulator = math.floor(dtime * 5000) -end) - +-- The `group:orphan_leaves` nodes are gradually decayed in this ABM. minetest.register_abm({ label = "Leaf decay", - nodenames = {"group:leafdecay"}, - neighbors = {"air", "group:liquid"}, - -- A low interval and a high inverse chance spreads the load - interval = 2, - chance = 5, + nodenames = {"group:orphan_leaves"}, + interval = 5, + chance = 10, + action = function(pos, node) + -- Spawn item entities for any of the leaf's drops + local itemstacks = minetest.get_node_drops(node.name) + for _, itemname in pairs(itemstacks) do + local p_drop = vector.offset(pos, math.random() - 0.5, math.random() - 0.5, math.random() - 0.5) + minetest.add_item(p_drop, itemname) + end + -- Remove the decayed node + minetest.remove_node(pos) + leafdecay_particles(pos, node) + minetest.check_for_falling(pos) - action = function(p0, node, _, _) - local do_preserve = false - local d = minetest.registered_nodes[node.name].groups.leafdecay - if not d or d == 0 then - return - end - local n0 = minetest.get_node(p0) - if n0.param2 ~= 0 then - -- Prevent leafdecay for player-placed leaves. - -- param2 is set to 1 after it was placed by the player - return - end - local p0_hash = nil - if mcl_core.leafdecay_enable_cache then - p0_hash = minetest.hash_node_position(p0) - local trunkp = mcl_core.leafdecay_trunk_cache[p0_hash] - if trunkp then - local n = minetest.get_node(trunkp) - local reg = minetest.registered_nodes[n.name] - -- Assume ignore is a trunk, to make the thing work at the border of the active area - if n.name == "ignore" or (reg and reg.groups.tree and reg.groups.tree ~= 0) then - return - end - -- Cache is invalid - table.remove(mcl_core.leafdecay_trunk_cache, p0_hash) - end - end - if mcl_core.leafdecay_trunk_find_allow_accumulator <= 0 then - return - end - mcl_core.leafdecay_trunk_find_allow_accumulator = - mcl_core.leafdecay_trunk_find_allow_accumulator - 1 - -- Assume ignore is a trunk, to make the thing work at the border of the active area - local p1 = minetest.find_node_near(p0, d, {"ignore", "group:tree"}) - if p1 then - do_preserve = true - if mcl_core.leafdecay_enable_cache then - -- Cache the trunk - mcl_core.leafdecay_trunk_cache[p0_hash] = p1 - end - end - if not do_preserve then - -- Drop stuff other than the node itself - local itemstacks = minetest.get_node_drops(n0.name) - for _, itemname in pairs(itemstacks) do - local p_drop = { - x = p0.x - 0.5 + math.random(), - y = p0.y - 0.5 + math.random(), - z = p0.z - 0.5 + math.random(), - } - minetest.add_item(p_drop, itemname) - end - -- Remove node - minetest.remove_node(p0) - leafdecay_particles(p0, n0) - minetest.check_for_falling(p0) - - -- Kill depending vines immediately to skip the vines decay delay - local surround = { - { x = 0, y = 0, z = -1 }, - { x = 0, y = 0, z = 1 }, - { x = -1, y = 0, z = 0 }, - { x = 1, y = 0, z = 0 }, - { x = 0, y = -1, z = -1 }, - } - for s=1, #surround do - local spos = vector.add(p0, surround[s]) - local maybe_vine = minetest.get_node(spos) - --local surround_inverse = vector.multiply(surround[s], -1) - if maybe_vine.name == "mcl_core:vine" and (not mcl_core.check_vines_supported(spos, maybe_vine)) then - minetest.remove_node(spos) - vinedecay_particles(spos, maybe_vine) - minetest.check_for_falling(spos) - end + -- Kill depending vines immediately to skip the vines decay delay + local surround = { + { x = 0, y = 0, z = -1 }, + { x = 0, y = 0, z = 1 }, + { x = -1, y = 0, z = 0 }, + { x = 1, y = 0, z = 0 }, + { x = 0, y = -1, z = -1 }, + } + for s=1, #surround do + local spos = vector.add(pos, surround[s]) + local maybe_vine = minetest.get_node(spos) + --local surround_inverse = vector.multiply(surround[s], -1) + if maybe_vine.name == "mcl_core:vine" and (not mcl_core.check_vines_supported(spos, maybe_vine)) then + minetest.remove_node(spos) + vinedecay_particles(spos, maybe_vine) + minetest.check_for_falling(spos) end end end From cec5b1668ab5eb93d8f569c0851d0385eb72342f Mon Sep 17 00:00:00 2001 From: kabou Date: Sun, 11 Dec 2022 21:42:38 +0100 Subject: [PATCH 15/39] Remove unused `leafdecay` group. * This group is no longer used and is removed from leaves node groups. * Since it was never added to GROUPS.md, nothing needs changed there. * Remove the `leafdecay_distance` parameter from node registrations. --- mods/ITEMS/mcl_core/nodes_trees.lua | 8 ++------ mods/ITEMS/mcl_mangrove/init.lua | 6 +++++- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/mods/ITEMS/mcl_core/nodes_trees.lua b/mods/ITEMS/mcl_core/nodes_trees.lua index 6e47da52c..787faa6d7 100644 --- a/mods/ITEMS/mcl_core/nodes_trees.lua +++ b/mods/ITEMS/mcl_core/nodes_trees.lua @@ -142,10 +142,7 @@ local function register_wooden_planks(subname, description, tiles) }) end -local function register_leaves(subname, description, longdesc, tiles, sapling, drop_apples, sapling_chances, leafdecay_distance) - if leafdecay_distance == nil then - leafdecay_distance = 4 - end +local function register_leaves(subname, description, longdesc, tiles, sapling, drop_apples, sapling_chances) local apple_chances = {200, 180, 160, 120, 40} local stick_chances = {50, 45, 30, 35, 10} @@ -188,9 +185,8 @@ local function register_leaves(subname, description, longdesc, tiles, sapling, d stack_max = 64, groups = { handy = 1, hoey = 1, shearsy = 1, swordy = 1, dig_by_piston = 1, - leaves = 1, leafdecay = leafdecay_distance, deco_block = 1, flammable = 2, fire_encouragement = 30, fire_flammability = 60, - compostability = 30 + leaves = 1, deco_block = 1, compostability = 30 }, drop = get_drops(0), _mcl_shears_drop = true, diff --git a/mods/ITEMS/mcl_mangrove/init.lua b/mods/ITEMS/mcl_mangrove/init.lua index e228e9f37..c31c9abb2 100644 --- a/mods/ITEMS/mcl_mangrove/init.lua +++ b/mods/ITEMS/mcl_mangrove/init.lua @@ -96,7 +96,11 @@ local l_def = { place_param2 = 1, -- Prevent leafdecay for placed nodes tiles = {"mcl_mangrove_leaves.png"}, paramtype = "light", - groups = {handy=1,shearsy=1,swordy=1, leafdecay=10, flammable=2, leaves=1, deco_block=1, dig_by_piston=1, fire_encouragement=30, fire_flammability=60}, + groups = { + handy = 1, hoey = 1, shearsy = 1, swordy = 1, dig_by_piston = 1, + flammable = 2, fire_encouragement = 30, fire_flammability = 60, + leaves = 1, deco_block = 1 + }, drop = get_drops(0), _mcl_shears_drop = true, sounds = mcl_sounds.node_sound_leaves_defaults(), From c33d7d01068afe4fb6b53cd5ce9029413c5a7652 Mon Sep 17 00:00:00 2001 From: kabou Date: Sun, 11 Dec 2022 22:05:16 +0100 Subject: [PATCH 16/39] Remove duplicate callback registration. * `on_place` was registered twice in mangrove tree trunk node registration. Remove one. --- mods/ITEMS/mcl_mangrove/init.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/mods/ITEMS/mcl_mangrove/init.lua b/mods/ITEMS/mcl_mangrove/init.lua index c31c9abb2..803f1a47b 100644 --- a/mods/ITEMS/mcl_mangrove/init.lua +++ b/mods/ITEMS/mcl_mangrove/init.lua @@ -55,7 +55,6 @@ minetest.register_node("mcl_mangrove:mangrove_tree", { after_destruct = mcl_core.update_leaves, groups = {handy=1,axey=1, tree=1, flammable=2, building_block=1, material_wood=1, fire_encouragement=5, fire_flammability=5}, sounds = mcl_sounds.node_sound_wood_defaults(), - on_place = mcl_util.rotate_axis, _mcl_blast_resistance = 2, _mcl_hardness = 2, _mcl_stripped_variant = "mcl_mangrove:mangrove_stripped_trunk", From 1b0b2b8b04f9b25e6b30415f08c3221183c64106 Mon Sep 17 00:00:00 2001 From: kabou Date: Sun, 11 Dec 2022 22:09:18 +0100 Subject: [PATCH 17/39] Add `compostability` group to mangrove leaves. --- mods/ITEMS/mcl_mangrove/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_mangrove/init.lua b/mods/ITEMS/mcl_mangrove/init.lua index 803f1a47b..767edf966 100644 --- a/mods/ITEMS/mcl_mangrove/init.lua +++ b/mods/ITEMS/mcl_mangrove/init.lua @@ -98,7 +98,7 @@ local l_def = { groups = { handy = 1, hoey = 1, shearsy = 1, swordy = 1, dig_by_piston = 1, flammable = 2, fire_encouragement = 30, fire_flammability = 60, - leaves = 1, deco_block = 1 + leaves = 1, deco_block = 1, compostability = 30 }, drop = get_drops(0), _mcl_shears_drop = true, From 4e282df905450d3e7517923d9b38a8ca2ddf7b48 Mon Sep 17 00:00:00 2001 From: kabou Date: Sun, 11 Dec 2022 22:12:30 +0100 Subject: [PATCH 18/39] Mangrove roots are not leaves and some trivia. * Remove `leaves` group from mangrove roots node registration. Mangrove roots should not decay like leaves do. * Fix some formatting weirdness. * Add a "fixme" comment to some duplicated code that causes luacheck to complain. --- mods/ITEMS/mcl_mangrove/init.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/mods/ITEMS/mcl_mangrove/init.lua b/mods/ITEMS/mcl_mangrove/init.lua index 767edf966..85f96dfb0 100644 --- a/mods/ITEMS/mcl_mangrove/init.lua +++ b/mods/ITEMS/mcl_mangrove/init.lua @@ -163,11 +163,13 @@ minetest.register_node("mcl_mangrove:mangrove_roots", { drawtype = "allfaces_optional", groups = { handy = 1, hoey = 1, shearsy = 1, axey = 1, swordy = 1, dig_by_piston = 0, - leaves = 1, deco_block = 1,flammable = 10, fire_encouragement = 30, fire_flammability = 60, compostability = 30 + flammable = 10, fire_encouragement = 30, fire_flammability = 60, + deco_block = 1, compostability = 30 }, drop = "mcl_mangrove:mangrove_roots", _mcl_shears_drop = true, - sounds = mcl_sounds.node_sound_leaves_defaults(), _mcl_blast_resistance = 0.7, + sounds = mcl_sounds.node_sound_leaves_defaults(), + _mcl_blast_resistance = 0.7, _mcl_hardness = 0.7, _mcl_silk_touch_drop = true, _mcl_fortune_drop = { "mcl_mangrove:mangrove_roots 1", "mcl_mangrove:mangrove_roots 2", "mcl_mangrove:mangrove_roots 3", "mcl_mangrove:mangrove_roots 4" }, @@ -345,6 +347,9 @@ local wlroots = { end, } local rwlroots = table.copy(wlroots) +-- FIXME luacheck complains that this is a repeated definition of water_tex. +-- Maybe the tiles definition below should be replaced with the animated tile +-- definition as per above? water_tex = "default_river_water_source_animated.png^[verticalframe:16:0" rwlroots.tiles = { "("..water_tex..")^mcl_mangrove_roots_top.png", From 3a619ba8e4a98c789d76587997dd27c2fda7f8a0 Mon Sep 17 00:00:00 2001 From: AFCMS Date: Fri, 9 Dec 2022 21:06:59 +0100 Subject: [PATCH 19/39] Basic editorconfig file --- .editorconfig | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..8e3084dd3 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,12 @@ +root = true + +[*] +end_of_line = lf + +[*.lua] +charset = utf8 +indent_style = tab +insert_final_newline = true +trim_trailing_whitespace = true +keep_one_space_between_table_and_bracket = false +spaces_around_operators = true From 4da20f5e73586d9b1155121df8657e43559e1c55 Mon Sep 17 00:00:00 2001 From: Michieal Date: Thu, 15 Dec 2022 22:05:36 -0500 Subject: [PATCH 20/39] Main - Fixed Bamboo Sign Errors. Fixed Stripped Bamboo Block Description. Added in Bamboo Plank Recipe that uses Stripped Bamboo Blocks. Removed double translation of "Bamboo Sign" in sign registration. (Caused the Bamboo Sign Errors.) Added bamboo plank slabs to the group "wood_slabs" so that the barrel recipe works oob. --- mods/ITEMS/mcl_bamboo/init.lua | 54 ++++++++++++++++++++++++++++++++-- 1 file changed, 51 insertions(+), 3 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/init.lua b/mods/ITEMS/mcl_bamboo/init.lua index fcadd8bba..ce6ba02c1 100644 --- a/mods/ITEMS/mcl_bamboo/init.lua +++ b/mods/ITEMS/mcl_bamboo/init.lua @@ -176,7 +176,7 @@ local function create_nodes() local bamboo_block_def = { description = "Bamboo Block", tiles = {"mcl_bamboo_bamboo_bottom.png", "mcl_bamboo_bamboo_bottom.png", "mcl_bamboo_bamboo_block.png"}, - groups = {handy = 1, building_block = 1, axey = 1, flammable = 2, material_wood = 1, fire_encouragement = 5, fire_flammability = 5}, + groups = {handy = 1, building_block = 1, axey = 1, flammable = 2, material_wood = 1, bamboo_block = 1, fire_encouragement = 5, fire_flammability = 5}, sounds = node_sound, paramtype2 = "facedir", drops = "mcl_bamboo:bamboo_block", @@ -210,7 +210,7 @@ local function create_nodes() minetest.register_node("mcl_bamboo:bamboo_block", bamboo_block_def) local bamboo_stripped_block = table.copy(bamboo_block_def) bamboo_stripped_block.on_rightclick = nil - bamboo_stripped_block.description = "Bamboo Block" + bamboo_stripped_block.description = S("Stripped Bamboo Block") bamboo_stripped_block.tiles = {"mcl_bamboo_bamboo_bottom.png", "mcl_bamboo_bamboo_bottom.png", "mcl_bamboo_bamboo_block_stripped.png"} minetest.register_node("mcl_bamboo:bamboo_block_stripped", bamboo_stripped_block) minetest.register_node("mcl_bamboo:bamboo_plank", { @@ -341,6 +341,26 @@ local function create_nodes() S("Bamboo Plank Slab"), S("Double Bamboo Plank Slab") ) + + -- let's add plank slabs to the wood_slab group. + local bamboo_plank_slab = "mcl_stairs:slab_bamboo_plank" + local node_def_plank_slab_def = minetest.registered_nodes[bamboo_plank_slab] + node_def_plank_slab_def.groups = { + wood_slab = 1, + building_block = 1, + slab = 1, + axey = 1, + handy = 1, + stair = 1 + } + + if DEBUG then + minetest.log("Plank_Slab definition: \n" .. dump(node_def_plank_slab_def)) + end + + -- A necessary evil, to add a single group to an already registered node. (And yes, I did try override_item()) + minetest.unregister_item(node_def_plank_slab_def.name) + minetest.register_node(":"..node_def_plank_slab_def.name, node_def_plank_slab_def) end end end @@ -400,7 +420,7 @@ local function create_nodes() -- Bamboo Signs... mcl_signs.register_sign_custom("mcl_bamboo", "_bamboo", "mcl_signs_sign_greyscale.png", "#f6dc91", "default_sign_greyscale.png", "default_sign_greyscale.png", - S("Bamboo Sign")) + "Bamboo Sign") mcl_signs.register_sign_craft("mcl_bamboo", "mcl_bamboo:bamboo_plank", "_bamboo") minetest.register_alias("bamboo_sign", "mcl_signs:wall_sign_bamboo") end @@ -619,6 +639,13 @@ local function register_craftings() } }) + minetest.register_craft({ + output = bamboo .. "_plank 2", + recipe = { + {bamboo .. "_block_stripped"}, + } + }) + minetest.register_craft({ output = "mcl_core:stick", recipe = { @@ -627,6 +654,27 @@ local function register_craftings() } }) + -- Barrel and composter recipes + if minetest.get_modpath("mcl_stairs") and 1 == 2 then + -- currently disabled. + if mcl_stairs ~= nil then + minetest.register_craft({ + output = "mcl_barrels:barrel_closed", + recipe = { + {"group:wood", "group:wood_slab", "group:wood"}, + {"group:wood", "", "group:wood"}, + {"group:wood", "group:wood_slab", "group:wood"}, + } + }) + + minetest.register_craft({ + type = "fuel", + recipe = "mcl_barrels:barrel_closed", + burntime = 15, + }) + end + end + minetest.register_craft({ output = "mcl_bamboo:scaffolding 6", recipe = {{bamboo, "mcl_mobitems:string", bamboo}, From c09ed0280102f11773448a007429930a658bf25f Mon Sep 17 00:00:00 2001 From: Michieal Date: Fri, 16 Dec 2022 05:24:54 +0000 Subject: [PATCH 21/39] A more elegant solution for slabs After a good bit of trial and error, and asking questions... I have rewritten the override code and it works. (tested, slabs can now be used to make composters and barrels with this method.) --- mods/ITEMS/mcl_bamboo/init.lua | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/init.lua b/mods/ITEMS/mcl_bamboo/init.lua index ce6ba02c1..cf141272a 100644 --- a/mods/ITEMS/mcl_bamboo/init.lua +++ b/mods/ITEMS/mcl_bamboo/init.lua @@ -344,8 +344,7 @@ local function create_nodes() -- let's add plank slabs to the wood_slab group. local bamboo_plank_slab = "mcl_stairs:slab_bamboo_plank" - local node_def_plank_slab_def = minetest.registered_nodes[bamboo_plank_slab] - node_def_plank_slab_def.groups = { + local node_groups = { wood_slab = 1, building_block = 1, slab = 1, @@ -354,13 +353,7 @@ local function create_nodes() stair = 1 } - if DEBUG then - minetest.log("Plank_Slab definition: \n" .. dump(node_def_plank_slab_def)) - end - - -- A necessary evil, to add a single group to an already registered node. (And yes, I did try override_item()) - minetest.unregister_item(node_def_plank_slab_def.name) - minetest.register_node(":"..node_def_plank_slab_def.name, node_def_plank_slab_def) + minetest.override_item(bamboo_plank_slab, {groups = node_groups}) end end end From 1861d7d30dcfef141388429fef4f8745862affe9 Mon Sep 17 00:00:00 2001 From: Michieal Date: Sat, 17 Dec 2022 01:23:48 +0000 Subject: [PATCH 22/39] Conversation Fix. (Removed extra IF statement.) --- mods/ITEMS/mcl_bamboo/init.lua | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/init.lua b/mods/ITEMS/mcl_bamboo/init.lua index cf141272a..556a2e415 100644 --- a/mods/ITEMS/mcl_bamboo/init.lua +++ b/mods/ITEMS/mcl_bamboo/init.lua @@ -111,18 +111,16 @@ local function create_nodes() local new_pos = vector.offset(pos, 0, 1, 0) local node_above = minetest.get_node(new_pos) if node_above and node_above.name == "mcl_bamboo:bamboo" then - if node_above and node_above.name == "mcl_bamboo:bamboo" then - local sound_params = { - pos = new_pos, - gain = 1.0, -- default - max_hear_distance = 10, -- default, uses a Euclidean metric - } + local sound_params = { + pos = new_pos, + gain = 1.0, -- default + max_hear_distance = 10, -- default, uses a Euclidean metric + } - minetest.remove_node(new_pos) - minetest.sound_play(node_sound.dug, sound_params, true) - local istack = ItemStack("mcl_bamboo:bamboo") - minetest.add_item(new_pos, istack) - end + minetest.remove_node(new_pos) + minetest.sound_play(node_sound.dug, sound_params, true) + local istack = ItemStack("mcl_bamboo:bamboo") + minetest.add_item(new_pos, istack) end end, } From 256655df83d65e03d668459b7132d2f0275b3589 Mon Sep 17 00:00:00 2001 From: PrairieWind Date: Wed, 14 Dec 2022 20:13:08 -0700 Subject: [PATCH 23/39] Add bookshelves and anvils as structure constructed nodes --- mods/MAPGEN/mcl_structures/pillager_outpost.lua | 8 +++++++- mods/MAPGEN/mcl_structures/woodland_mansion.lua | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/mods/MAPGEN/mcl_structures/pillager_outpost.lua b/mods/MAPGEN/mcl_structures/pillager_outpost.lua index 719672044..9b72071f0 100644 --- a/mods/MAPGEN/mcl_structures/pillager_outpost.lua +++ b/mods/MAPGEN/mcl_structures/pillager_outpost.lua @@ -17,6 +17,7 @@ mcl_structures.register_structure("pillager_outpost",{ y_max = mcl_vars.mg_overworld_max, y_min = 1, biomes = { "Desert", "Plains", "Savanna", "IcePlains", "Taiga" }, + construct_nodes = {"mcl_anvils:anvil_damage_2"}, filenames = { modpath.."/schematics/mcl_structures_pillager_outpost.mts", modpath.."/schematics/mcl_structures_pillager_outpost_2.mts" @@ -67,7 +68,12 @@ mcl_structures.register_structure("pillager_outpost",{ mcl_structures.spawn_mobs("mobs_mc:pillager",spawnon,p1,p2,pr,5) mcl_structures.spawn_mobs("mobs_mc:parrot",{"mesecons_pressureplates:pressure_plate_stone_off"},p1,p2,pr,3) mcl_structures.spawn_mobs("mobs_mc:iron_golem",{"mesecons_button:button_stone_off"},p1,p2,pr,1) - mcl_structures.construct_nodes(p1,p2,{"group:wall"}) + for _,n in pairs(minetest.find_nodes_in_area(p1,p2,{"group:wall"})) do + local def = minetest.registered_nodes[minetest.get_node(n).name:gsub("_%d+$","")] + if def and def.on_construct then + def.on_construct(n) + end + end end }) diff --git a/mods/MAPGEN/mcl_structures/woodland_mansion.lua b/mods/MAPGEN/mcl_structures/woodland_mansion.lua index c4d494871..5429e4892 100644 --- a/mods/MAPGEN/mcl_structures/woodland_mansion.lua +++ b/mods/MAPGEN/mcl_structures/woodland_mansion.lua @@ -20,7 +20,7 @@ mcl_structures.register_structure("woodland_cabin",{ modpath.."/schematics/mcl_structures_woodland_cabin.mts", modpath.."/schematics/mcl_structures_woodland_outpost.mts", }, - construct_nodes = {"mcl_barrels:barrel_closed"}, + construct_nodes = {"mcl_barrels:barrel_closed","mcl_books:bookshelf"}, after_place = function(p,def,pr) local p1=vector.offset(p,-def.sidelen,-1,-def.sidelen) local p2=vector.offset(p,def.sidelen,def.sidelen,def.sidelen) From 0a2f57476e98b0e6a8addc83428c37c92e0303c2 Mon Sep 17 00:00:00 2001 From: PrairieWind Date: Thu, 15 Dec 2022 18:44:56 -0700 Subject: [PATCH 24/39] Update Woodland Outpost Schematic Switched double chest with barrels so that they work correctly --- .../mcl_structures_woodland_outpost.mts | Bin 3210 -> 3195 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/mods/MAPGEN/mcl_structures/schematics/mcl_structures_woodland_outpost.mts b/mods/MAPGEN/mcl_structures/schematics/mcl_structures_woodland_outpost.mts index dac927b66762f163abca557a8f30112d0e96235c..8ee1daffae50c4825170f5b4b95c180c037dcc71 100644 GIT binary patch delta 1847 zcmV-72gvw}8T%NJ9|1M7AY%j?8Es>1Ut(c$a%F6DI$~jRa%F5^V{C78Wn`1F1mS-a zR219b6bQ5-N$Ig{Tb35K$F}`{{p+zXG^AwVD+eX*VAu`KIp{A5`H#*P-V;5!F4 zi@Ds-^ir+oB)b9ZhGcWVrV+B#nku=;*=OUD&j6dg&Q|W@0hXbG8N8OAvy0)gWS7HI zt?9c-JM3LLM~HQbomYE?jePTT_AJ3ht%_#H?W9Sx5)^y-;eIC4Rj{{*+UbAU*X$d% z0(Q*C!1gkB%dTaL?FgvV)AkbfVa1&#TSw`VWS;}}l4Q4odc#Dkp=TStCGOlCnUp6{ zAH}jQU$IfIqi0*^o8l{W2T~ujY{AEEipv;duFdjA+(GPq^kS$T#9pv(;aL|1TdiYu zY~xaYD4rr+avA9m`Nl zmBf!!W!e$B+yd(@(UMVoq3vbt(mor;F=;1O3hITOlWY{FOb@SAJAN)7;WZdf-msr^ z`dKE7MQ~Iau67LawDXHjyJ$z@j(w8pE?MH|e1h3sJ6pnT;kNpQuw(1}1p76$6UU8| zcH(_0cByvQpcgkG^ud2R4b$H!VPoz5s=sd?wt=f1UfgH99o9-UcUnO?apyOgV!NAn zN!&^G*$}Kow#==SDec&Psc*;Z`{7yj9@s5>?bs*V9PP{}c>Xc*I9nV^a4$@?!Q396 zV&`hdZ{H7c>1yXuCZ<`6eUov$haY!ri?!OJOYFAq&qK1>dFg-W9bV%OLu$aiFiJbd zB4BO1Y3KJL-LXGp8&by$JPvnZksdY6Rob6&`Ip1?@x0GFrcJreJNt_}=n378JD(@w z&iR3T)oK20enGv*9Bv}R{ZK)CM+;KLOcRUs*YHOplvyrveJ8U%0X2z-2dTN{v zvFUL(zrQG!=#GC(YbSNLkDqs*9vjNkP_>gn&ifq>)o@O-QzP0jyX5^2mzr?3b0sw* z5Wn9M>@Un$!xu)q-x2I>z}{*#(C>F#?KFgTQhheuVsG`b3o6sV}QpLqp*j1~{<@8Od(uV8;6+5brPf@IG;_JhZM`FRCQ zs>lCa!4_NEzF%sbZQ6bu+A$C{_AkqQ%5H*n8tp{H@$u1FPtAejiEoI_;WowPSzI%p z&Bh!vpACVY7ZxKmLoG&XhFTe$n*CPivtg8t1(#|^^@Q@Y^E^PadQ$VKLk>^QqZUy5 zIgx!eK2d)&cIIu)EZN-o$Fnh4_gGF`=iDiS%cka0Tef>onVLtv@0rwx8F$n@Ggmu` zovR&xJ(ah=ek*Kuu0h2y!HhQLdcL-jiVB5N?Nn4$7}Q8oQ9{2GlMos>H;{@szJHq|Xy=6J`SM+&g@L zZ^_XP&N1bkAr2=>u`_n@j@tPqyaSNoo(_L;IDKcEi+Z{CgBKllkeMj!4&IrqQxr<}tsPmh(mNh`FL8$-rgqA`)A!Mj@yASNv9%c&=`*_RJ4ZWn zaA0xVIrLsZ;sDTR^Vs&s&bw;|?(n@6H2d{>9k7W^%F1#$-YM*w;<%HQ$qJe$s|tU6 zhhQh3caRz9_GZ09j1_RTfCo|LuvfRkSb>I95BvCUZ-?X^g_5i4Sfaxg{vm>vFt>K; zTHDyV>GbVuz0P>v!65qGl(}%6ZEf+|<7^Y&c?!mQXv1n7bjEq;OX2diZIKy4^E~>> lw1{Elj!~XH?9|1P8AY%kB6>Vc|Ut?%xb98e$V`yb_bYE;`W^@1+ZDVX-V`yb_ zbaOgmXk~MBUvg<@XmpdE1mS-WRTSIcG!WRDB&El)+p=t7du`j_*S}utvaT6fasmlt zp1#;-{4C2FJ&!Cafw7atEclxPHjBC3@3ZG9yV7j#uq%|!0XB}1rPf%lD z?A-G30`^(oe$JvKY|t?^Yr#~b>;>?F*s}yX*4jM5j@2_ylsjhE$rR%oG{q1)SoY-% z({e;R%M6}>%rb*lvkP|Fe^%_OU#c~JH>vx*E9VHYPOO9m z60HP^J#BwK6X`nG+k$`EY1upWE$aX~%!UEm%h)x$ktw!AfLc9nFJT{7+*z@8l&(@r2V%E_7ennp>;?M{JnI5st98tdZCsuail>k+xr}rW`;>pQQ_JYGk`cy4kXQ{D z1KY+Ub;MPY9Vc8n(7pXy@2hmnx*pn;VBgBmt=_V&ts3}?MBXgoFLW)1C2WG0toYb{ z`V6_saqZZ0!?_Fg_ux4(HjGj>+iuASpJWT|oI6QqCsh(ZQk7{(;rfW#*??~qfS4|1Y;2#m4>SwgFNm0qSF-ZDBQD8GTkRj z{G3lP)3vij>=tgTuMj(IeHdXMQaf?nNNFeDmtvP{hxLDYaTA0#Sf^q78zpR5JD>I6 zTZe7nYKIs1+3xzaQq8?qP)^+WRi@bP=3NqZ%6fRNMz+kYl`-wueyMMV*$@4*>H}c6 z@U>%~Y;&|TAL04O#N%vnB!PQjstxA$@Dw{&JAV6qluK7TPckvhQtaD|>plLsV_U4% z4qjrneSd%Hlhw}dPcWryiaU@R;9eM}9b*x&wrSe=js4!Yo<;Bo;1r< z+Mjaym&5k)yw5wPO}WoI`-?l!6S^CBzKq13{XOr{SV3x>O^vXb5wuh!Sp_3)sS)km zaW<28JQgNuYooQZk+s)4Y-pU#j8m)i*f<-+#>aoz{QhFj7`3mR)ZIRQ-YJU>P)W+v zK-x(m=lu=`)o_8bQzP0jyX5^2mzr?3b1gL@5Wn9M?61sM!&ipA-x2I>z}_=-55amU#{>5ss8+!?pO)bmb`{ZzE0-r-#8*rJwr`&P3MuJoJ&6_xfguYeEH z;*o#--G6fC6)YtCAIV;z?3u@Y^w=*yuYgJQ_@8UA#g?}3ml|gqx1WY~3`C9n%W|Kx zt6-f*JrZ$zd~nufvj@l6@%+vdH=HAh!OUl~F~`hjgMiNqi;?j2+XvN>{{bEgcJ z%h7q%mhIkC#^zD)dnWa9#vOIf%+-!!=W54akLB&JUklrvYd|<9n9-(O&r>TQ5EM$a zLm&_gD3TBeDE=c52m}IwKp+qZ1OkCTAP@)y0)apv5C{YU;h;G5n{$a^-fLGGa~FTo zs+e6NW`>z7ZSEkmch08j4a!_KK{nbva%Ie)I6nvW;8W!Tm@X_t#oZgl~OU# z4CPaS=1tQXG&jg4m6->0@L!$lk!CP2eb@qa7S1ot?#(+Th)cI8AXOzMJ`Sf0PC9(c zV4`<0G|uHYoMo z>gC1{UU=Mr%t%=$cxTqhy^(jis8n)KH^Do24MN^23MKp2j;vVe9gkcVU@-G>YG;yn z!Y|_wnapBqH7wF+blZ21cILo=#c}7@dj*LDfIgeYwqJIht{o7*cYtU$x5hkg9Fw`1~- zLdjJ%EYV>@euyA6*PvNFqSwB4)9BmRdY$pS0|V)IW9Gtfwzb8f$Js`_vkN+4OQF{p zkALc;mj0{}&xe41$f7eXqF=dV)GA|X_OG;7$Hym)@z%UUAP@+Iw~Ge<0j;35vuoeA AhyVZp From 5191326fc721fc9904ec8fc7db95f5fecc6c6468 Mon Sep 17 00:00:00 2001 From: Michieal Date: Sun, 18 Dec 2022 21:04:43 -0500 Subject: [PATCH 25/39] Misc. Fixes. Added in burn times for slabs. --- mods/ITEMS/mcl_bamboo/init.lua | 94 +++++++++++++++++++++------------- 1 file changed, 59 insertions(+), 35 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/init.lua b/mods/ITEMS/mcl_bamboo/init.lua index 556a2e415..90ef72957 100644 --- a/mods/ITEMS/mcl_bamboo/init.lua +++ b/mods/ITEMS/mcl_bamboo/init.lua @@ -348,7 +348,10 @@ local function create_nodes() slab = 1, axey = 1, handy = 1, - stair = 1 + stair = 1, + flammable = 1, + fire_encouragement = 5, + fire_flammability = 20 } minetest.override_item(bamboo_plank_slab, {groups = node_groups}) @@ -552,18 +555,16 @@ local function create_nodes() local new_pos = vector.offset(pos, 0, 1, 0) local node_above = minetest.get_node(new_pos) if node_above and node_above.name == "mcl_bamboo:scaffolding" then - if node_above and node_above.name == "mcl_bamboo:scaffolding" then - local sound_params = { - pos = new_pos, - gain = 1.0, -- default - max_hear_distance = 10, -- default, uses a Euclidean metric - } + local sound_params = { + pos = new_pos, + gain = 1.0, -- default + max_hear_distance = 10, -- default, uses a Euclidean metric + } - minetest.remove_node(new_pos) - minetest.sound_play(node_sound.dug, sound_params, true) - local istack = ItemStack("mcl_bamboo:scaffolding") - minetest.add_item(new_pos, istack) - end + minetest.remove_node(new_pos) + minetest.sound_play(node_sound.dug, sound_params, true) + local istack = ItemStack("mcl_bamboo:scaffolding") + minetest.add_item(new_pos, istack) end end, @@ -645,27 +646,6 @@ local function register_craftings() } }) - -- Barrel and composter recipes - if minetest.get_modpath("mcl_stairs") and 1 == 2 then - -- currently disabled. - if mcl_stairs ~= nil then - minetest.register_craft({ - output = "mcl_barrels:barrel_closed", - recipe = { - {"group:wood", "group:wood_slab", "group:wood"}, - {"group:wood", "", "group:wood"}, - {"group:wood", "group:wood_slab", "group:wood"}, - } - }) - - minetest.register_craft({ - type = "fuel", - recipe = "mcl_barrels:barrel_closed", - burntime = 15, - }) - end - end - minetest.register_craft({ output = "mcl_bamboo:scaffolding 6", recipe = {{bamboo, "mcl_mobitems:string", bamboo}, @@ -732,6 +712,24 @@ local function register_craftings() recipe = "mcl_bamboo:scaffolding", burntime = 20 }) + + "mcl_stairs:slab_bamboo_plank" + minetest.register_craft({ + type = "fuel", + recipe = "mcl_stairs:slab_bamboo_plank", + burntime = 7.5, + }) + minetest.register_craft({ + type = "fuel", + recipe = "mcl_stairs:slab_bamboo_block", + burntime = 7.5, + }) + minetest.register_craft({ + type = "fuel", + recipe = "mcl_stairs:slab_bamboo_stripped", + burntime = 7.5, + }) + end create_nodes() @@ -740,6 +738,8 @@ register_craftings() -- MAPGEN dofile(minetest.get_modpath(modname) .. "/mapgen.lua") +local BAMBOO_MAX_HEIGHT_CHECK = -16 + --ABMs minetest.register_abm({ nodenames = {"mcl_bamboo:bamboo"}, @@ -751,7 +751,7 @@ minetest.register_abm({ return end local found_soil = false - for py = -1, -16, -1 do + for py = -1, BAMBOO_MAX_HEIGHT_CHECK, -1 do local chk_pos = vector.offset(pos, 0, py, 0) local name = minetest.get_node(chk_pos).name if minetest.get_item_group(name, "soil") ~= 0 then @@ -810,4 +810,28 @@ todo: Added a new "Mosaic" plank variant that is unique to Bamboo called Bamboo You can craft Stair and Slab variants of Bamboo Mosaic Bamboo Mosaic blocks cannot be used as a crafting ingredient where other wooden blocks are used, but they can be used as fuel. ---]] \ No newline at end of file + +todo -- add in fuel recipes for: + [-] bamboo slab + stripped bamboo slab + [-] bamboo stair + stripped bamboo stair + bamboo plank stair + [-] bamboo button +--]] + +--[[ +Useful code snippit for dealing with updating groups on already defined objects, such as api created items. +I think that this will be implemented, as time goes on, to deal with adding groups to slabs and the like. +local function addgroups(name, ...) + local def = minetest.registered_items[name] or error(name .. " not found") + local groups = {} + for k, v in pairs(def.groups) do + groups[k] = v + end + local function addall(x, ...) + if not x then return end + groups[x] = 1 + return addall(...) + end + addall(...) + return minetest.override_item(name, {groups = groups}) +end +--]] From fe26f117daa6e6b04211e10bda3459b9194734aa Mon Sep 17 00:00:00 2001 From: Michieal Date: Sun, 18 Dec 2022 21:04:43 -0500 Subject: [PATCH 26/39] Misc. Fixes. Added in burn times for slabs. And then amend the commit to remove an oops. --- mods/ITEMS/mcl_bamboo/init.lua | 93 +++++++++++++++++++++------------- 1 file changed, 58 insertions(+), 35 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/init.lua b/mods/ITEMS/mcl_bamboo/init.lua index 556a2e415..99b7c28db 100644 --- a/mods/ITEMS/mcl_bamboo/init.lua +++ b/mods/ITEMS/mcl_bamboo/init.lua @@ -348,7 +348,10 @@ local function create_nodes() slab = 1, axey = 1, handy = 1, - stair = 1 + stair = 1, + flammable = 1, + fire_encouragement = 5, + fire_flammability = 20 } minetest.override_item(bamboo_plank_slab, {groups = node_groups}) @@ -552,18 +555,16 @@ local function create_nodes() local new_pos = vector.offset(pos, 0, 1, 0) local node_above = minetest.get_node(new_pos) if node_above and node_above.name == "mcl_bamboo:scaffolding" then - if node_above and node_above.name == "mcl_bamboo:scaffolding" then - local sound_params = { - pos = new_pos, - gain = 1.0, -- default - max_hear_distance = 10, -- default, uses a Euclidean metric - } + local sound_params = { + pos = new_pos, + gain = 1.0, -- default + max_hear_distance = 10, -- default, uses a Euclidean metric + } - minetest.remove_node(new_pos) - minetest.sound_play(node_sound.dug, sound_params, true) - local istack = ItemStack("mcl_bamboo:scaffolding") - minetest.add_item(new_pos, istack) - end + minetest.remove_node(new_pos) + minetest.sound_play(node_sound.dug, sound_params, true) + local istack = ItemStack("mcl_bamboo:scaffolding") + minetest.add_item(new_pos, istack) end end, @@ -645,27 +646,6 @@ local function register_craftings() } }) - -- Barrel and composter recipes - if minetest.get_modpath("mcl_stairs") and 1 == 2 then - -- currently disabled. - if mcl_stairs ~= nil then - minetest.register_craft({ - output = "mcl_barrels:barrel_closed", - recipe = { - {"group:wood", "group:wood_slab", "group:wood"}, - {"group:wood", "", "group:wood"}, - {"group:wood", "group:wood_slab", "group:wood"}, - } - }) - - minetest.register_craft({ - type = "fuel", - recipe = "mcl_barrels:barrel_closed", - burntime = 15, - }) - end - end - minetest.register_craft({ output = "mcl_bamboo:scaffolding 6", recipe = {{bamboo, "mcl_mobitems:string", bamboo}, @@ -732,6 +712,23 @@ local function register_craftings() recipe = "mcl_bamboo:scaffolding", burntime = 20 }) + + minetest.register_craft({ + type = "fuel", + recipe = "mcl_stairs:slab_bamboo_plank", + burntime = 7.5, + }) + minetest.register_craft({ + type = "fuel", + recipe = "mcl_stairs:slab_bamboo_block", + burntime = 7.5, + }) + minetest.register_craft({ + type = "fuel", + recipe = "mcl_stairs:slab_bamboo_stripped", + burntime = 7.5, + }) + end create_nodes() @@ -740,6 +737,8 @@ register_craftings() -- MAPGEN dofile(minetest.get_modpath(modname) .. "/mapgen.lua") +local BAMBOO_MAX_HEIGHT_CHECK = -16 + --ABMs minetest.register_abm({ nodenames = {"mcl_bamboo:bamboo"}, @@ -751,7 +750,7 @@ minetest.register_abm({ return end local found_soil = false - for py = -1, -16, -1 do + for py = -1, BAMBOO_MAX_HEIGHT_CHECK, -1 do local chk_pos = vector.offset(pos, 0, py, 0) local name = minetest.get_node(chk_pos).name if minetest.get_item_group(name, "soil") ~= 0 then @@ -810,4 +809,28 @@ todo: Added a new "Mosaic" plank variant that is unique to Bamboo called Bamboo You can craft Stair and Slab variants of Bamboo Mosaic Bamboo Mosaic blocks cannot be used as a crafting ingredient where other wooden blocks are used, but they can be used as fuel. ---]] \ No newline at end of file + +todo -- add in fuel recipes for: + [-] bamboo slab + stripped bamboo slab + [-] bamboo stair + stripped bamboo stair + bamboo plank stair + [-] bamboo button +--]] + +--[[ +Useful code snippit for dealing with updating groups on already defined objects, such as api created items. +I think that this will be implemented, as time goes on, to deal with adding groups to slabs and the like. +local function addgroups(name, ...) + local def = minetest.registered_items[name] or error(name .. " not found") + local groups = {} + for k, v in pairs(def.groups) do + groups[k] = v + end + local function addall(x, ...) + if not x then return end + groups[x] = 1 + return addall(...) + end + addall(...) + return minetest.override_item(name, {groups = groups}) +end +--]] From 7a3f37342544f7f6b18da787834ee056c89f19ac Mon Sep 17 00:00:00 2001 From: Michieal Date: Sun, 18 Dec 2022 21:04:43 -0500 Subject: [PATCH 27/39] Misc. Fixes. Added in burn times for slabs. And then amend the commit to remove an oops. --- mods/ITEMS/mcl_bamboo/init.lua | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/init.lua b/mods/ITEMS/mcl_bamboo/init.lua index c402ff54b..99b7c28db 100644 --- a/mods/ITEMS/mcl_bamboo/init.lua +++ b/mods/ITEMS/mcl_bamboo/init.lua @@ -729,23 +729,6 @@ local function register_craftings() burntime = 7.5, }) - - minetest.register_craft({ - type = "fuel", - recipe = "mcl_stairs:slab_bamboo_plank", - burntime = 7.5, - }) - minetest.register_craft({ - type = "fuel", - recipe = "mcl_stairs:slab_bamboo_block", - burntime = 7.5, - }) - minetest.register_craft({ - type = "fuel", - recipe = "mcl_stairs:slab_bamboo_stripped", - burntime = 7.5, - }) - end create_nodes() @@ -851,4 +834,3 @@ local function addgroups(name, ...) return minetest.override_item(name, {groups = groups}) end --]] - From f737df79e5992d0168ef868d39c79dd3bd22689a Mon Sep 17 00:00:00 2001 From: Michieal Date: Mon, 19 Dec 2022 04:06:33 +0000 Subject: [PATCH 28/39] revert 7a3f37342544f7f6b18da787834ee056c89f19ac revert Misc. Fixes. Added in burn times for slabs. And then amend the commit to remove an oops. --- mods/ITEMS/mcl_bamboo/init.lua | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/mods/ITEMS/mcl_bamboo/init.lua b/mods/ITEMS/mcl_bamboo/init.lua index 99b7c28db..76cd95078 100644 --- a/mods/ITEMS/mcl_bamboo/init.lua +++ b/mods/ITEMS/mcl_bamboo/init.lua @@ -729,6 +729,23 @@ local function register_craftings() burntime = 7.5, }) + + minetest.register_craft({ + type = "fuel", + recipe = "mcl_stairs:slab_bamboo_plank", + burntime = 7.5, + }) + minetest.register_craft({ + type = "fuel", + recipe = "mcl_stairs:slab_bamboo_block", + burntime = 7.5, + }) + minetest.register_craft({ + type = "fuel", + recipe = "mcl_stairs:slab_bamboo_stripped", + burntime = 7.5, + }) + end create_nodes() From 64c8afc8f06afc19c2dda28369830af7e706cd37 Mon Sep 17 00:00:00 2001 From: Michieal Date: Mon, 19 Dec 2022 04:11:25 +0000 Subject: [PATCH 29/39] Undo the revert. >.< /facepalm *grumbles* --- mods/ITEMS/mcl_bamboo/init.lua | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/init.lua b/mods/ITEMS/mcl_bamboo/init.lua index 76cd95078..99b7c28db 100644 --- a/mods/ITEMS/mcl_bamboo/init.lua +++ b/mods/ITEMS/mcl_bamboo/init.lua @@ -729,23 +729,6 @@ local function register_craftings() burntime = 7.5, }) - - minetest.register_craft({ - type = "fuel", - recipe = "mcl_stairs:slab_bamboo_plank", - burntime = 7.5, - }) - minetest.register_craft({ - type = "fuel", - recipe = "mcl_stairs:slab_bamboo_block", - burntime = 7.5, - }) - minetest.register_craft({ - type = "fuel", - recipe = "mcl_stairs:slab_bamboo_stripped", - burntime = 7.5, - }) - end create_nodes() From e53d7576c3e5267495ac7c6cab6e46d5562d9579 Mon Sep 17 00:00:00 2001 From: Michieal Date: Mon, 19 Dec 2022 13:44:24 -0500 Subject: [PATCH 30/39] Made bamboo buttons flammable, and made them into a fuel source. Converted commented code snippet, addgroups() into global function. Stairs will be a fuel source in part 2. --- mods/ITEMS/mcl_bamboo/init.lua | 45 +++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 20 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/init.lua b/mods/ITEMS/mcl_bamboo/init.lua index 99b7c28db..a61eca59e 100644 --- a/mods/ITEMS/mcl_bamboo/init.lua +++ b/mods/ITEMS/mcl_bamboo/init.lua @@ -26,6 +26,25 @@ local USE_END_CAPS = false local BROKEN_DOORS = true -- LOCAL FUNCTIONS + +-- Add Groups function, courtesy of Warr1024. +function addgroups(name, ...) + local def = minetest.registered_items[name] or error(name .. " not found") + local groups = {} + for k, v in pairs(def.groups) do + groups[k] = v + end + local function addall(x, ...) + if not x then + return + end + groups[x] = 1 + return addall(...) + end + addall(...) + return minetest.override_item(name, {groups = groups}) +end + local function create_nodes() local bamboo_def = { @@ -467,7 +486,7 @@ local function create_nodes() "mcl_bamboo_bamboo_plank.png", "mcl_bamboo:bamboo_plank", node_sound, - {material_wood = 1, handy = 1, pickaxey = 1}, + {material_wood = 1, handy = 1, pickaxey = 1, flammable = 3, fire_flammability = 20, fire_encouragement = 5, }, 1, false, S("A bamboo button is a redstone component made out of stone which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for 1 second."), @@ -727,6 +746,11 @@ local function register_craftings() type = "fuel", recipe = "mcl_stairs:slab_bamboo_stripped", burntime = 7.5, + }) "mesecons_button:button_bamboo_off" + minetest.register_craft({ + type = "fuel", + recipe = "mesecons_button:button_bamboo_off", + burntime = 5, }) end @@ -815,22 +839,3 @@ todo -- add in fuel recipes for: [-] bamboo stair + stripped bamboo stair + bamboo plank stair [-] bamboo button --]] - ---[[ -Useful code snippit for dealing with updating groups on already defined objects, such as api created items. -I think that this will be implemented, as time goes on, to deal with adding groups to slabs and the like. -local function addgroups(name, ...) - local def = minetest.registered_items[name] or error(name .. " not found") - local groups = {} - for k, v in pairs(def.groups) do - groups[k] = v - end - local function addall(x, ...) - if not x then return end - groups[x] = 1 - return addall(...) - end - addall(...) - return minetest.override_item(name, {groups = groups}) -end ---]] From d9bd3e2601a5680a771c4b91719ba40e95768c65 Mon Sep 17 00:00:00 2001 From: FossFanatic Date: Wed, 14 Dec 2022 14:34:45 +0000 Subject: [PATCH 31/39] Add seperate nether gold ore texture --- .../mcl_nether/textures/mcl_nether_gold_ore.png | Bin 0 -> 689 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 mods/ITEMS/mcl_nether/textures/mcl_nether_gold_ore.png diff --git a/mods/ITEMS/mcl_nether/textures/mcl_nether_gold_ore.png b/mods/ITEMS/mcl_nether/textures/mcl_nether_gold_ore.png new file mode 100644 index 0000000000000000000000000000000000000000..2a670e61abf0f9449250fc5ceea50d6a922c0340 GIT binary patch literal 689 zcmV;i0#5yjP)| z(MwZN9LGQRy0qOnHrl$=)yfn^r%P=h1h#_cAryM)sa~Q7UyA;Kdg-Y@pnsw8DMHW? zq+np+!w8aW1EEW{lHKFIy3uyGY3}rJy-V%Dfx|i9-}!yd=l46xY-&gX?6jJk9B0(7 z_Bx3JKw@+NM^pf?g@rGPLw&f)HM!)ax+n_ub z9utqt+~fBy15Y4xVV22KH0DW9_TVp6iRe)@Jw*NDrW^SVR)hn>VW-srG~6d7aj=C$ zVsik0;SX;LEs}?sf@u?HDU2;Fgba|GX(DrBK*JUm%H5Gm@@QF(mhvRL%=BIxvdp=c z`T#z*I*y6FLjY8_`+{kcTQd*YHVs(IvR-lk4RuOAz?)u%pONp!8p;tBgwmuZFZa@`I<5oHdWJnlChoBHYmN_JTkNWCg8{GrkfmspNl*4*E>(!=QG8x`lEPwq zEaqAScGbfVr2gX}b5Y8rPV$8+LP|DdgO2Onr=Dv8je5<&SgBF|p|HAK#Zf@YPAZ7b`>LLsf>}pbYX4OwGrdRAD0ANKL(@YP*T3-> X^%EPiMl3Zl00000NkvXXu0mjfMb$Zu literal 0 HcmV?d00001 From f29622dd59e4e681d161dc8ed446a4ff74b0a7a2 Mon Sep 17 00:00:00 2001 From: FossFanatic Date: Wed, 14 Dec 2022 14:36:36 +0000 Subject: [PATCH 32/39] Allow for both top/bottom and side textures --- mods/ITEMS/mcl_blackstone/init.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mods/ITEMS/mcl_blackstone/init.lua b/mods/ITEMS/mcl_blackstone/init.lua index 00b9819f8..cb6ef5493 100644 --- a/mods/ITEMS/mcl_blackstone/init.lua +++ b/mods/ITEMS/mcl_blackstone/init.lua @@ -9,7 +9,7 @@ end --Blocks minetest.register_node("mcl_blackstone:blackstone", { description = S("Blackstone"), - tiles = {"mcl_blackstone.png"}, + tiles = {"mcl_blackstone_top.png", "mcl_blackstone_top.png", "mcl_blackstone_side.png"}, sounds = mcl_sounds.node_sound_stone_defaults(), is_ground_content = false, groups = {cracky = 3, pickaxey=2, material_stone=1, cobble=1}, @@ -18,7 +18,7 @@ minetest.register_node("mcl_blackstone:blackstone", { }) minetest.register_node("mcl_blackstone:blackstone_gilded", { description = S("Gilded Blackstone"), - tiles = {"mcl_blackstone.png^mcl_blackstone_gilded_side.png"}, + tiles = {"mcl_blackstone_gilded.png"}, sounds = mcl_sounds.node_sound_stone_defaults(), is_ground_content = false, groups = {cracky = 3, pickaxey=2, material_stone=1, xp=1}, @@ -40,7 +40,7 @@ minetest.register_node("mcl_blackstone:blackstone_gilded", { }) minetest.register_node("mcl_blackstone:nether_gold", { description = S("Nether Gold Ore"), - tiles = {"mcl_nether_netherrack.png^mcl_blackstone_gilded_side.png"}, + tiles = {"mcl_nether_gold_ore.png"}, sounds = mcl_sounds.node_sound_stone_defaults(), is_ground_content = false, groups = {cracky = 3, pickaxey=2, material_stone=1, xp=1}, From 2dffe11cddc06113b8fde1fa88dd7891195b2132 Mon Sep 17 00:00:00 2001 From: FossFanatic Date: Wed, 14 Dec 2022 14:37:34 +0000 Subject: [PATCH 33/39] Add seperate gilded blackstone texture --- .../textures/mcl_blackstone_gilded.png | Bin 0 -> 596 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 mods/ITEMS/mcl_blackstone/textures/mcl_blackstone_gilded.png diff --git a/mods/ITEMS/mcl_blackstone/textures/mcl_blackstone_gilded.png b/mods/ITEMS/mcl_blackstone/textures/mcl_blackstone_gilded.png new file mode 100644 index 0000000000000000000000000000000000000000..82423ca18551b5b5f4e14fcd34c7f18651ed168c GIT binary patch literal 596 zcmV-a0;~OrP)@KQP82qOr3;q=ZKUMk1cYiU}|K2l18fzN0-o?At)oO!qh5U!xXRoBjGHTx7x zlJ!~};f5@#Ya!%~T?5ND=3I(7jx(7Bsp$&WLoB&$JsGlIYexXjs| iW}ls}VA%%Jmiz@dr|xi0j21rt0000 Date: Wed, 14 Dec 2022 14:38:32 +0000 Subject: [PATCH 34/39] Delete 'mods/ITEMS/mcl_blackstone/textures/mcl_blackstone.png' --- .../mcl_blackstone/textures/mcl_blackstone.png | Bin 1656 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 mods/ITEMS/mcl_blackstone/textures/mcl_blackstone.png diff --git a/mods/ITEMS/mcl_blackstone/textures/mcl_blackstone.png b/mods/ITEMS/mcl_blackstone/textures/mcl_blackstone.png deleted file mode 100644 index a811c69404f315f347c27aeb9e3466322dc1ce34..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1656 zcmV-;28a2HP) zaB^>EX>4U6ba`-PAZ2)IW&i+q+O1bxw&N%a{MRaG2?!w&%fVpInH}`depmxmyGUyq zuYRBNllJquAh_ATz4t@N6GtWxF5v#5X1TTJJefdbM?cPYh;v75ENeopWgj%Gjd zrJt4=dsXeQ{5DW&nYeLRYmr*_5nXa#nes4$Izs6!owzBL)R%cJLBFi+&`Z=J8e&$( zimJJ3$$$~9vR%<(!Gsm}UT4heqO-dVT3ee{gVrY$Y_yr01g;gVHc+GjB&ttV)kwST z@&&uy*zIK$wOmkVT2wI96}JMPI{!~uK()55i)dtVrGDAAr`3(7Tzl#)6$I<#lsmt@ zz{|cdFT#>4$em`<0F&7U#Kw5;E$TXx&ST@ijH7{}OaP@wZL>OqqzV|1#OTokYXhS4 zD5_6V&n-E-sRGDs3qn!A9IQS5Pgcy>LIAQS;L?lXzHj<_=jy?v65@SqBjV6Uo zx;p8Mls3E3<~H8^7B<=9ma=Z2>@sJcLzWzKDz;G3<6nFUP^83?cHDIT9S{V@*r7sp`9Gcv0@VYB*JEin%^7oT_Pe2nPhVbiz$DRm?h6#Y0m- zH?(b<8A0c4Q?6-dqSZseR#ii8;uLI(se*1t%N3V)r*dC)19pF;n|)Fansk3dIcU;N z@$NJaq zs!{vMy(uP_J|`;wr4KqiYX=gx8XABPeE}bscL$zoJ){#3Ch&$btQ#|HOx$hTa~1hM zSF`xCOm6gTnzQfDJ~H%yM4Y^UzY}uBI|-t4IC4XToAqbzkJ{BEgcn}mi4a>3uJUk| zt-Vv6!x20jV+U!A^gH&lkq%^AMyz^&!PS8!S{yh|UGoS%aEQmFC$Q|mv-ui?ws$3-E1C>O(ft~ zq($e7U?HwZwp&++gjekCY3F=idlIDlz)8?a#5WgjShI#ZvCFR+m#VSU-WT4LSV(c5 z>ZGmolYZMnxbPZhz8%;7N;=-6pHah?us@l&?Sj{Rl%K*FjnnEkqwtB_l1Bn+cjr@X zI?v?Di*U>0ubJqc?DjBP5ij(^$8A>dNDud{u$+9qSzx5P-*Lu%1eogu9@DygO7s4- zaR!R8xaRFKF|CAV(}kdO6F|Kt81qB@kei^7`4Lw-6ShwWBlP96mXjFxfthEfmOtax zh1Y8r2G8{$dq6X4M~1`tLUU2RAyjSS2Q+kN^Mx24YJ`L;(K) z{{a7>y{D4^000SaNLh0L04^f{04^f|c%?sf00007bV*G`2jv0+3^fSxobVaO%yAonx^T90!fnWift6c-^Wuh83FL#lMjHP#WA{_)W-v3BI3QLl0Ge+ z-t``ae;A);`aZRV>#d|>B14^K)ZN9XyZr2*1e`^aHvo-{iml68vaZ_M?6E9Mj-pEt z5!U#%wObRC)_O{F`<&n*dm0V_r=U7~B}wAF2Vg&n?M|AyRZ4B-%@`A2%qUW0qYP~r zQeUnXXP0=^>kWktm+HKKY1X;KdHKo>UAllW#O6Q3;n^d{FY@aE0000 Date: Wed, 14 Dec 2022 14:38:58 +0000 Subject: [PATCH 35/39] Add blackstone side texture --- .../textures/mcl_blackstone_side.png | Bin 0 -> 1656 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 mods/ITEMS/mcl_blackstone/textures/mcl_blackstone_side.png diff --git a/mods/ITEMS/mcl_blackstone/textures/mcl_blackstone_side.png b/mods/ITEMS/mcl_blackstone/textures/mcl_blackstone_side.png new file mode 100644 index 0000000000000000000000000000000000000000..a811c69404f315f347c27aeb9e3466322dc1ce34 GIT binary patch literal 1656 zcmV-;28a2HP) zaB^>EX>4U6ba`-PAZ2)IW&i+q+O1bxw&N%a{MRaG2?!w&%fVpInH}`depmxmyGUyq zuYRBNllJquAh_ATz4t@N6GtWxF5v#5X1TTJJefdbM?cPYh;v75ENeopWgj%Gjd zrJt4=dsXeQ{5DW&nYeLRYmr*_5nXa#nes4$Izs6!owzBL)R%cJLBFi+&`Z=J8e&$( zimJJ3$$$~9vR%<(!Gsm}UT4heqO-dVT3ee{gVrY$Y_yr01g;gVHc+GjB&ttV)kwST z@&&uy*zIK$wOmkVT2wI96}JMPI{!~uK()55i)dtVrGDAAr`3(7Tzl#)6$I<#lsmt@ zz{|cdFT#>4$em`<0F&7U#Kw5;E$TXx&ST@ijH7{}OaP@wZL>OqqzV|1#OTokYXhS4 zD5_6V&n-E-sRGDs3qn!A9IQS5Pgcy>LIAQS;L?lXzHj<_=jy?v65@SqBjV6Uo zx;p8Mls3E3<~H8^7B<=9ma=Z2>@sJcLzWzKDz;G3<6nFUP^83?cHDIT9S{V@*r7sp`9Gcv0@VYB*JEin%^7oT_Pe2nPhVbiz$DRm?h6#Y0m- zH?(b<8A0c4Q?6-dqSZseR#ii8;uLI(se*1t%N3V)r*dC)19pF;n|)Fansk3dIcU;N z@$NJaq zs!{vMy(uP_J|`;wr4KqiYX=gx8XABPeE}bscL$zoJ){#3Ch&$btQ#|HOx$hTa~1hM zSF`xCOm6gTnzQfDJ~H%yM4Y^UzY}uBI|-t4IC4XToAqbzkJ{BEgcn}mi4a>3uJUk| zt-Vv6!x20jV+U!A^gH&lkq%^AMyz^&!PS8!S{yh|UGoS%aEQmFC$Q|mv-ui?ws$3-E1C>O(ft~ zq($e7U?HwZwp&++gjekCY3F=idlIDlz)8?a#5WgjShI#ZvCFR+m#VSU-WT4LSV(c5 z>ZGmolYZMnxbPZhz8%;7N;=-6pHah?us@l&?Sj{Rl%K*FjnnEkqwtB_l1Bn+cjr@X zI?v?Di*U>0ubJqc?DjBP5ij(^$8A>dNDud{u$+9qSzx5P-*Lu%1eogu9@DygO7s4- zaR!R8xaRFKF|CAV(}kdO6F|Kt81qB@kei^7`4Lw-6ShwWBlP96mXjFxfthEfmOtax zh1Y8r2G8{$dq6X4M~1`tLUU2RAyjSS2Q+kN^Mx24YJ`L;(K) z{{a7>y{D4^000SaNLh0L04^f{04^f|c%?sf00007bV*G`2jv0+3^fSxobVaO%yAonx^T90!fnWift6c-^Wuh83FL#lMjHP#WA{_)W-v3BI3QLl0Ge+ z-t``ae;A);`aZRV>#d|>B14^K)ZN9XyZr2*1e`^aHvo-{iml68vaZ_M?6E9Mj-pEt z5!U#%wObRC)_O{F`<&n*dm0V_r=U7~B}wAF2Vg&n?M|AyRZ4B-%@`A2%qUW0qYP~r zQeUnXXP0=^>kWktm+HKKY1X;KdHKo>UAllW#O6Q3;n^d{FY@aE0000 Date: Wed, 14 Dec 2022 14:39:15 +0000 Subject: [PATCH 36/39] Add blackstone top texture --- .../textures/mcl_blackstone_top.png | Bin 0 -> 1656 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 mods/ITEMS/mcl_blackstone/textures/mcl_blackstone_top.png diff --git a/mods/ITEMS/mcl_blackstone/textures/mcl_blackstone_top.png b/mods/ITEMS/mcl_blackstone/textures/mcl_blackstone_top.png new file mode 100644 index 0000000000000000000000000000000000000000..a811c69404f315f347c27aeb9e3466322dc1ce34 GIT binary patch literal 1656 zcmV-;28a2HP) zaB^>EX>4U6ba`-PAZ2)IW&i+q+O1bxw&N%a{MRaG2?!w&%fVpInH}`depmxmyGUyq zuYRBNllJquAh_ATz4t@N6GtWxF5v#5X1TTJJefdbM?cPYh;v75ENeopWgj%Gjd zrJt4=dsXeQ{5DW&nYeLRYmr*_5nXa#nes4$Izs6!owzBL)R%cJLBFi+&`Z=J8e&$( zimJJ3$$$~9vR%<(!Gsm}UT4heqO-dVT3ee{gVrY$Y_yr01g;gVHc+GjB&ttV)kwST z@&&uy*zIK$wOmkVT2wI96}JMPI{!~uK()55i)dtVrGDAAr`3(7Tzl#)6$I<#lsmt@ zz{|cdFT#>4$em`<0F&7U#Kw5;E$TXx&ST@ijH7{}OaP@wZL>OqqzV|1#OTokYXhS4 zD5_6V&n-E-sRGDs3qn!A9IQS5Pgcy>LIAQS;L?lXzHj<_=jy?v65@SqBjV6Uo zx;p8Mls3E3<~H8^7B<=9ma=Z2>@sJcLzWzKDz;G3<6nFUP^83?cHDIT9S{V@*r7sp`9Gcv0@VYB*JEin%^7oT_Pe2nPhVbiz$DRm?h6#Y0m- zH?(b<8A0c4Q?6-dqSZseR#ii8;uLI(se*1t%N3V)r*dC)19pF;n|)Fansk3dIcU;N z@$NJaq zs!{vMy(uP_J|`;wr4KqiYX=gx8XABPeE}bscL$zoJ){#3Ch&$btQ#|HOx$hTa~1hM zSF`xCOm6gTnzQfDJ~H%yM4Y^UzY}uBI|-t4IC4XToAqbzkJ{BEgcn}mi4a>3uJUk| zt-Vv6!x20jV+U!A^gH&lkq%^AMyz^&!PS8!S{yh|UGoS%aEQmFC$Q|mv-ui?ws$3-E1C>O(ft~ zq($e7U?HwZwp&++gjekCY3F=idlIDlz)8?a#5WgjShI#ZvCFR+m#VSU-WT4LSV(c5 z>ZGmolYZMnxbPZhz8%;7N;=-6pHah?us@l&?Sj{Rl%K*FjnnEkqwtB_l1Bn+cjr@X zI?v?Di*U>0ubJqc?DjBP5ij(^$8A>dNDud{u$+9qSzx5P-*Lu%1eogu9@DygO7s4- zaR!R8xaRFKF|CAV(}kdO6F|Kt81qB@kei^7`4Lw-6ShwWBlP96mXjFxfthEfmOtax zh1Y8r2G8{$dq6X4M~1`tLUU2RAyjSS2Q+kN^Mx24YJ`L;(K) z{{a7>y{D4^000SaNLh0L04^f{04^f|c%?sf00007bV*G`2jv0+3^fSxobVaO%yAonx^T90!fnWift6c-^Wuh83FL#lMjHP#WA{_)W-v3BI3QLl0Ge+ z-t``ae;A);`aZRV>#d|>B14^K)ZN9XyZr2*1e`^aHvo-{iml68vaZ_M?6E9Mj-pEt z5!U#%wObRC)_O{F`<&n*dm0V_r=U7~B}wAF2Vg&n?M|AyRZ4B-%@`A2%qUW0qYP~r zQeUnXXP0=^>kWktm+HKKY1X;KdHKo>UAllW#O6Q3;n^d{FY@aE0000 Date: Wed, 14 Dec 2022 14:25:43 +0000 Subject: [PATCH 37/39] Allow for animated hyphae textures --- mods/ITEMS/mcl_crimson/init.lua | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/mods/ITEMS/mcl_crimson/init.lua b/mods/ITEMS/mcl_crimson/init.lua index ed23828fe..350a06304 100644 --- a/mods/ITEMS/mcl_crimson/init.lua +++ b/mods/ITEMS/mcl_crimson/init.lua @@ -283,10 +283,10 @@ minetest.register_node("mcl_crimson:warped_hyphae", { tiles = { "warped_hyphae.png", "warped_hyphae.png", - "warped_hyphae_side.png", - "warped_hyphae_side.png", - "warped_hyphae_side.png", - "warped_hyphae_side.png", + { + image="warped_hyphae_side.png", + animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=2.0} + }, }, paramtype2 = "facedir", on_place = mcl_util.rotate_axis, @@ -321,7 +321,12 @@ minetest.register_node("mcl_crimson:warped_nylium", { minetest.register_node("mcl_crimson:warped_hyphae_bark", { description = S("Warped Hyphae Bark"), _doc_items_longdesc = S("This is a decorative block surrounded by the bark of an hyphae."), - tiles = {"warped_hyphae_side.png"}, + tiles = { + { + image="warped_hyphae_side.png", + animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=2.0} + }, + }, paramtype2 = "facedir", on_place = mcl_util.rotate_axis, groups = {handy = 1, axey = 1, bark = 1, building_block = 1, material_wood = 1}, @@ -468,10 +473,10 @@ minetest.register_node("mcl_crimson:crimson_hyphae", { tiles = { "crimson_hyphae.png", "crimson_hyphae.png", - "crimson_hyphae_side.png", - "crimson_hyphae_side.png", - "crimson_hyphae_side.png", - "crimson_hyphae_side.png", + { + image="crimson_hyphae_side.png", + animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=2.0} + }, }, paramtype2 = "facedir", on_place = mcl_util.rotate_axis, @@ -487,7 +492,12 @@ minetest.register_node("mcl_crimson:crimson_hyphae", { minetest.register_node("mcl_crimson:crimson_hyphae_bark", { description = S("Crimson Hyphae Bark"), _doc_items_longdesc = S("This is a decorative block surrounded by the bark of an hyphae."), - tiles = {"crimson_hyphae_side.png"}, + tiles = { + { + image="crimson_hyphae_side.png", + animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=2.0} + }, + }, paramtype2 = "facedir", on_place = mcl_util.rotate_axis, groups = {handy = 1, axey = 1, bark = 1, building_block = 1, material_wood = 1}, From 66a7c5757ee3646d68b2840efdbc5a18a43f0d94 Mon Sep 17 00:00:00 2001 From: Michieal Date: Mon, 19 Dec 2022 13:44:24 -0500 Subject: [PATCH 38/39] Made bamboo buttons flammable, and made them into a fuel source. Converted commented code snippet, addgroups() into global function. Stairs will be a fuel source in part 2. --- mods/ITEMS/mcl_bamboo/init.lua | 46 ++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/init.lua b/mods/ITEMS/mcl_bamboo/init.lua index 99b7c28db..6050cdf9d 100644 --- a/mods/ITEMS/mcl_bamboo/init.lua +++ b/mods/ITEMS/mcl_bamboo/init.lua @@ -26,6 +26,25 @@ local USE_END_CAPS = false local BROKEN_DOORS = true -- LOCAL FUNCTIONS + +-- Add Groups function, courtesy of Warr1024. +function addgroups(name, ...) + local def = minetest.registered_items[name] or error(name .. " not found") + local groups = {} + for k, v in pairs(def.groups) do + groups[k] = v + end + local function addall(x, ...) + if not x then + return + end + groups[x] = 1 + return addall(...) + end + addall(...) + return minetest.override_item(name, {groups = groups}) +end + local function create_nodes() local bamboo_def = { @@ -467,7 +486,7 @@ local function create_nodes() "mcl_bamboo_bamboo_plank.png", "mcl_bamboo:bamboo_plank", node_sound, - {material_wood = 1, handy = 1, pickaxey = 1}, + {material_wood = 1, handy = 1, pickaxey = 1, flammable = 3, fire_flammability = 20, fire_encouragement = 5, }, 1, false, S("A bamboo button is a redstone component made out of stone which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for 1 second."), @@ -727,6 +746,11 @@ local function register_craftings() type = "fuel", recipe = "mcl_stairs:slab_bamboo_stripped", burntime = 7.5, + }) "mesecons_button:button_bamboo_off" + minetest.register_craft({ + type = "fuel", + recipe = "mesecons_button:button_bamboo_off", + burntime = 5, }) end @@ -813,24 +837,4 @@ todo: Added a new "Mosaic" plank variant that is unique to Bamboo called Bamboo todo -- add in fuel recipes for: [-] bamboo slab + stripped bamboo slab [-] bamboo stair + stripped bamboo stair + bamboo plank stair - [-] bamboo button ---]] - ---[[ -Useful code snippit for dealing with updating groups on already defined objects, such as api created items. -I think that this will be implemented, as time goes on, to deal with adding groups to slabs and the like. -local function addgroups(name, ...) - local def = minetest.registered_items[name] or error(name .. " not found") - local groups = {} - for k, v in pairs(def.groups) do - groups[k] = v - end - local function addall(x, ...) - if not x then return end - groups[x] = 1 - return addall(...) - end - addall(...) - return minetest.override_item(name, {groups = groups}) -end --]] From 1a56a32fa81863709d3f3b7791e70b0225f6b0b2 Mon Sep 17 00:00:00 2001 From: Michieal Date: Mon, 19 Dec 2022 16:16:54 -0500 Subject: [PATCH 39/39] misc. error fix --- mods/ITEMS/mcl_bamboo/init.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_bamboo/init.lua b/mods/ITEMS/mcl_bamboo/init.lua index 6050cdf9d..3c7cb58a7 100644 --- a/mods/ITEMS/mcl_bamboo/init.lua +++ b/mods/ITEMS/mcl_bamboo/init.lua @@ -746,7 +746,8 @@ local function register_craftings() type = "fuel", recipe = "mcl_stairs:slab_bamboo_stripped", burntime = 7.5, - }) "mesecons_button:button_bamboo_off" + }) + minetest.register_craft({ type = "fuel", recipe = "mesecons_button:button_bamboo_off",