From 773c760727847134c5e09a7402cf0300bdb894ee Mon Sep 17 00:00:00 2001 From: Michieal Date: Wed, 14 Dec 2022 23:02:08 -0500 Subject: [PATCH 001/105] Added Bamboo Mosaic. Added Tiki Lamp (extras) - Requires mcl_lanterns to be fixed to allow API to be called from other mods. Moved Side Scaffolding to bambootoo.lua --- mods/ITEMS/mcl_bamboo/bambootoo.lua | 122 ++++++++++++++++++ mods/ITEMS/mcl_bamboo/extras.lua | 40 ++++++ mods/ITEMS/mcl_bamboo/init.lua | 55 ++------ mods/ITEMS/mcl_bamboo/mod.conf | 2 +- .../extras/mcl_bamboo_extras_tikilamp.png | Bin 0 -> 231 bytes .../extras/mcl_bamboo_extras_tikilamp_inv.png | Bin 0 -> 175 bytes .../mcl_bamboo_bamboo_plank_mosaic.png | Bin 0 -> 520 bytes 7 files changed, 171 insertions(+), 48 deletions(-) create mode 100644 mods/ITEMS/mcl_bamboo/bambootoo.lua create mode 100644 mods/ITEMS/mcl_bamboo/extras.lua create mode 100644 mods/ITEMS/mcl_bamboo/textures/extras/mcl_bamboo_extras_tikilamp.png create mode 100644 mods/ITEMS/mcl_bamboo/textures/extras/mcl_bamboo_extras_tikilamp_inv.png create mode 100644 mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_bamboo_plank_mosaic.png diff --git a/mods/ITEMS/mcl_bamboo/bambootoo.lua b/mods/ITEMS/mcl_bamboo/bambootoo.lua new file mode 100644 index 000000000..11b47b83c --- /dev/null +++ b/mods/ITEMS/mcl_bamboo/bambootoo.lua @@ -0,0 +1,122 @@ +--- +--- Generated by EmmyLua(https://github.com/EmmyLua) +--- Created by michieal. +--- DateTime: 12/14/22 10:11 PM +--- + +-- LOCALS +local modname = minetest.get_current_modname() +local S = minetest.get_translator(modname) +local bamboo = "mcl_bamboo:bamboo" +local adj_nodes = { + vector.new(0, 0, 1), + vector.new(0, 0, -1), + vector.new(1, 0, 0), + vector.new(-1, 0, 0), +} +local SIDE_SCAFFOLDING = false + + +local function bambootoo_create_nodes() + local bamboo_mosaic = minetest.registered_nodes[bamboo .. "_plank"] + bamboo_mosaic.tiles = {"mcl_bamboo_bamboo_plank.png"} + bamboo_mosaic.groups = {handy = 1, axey = 1, flammable = 3, fire_encouragement = 5, fire_flammability = 20} + bamboo_mosaic.description = S("Bamboo Mosaic Plank") + bamboo_mosaic._doc_items_longdesc = S("Bamboo Mosaic Plank") + minetest.register_node("mcl_bamboo:bamboo_mosaic",bamboo_mosaic) + -- crafted by "mcl_stair:slab_bamboo_plank", "mcl_stair:slab_bamboo_block", "mcl_stair:slab_bamboo_stripped" + if minetest.get_modpath("mcl_stairs") then + if mcl_stairs ~= nil then + mcl_stairs.register_stair_and_slab_simple( + "bamboo_mosaic", + "mcl_bamboo:bamboo_mosaic", + S("Bamboo Stair"), + S("Bamboo Slab"), + S("Double Bamboo Slab") + ) + end + end + + if SIDE_SCAFFOLDING then + --currently, disabled. + minetest.register_node("mcl_bamboo:scaffolding_horizontal", { + description = S("Scaffolding (horizontal)"), + doc_items_longdesc = S("Scaffolding block used to climb up or out across areas."), + doc_items_hidden = false, + tiles = {"mcl_bamboo_scaffolding_top.png", "mcl_bamboo_scaffolding_top.png", "mcl_bamboo_scaffolding_bottom.png"}, + drawtype = "nodebox", + paramtype = "light", + use_texture_alpha = "clip", + node_box = { + type = "fixed", + fixed = { + {-0.5, 0.375, -0.5, 0.5, 0.5, 0.5}, + {-0.5, -0.5, -0.5, -0.375, 0.5, -0.375}, + {0.375, -0.5, -0.5, 0.5, 0.5, -0.375}, + {0.375, -0.5, 0.375, 0.5, 0.5, 0.5}, + {-0.5, -0.5, 0.375, -0.375, 0.5, 0.5}, + {-0.5, -0.5, -0.5, 0.5, -0.375, 0.5}, + } + }, + selection_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, + }, + }, + groups = {handy = 1, axey = 1, flammable = 3, building_block = 1, material_wood = 1, fire_encouragement = 5, fire_flammability = 20, not_in_creative_inventory = 1, falling_node = 1}, + _mcl_after_falling = function(pos) + if minetest.get_node(pos).name == "mcl_bamboo:scaffolding_horizontal" then + if minetest.get_node(vector.offset(pos, 0, 0, 0)).name ~= "mcl_bamboo:scaffolding" then + minetest.remove_node(pos) + minetest.add_item(pos, "mcl_bamboo:scaffolding") + else + minetest.set_node(vector.offset(pos, 0, 1, 0), {name = "mcl_bamboo:scaffolding"}) + end + end + end + }) + end + + +end + +local function bambootoo_register_craftings() + + minetest.register_craft({ + output = bamboo .. "_mosaic", + recipe = { + {"mcl_stair:slab_bamboo_plank"}, + {"mcl_stair:slab_bamboo_plank"}, + } + }) + + minetest.register_craft({ + output = bamboo .. "_mosaic", + recipe = { + {"mcl_stair:slab_bamboo_block"}, + {"mcl_stair:slab_bamboo_block"}, + } + }) + + minetest.register_craft({ + output = bamboo .. "_mosaic", + recipe = { + {"mcl_stair:slab_bamboo_stripped"}, + {"mcl_stair:slab_bamboo_stripped"}, + } + }) + + -- Fuels... + + minetest.register_craft({ + type = "fuel", + recipe = bamboo .. "_mosaic", + burntime = 7.5, + }) + +end + + +bambootoo_create_nodes() +bambootoo_register_craftings() \ No newline at end of file diff --git a/mods/ITEMS/mcl_bamboo/extras.lua b/mods/ITEMS/mcl_bamboo/extras.lua new file mode 100644 index 000000000..199760bc2 --- /dev/null +++ b/mods/ITEMS/mcl_bamboo/extras.lua @@ -0,0 +1,40 @@ +--- +--- Generated by EmmyLua(https://github.com/EmmyLua) +--- Created by michieal. +--- DateTime: 12/14/22 10:14 PM +--- + + +local modname = minetest.get_current_modname() +local S = minetest.get_translator(modname) +local bamboo = "mcl_bamboo:bamboo" + +local function tiki_lamp() + if minetest.get_modpath("mcl_lanterns") then + if mcl_lanterns ~= nil then + mcl_lanterns.register_lantern("tikilamp", { + description = S("Tiki Lamp"), + longdesc = S("Tiki Lamps are light sources which can be placed on the top or the bottom of most blocks."), + texture = "mcl_bamboo_extras_tikilamp.png", + texture_inv = "mcl_bamboo_extras_tikilamp_inv.png", + light_level = 14, + }) + + minetest.register_craft({ + output = "mcl_lanterns:tikilamp_floor", + recipe = { + {bamboo, bamboo,bamboo}, + {bamboo, "mcl_torches:torch", bamboo}, + {bamboo, bamboo,bamboo}, + }, + }) + end + end +end + + + + + +-- ------------------------------------ +tiki_lamp() \ No newline at end of file diff --git a/mods/ITEMS/mcl_bamboo/init.lua b/mods/ITEMS/mcl_bamboo/init.lua index fcadd8bba..2728c1a0e 100644 --- a/mods/ITEMS/mcl_bamboo/init.lua +++ b/mods/ITEMS/mcl_bamboo/init.lua @@ -8,12 +8,6 @@ local modname = minetest.get_current_modname() local S = minetest.get_translator(modname) local bamboo = "mcl_bamboo:bamboo" -local adj_nodes = { - vector.new(0, 0, 1), - vector.new(0, 0, -1), - vector.new(1, 0, 0), - vector.new(-1, 0, 0), -} local node_sound = mcl_sounds.node_sound_wood_defaults() -- CONSTS @@ -558,46 +552,6 @@ local function create_nodes() }) - if SIDE_SCAFFOLDING then - --currently, disabled. - minetest.register_node("mcl_bamboo:scaffolding_horizontal", { - description = S("Scaffolding (horizontal)"), - doc_items_longdesc = S("Scaffolding block used to climb up or out across areas."), - doc_items_hidden = false, - tiles = {"mcl_bamboo_scaffolding_top.png", "mcl_bamboo_scaffolding_top.png", "mcl_bamboo_scaffolding_bottom.png"}, - drawtype = "nodebox", - paramtype = "light", - use_texture_alpha = "clip", - node_box = { - type = "fixed", - fixed = { - {-0.5, 0.375, -0.5, 0.5, 0.5, 0.5}, - {-0.5, -0.5, -0.5, -0.375, 0.5, -0.375}, - {0.375, -0.5, -0.5, 0.5, 0.5, -0.375}, - {0.375, -0.5, 0.375, 0.5, 0.5, 0.5}, - {-0.5, -0.5, 0.375, -0.375, 0.5, 0.5}, - {-0.5, -0.5, -0.5, 0.5, -0.375, 0.5}, - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, - }, - }, - groups = {handy = 1, axey = 1, flammable = 3, building_block = 1, material_wood = 1, fire_encouragement = 5, fire_flammability = 20, not_in_creative_inventory = 1, falling_node = 1}, - _mcl_after_falling = function(pos) - if minetest.get_node(pos).name == "mcl_bamboo:scaffolding_horizontal" then - if minetest.get_node(vector.offset(pos, 0, 0, 0)).name ~= "mcl_bamboo:scaffolding" then - minetest.remove_node(pos) - minetest.add_item(pos, "mcl_bamboo:scaffolding") - else - minetest.set_node(vector.offset(pos, 0, 1, 0), {name = "mcl_bamboo:scaffolding"}) - end - end - end - }) - end end local function register_craftings() @@ -701,6 +655,12 @@ register_craftings() -- MAPGEN dofile(minetest.get_modpath(modname) .. "/mapgen.lua") +-- BAMBOO_TOO (Bamboo two) +dofile(minetest.get_modpath(modname) .. "/bambootoo.lua") + +-- BAMBOO EXTRAS +dofile(minetest.get_modpath(modname) .. "/extras.lua") + --ABMs minetest.register_abm({ nodenames = {"mcl_bamboo:bamboo"}, @@ -753,6 +713,7 @@ minetest.register_alias("bamboo_block", "mcl_bamboo:bamboo_block") minetest.register_alias("bamboo_strippedblock", "mcl_bamboo:bamboo_block_stripped") minetest.register_alias("bamboo", "mcl_bamboo:bamboo") minetest.register_alias("bamboo_plank", "mcl_bamboo:bamboo_plank") +minetest.register_alias("bamboo_mosaic", "mcl_bamboo:bamboo_mosaic") minetest.register_alias("mcl_stairs:stair_bamboo", "mcl_stairs:stair_bamboo_block") minetest.register_alias("bamboo:bamboo", "mcl_bamboo:bamboo") @@ -760,7 +721,7 @@ minetest.register_alias("bamboo:bamboo", "mcl_bamboo:bamboo") --[[ todo -- make scaffolds do side scaffold blocks, so that they jut out. todo -- Also, make those blocks collapse (break) when a nearby connected scaffold breaks. -todo -- add in alternative bamboo styles to simulate random placement. (see commented out nde box definitions. +todo -- add in alternative bamboo styles to simulate random placement. (see commented out node box definitions. todo -- make endcap node for bamboo, so that they can be 12-16 nodes high and stop growing. todo -- mash all of that together so that it drops as one item, and chooses what version to be, in on_place. todo -- Raft diff --git a/mods/ITEMS/mcl_bamboo/mod.conf b/mods/ITEMS/mcl_bamboo/mod.conf index d4b93a7d9..57f97a5a4 100644 --- a/mods/ITEMS/mcl_bamboo/mod.conf +++ b/mods/ITEMS/mcl_bamboo/mod.conf @@ -1,4 +1,4 @@ name = mcl_bamboo depends = mcl_core, mcl_sounds, mcl_tools -optional_depends = mcl_flowerpots, mclx_stairs, mcl_doors, mcl_signs, mesecons_pressureplates, mcl_fences, mesecons_button +optional_depends = mcl_flowerpots, mclx_stairs, mcl_doors, mcl_signs, mesecons_pressureplates, mcl_fences, mesecons_button, mcl_lanterns author = Michieal \ No newline at end of file diff --git a/mods/ITEMS/mcl_bamboo/textures/extras/mcl_bamboo_extras_tikilamp.png b/mods/ITEMS/mcl_bamboo/textures/extras/mcl_bamboo_extras_tikilamp.png new file mode 100644 index 0000000000000000000000000000000000000000..1595b587cef723b0c32a369113be94ec3a7a611d GIT binary patch literal 231 zcmVT%~}0000dP)t-s00000 z0078KGUabM@`gJ9rA+^^O#jk)|LUM4BO@#Eal|aXmS~fh{v& zRxhvGBnII|!%fo;UU3rLyf%t;Vsda;lfjO#rMe9UF~JLXwkL2jpFLv97%DEs!0`7p UPoh$z?^=+>p00i_>zopr0KfD&P5=M^ literal 0 HcmV?d00001 diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_bamboo_plank_mosaic.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_bamboo_plank_mosaic.png new file mode 100644 index 0000000000000000000000000000000000000000..97c5cb58f331742c650200888f9fc7d2efd1c655 GIT binary patch literal 520 zcmV+j0{8uiP)Q=HChU7pawg(aU3g>?xsJ^QSvWcIF7lUU52@_ zZ{N{l&s3!cXV8rq-^^~O-tXlv79XLo832dln$XlU%IcZYJi>!DnD;1cAvsbUaoPh= z1i%|Zdgx$WQQ#TPlU%!eu9-+OeK+Vao2g29IEsPs*HKLqyKY9RZ;fk-Gq((;v>` zC85X)oW19P)tIeOdZo$lP|Dxdjo<*1U64k-&ZRxh9WWP>U4d2b;)D#6%LfRlKVmMg zT5h&1uD%fM8C0;^{GDdzO}^LL4#*xAKp=QdLXbgJf$V<5pV~QMMc|H`77{;kc7}5u zQbDjNWLe(4fe;!L?@su~yD@PCdyF2VXLW#Ke43i819;9b-D19CRKi&c@fr>15I+zK z*J2j4d4k|JB<&`=+}=+ftPc4Nwr@O8huPsxbZeY{2~x+Roq;P+5;vDU=1Pn$acnVP z5{!{Jw$p&I$6Uw%RuCTZcIYiDd!9Y);8mT$`!oWX}EYv;aFa|9E0000< KMNUMnLSTXzE$L_g literal 0 HcmV?d00001 From 16d94a88dbaf94fe3b3ad26c123e9c545f5969b6 Mon Sep 17 00:00:00 2001 From: Michieal Date: Wed, 21 Dec 2022 12:32:09 -0500 Subject: [PATCH 002/105] moved extras to the proper location --- mods/ITEMS/mcl_bamboo/extras.lua | 40 ------------------ .../extras/mcl_bamboo_extras_tikilamp.png | Bin 231 -> 0 bytes .../extras/mcl_bamboo_extras_tikilamp_inv.png | Bin 175 -> 0 bytes 3 files changed, 40 deletions(-) delete mode 100644 mods/ITEMS/mcl_bamboo/extras.lua delete mode 100644 mods/ITEMS/mcl_bamboo/textures/extras/mcl_bamboo_extras_tikilamp.png delete mode 100644 mods/ITEMS/mcl_bamboo/textures/extras/mcl_bamboo_extras_tikilamp_inv.png diff --git a/mods/ITEMS/mcl_bamboo/extras.lua b/mods/ITEMS/mcl_bamboo/extras.lua deleted file mode 100644 index 199760bc2..000000000 --- a/mods/ITEMS/mcl_bamboo/extras.lua +++ /dev/null @@ -1,40 +0,0 @@ ---- ---- Generated by EmmyLua(https://github.com/EmmyLua) ---- Created by michieal. ---- DateTime: 12/14/22 10:14 PM ---- - - -local modname = minetest.get_current_modname() -local S = minetest.get_translator(modname) -local bamboo = "mcl_bamboo:bamboo" - -local function tiki_lamp() - if minetest.get_modpath("mcl_lanterns") then - if mcl_lanterns ~= nil then - mcl_lanterns.register_lantern("tikilamp", { - description = S("Tiki Lamp"), - longdesc = S("Tiki Lamps are light sources which can be placed on the top or the bottom of most blocks."), - texture = "mcl_bamboo_extras_tikilamp.png", - texture_inv = "mcl_bamboo_extras_tikilamp_inv.png", - light_level = 14, - }) - - minetest.register_craft({ - output = "mcl_lanterns:tikilamp_floor", - recipe = { - {bamboo, bamboo,bamboo}, - {bamboo, "mcl_torches:torch", bamboo}, - {bamboo, bamboo,bamboo}, - }, - }) - end - end -end - - - - - --- ------------------------------------ -tiki_lamp() \ No newline at end of file diff --git a/mods/ITEMS/mcl_bamboo/textures/extras/mcl_bamboo_extras_tikilamp.png b/mods/ITEMS/mcl_bamboo/textures/extras/mcl_bamboo_extras_tikilamp.png deleted file mode 100644 index 1595b587cef723b0c32a369113be94ec3a7a611d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 231 zcmVT%~}0000dP)t-s00000 z0078KGUabM@`gJ9rA+^^O#jk)|LUM4BO@#Eal|aXmS~fh{v& zRxhvGBnII|!%fo;UU3rLyf%t;Vsda;lfjO#rMe9UF~JLXwkL2jpFLv97%DEs!0`7p UPoh$z?^=+>p00i_>zopr0KfD&P5=M^ From 95d3f9be07f43c4e6b1f00aff122d11598db1ad0 Mon Sep 17 00:00:00 2001 From: Michieal Date: Wed, 21 Dec 2022 12:34:47 -0500 Subject: [PATCH 003/105] Make Lantern API callable from outside of mcl_lanterns --- mods/ITEMS/mcl_lanterns/init.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mods/ITEMS/mcl_lanterns/init.lua b/mods/ITEMS/mcl_lanterns/init.lua index 65faa5e8c..b22edf9f0 100644 --- a/mods/ITEMS/mcl_lanterns/init.lua +++ b/mods/ITEMS/mcl_lanterns/init.lua @@ -90,7 +90,7 @@ function mcl_lanterns.register_lantern(name, def) local sounds = mcl_sounds.node_sound_metal_defaults() - minetest.register_node(itemstring_floor, { + minetest.register_node(":"..itemstring_floor, { description = def.description, _doc_items_longdesc = def.longdesc, drawtype = "mesh", @@ -166,7 +166,7 @@ function mcl_lanterns.register_lantern(name, def) _mcl_blast_resistance = 3.5, }) - minetest.register_node(itemstring_ceiling, { + minetest.register_node(":"..itemstring_ceiling, { description = def.description, _doc_items_create_entry = false, drawtype = "mesh", @@ -281,4 +281,4 @@ minetest.register_craft({ }, }) -dofile(modpath.."/register.lua") \ No newline at end of file +dofile(modpath.."/register.lua") From 742a625c429d9dd37f229e7fafa0ed9cbf220f0d Mon Sep 17 00:00:00 2001 From: Michieal Date: Wed, 21 Dec 2022 15:55:50 -0500 Subject: [PATCH 004/105] Added in aliasing for scaffolding, to prevent breakage for players using the "mcl_scaffolding" mod. --- mods/ITEMS/mcl_bamboo/init.lua | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/init.lua b/mods/ITEMS/mcl_bamboo/init.lua index 8e504ef3a..3a69eddf2 100644 --- a/mods/ITEMS/mcl_bamboo/init.lua +++ b/mods/ITEMS/mcl_bamboo/init.lua @@ -1,5 +1,5 @@ --- [bamboo] mod by Krock, modified by SmallJoker, Made for MineClone 2 by Michieal (as mcl_bamboo). --- Parts of mcl_scaffolding were used. Mcl_scaffolding originally created by Cora; modified for mcl_bamboo by Michieal. +-- [bamboo] mod by SmallJoker, Made for MineClone 2 by Michieal (as mcl_bamboo). +-- Parts of mcl_scaffolding were used. Mcl_scaffolding originally created by Cora; heavily reworked for mcl_bamboo by Michieal. -- Creation date: 12-01-2022 (Dec 1st, 2022) -- License for everything: GPL3 -- Bamboo max height: 12-16 @@ -22,6 +22,20 @@ local MAKE_STAIRS = true local DEBUG = false local USE_END_CAPS = false +--Bamboo can be planted on moss blocks, grass blocks, dirt, coarse dirt, rooted dirt, gravel, mycelium, podzol, sand, red sand, or mud +local bamboo_dirt_nodes = { + "mcl_core:redsand", + "mcl_core:sand", + "mcl_core:dirt", +"mcl_core:coarse_dirt", +"mcl_core:dirt_with_grass", +"mcl_core:podzol", +"mcl_core:mycelium", +"mcl_lush_caves:rooted_dirt", +"mcl_lush_caves:moss", +"mcl_mud:mud", +} + -- Due to door fix #2736, doors are displayed backwards. When this is fixed, set this variable to false. local BROKEN_DOORS = true @@ -188,7 +202,7 @@ local function create_nodes() return minetest.item_place(itemstack, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under))) end, - minetest.register_node("mcl_bamboo:bamboo_top", bamboo_top) + minetest.register_node("mcl_bamboo:bamboo_endcap", bamboo_top) local bamboo_block_def = { description = "Bamboo Block", @@ -586,7 +600,6 @@ local function create_nodes() minetest.add_item(new_pos, istack) end end, - }) end @@ -786,6 +799,8 @@ minetest.register_alias("bamboo_mosaic", "mcl_bamboo:bamboo_mosaic") minetest.register_alias("mcl_stairs:stair_bamboo", "mcl_stairs:stair_bamboo_block") minetest.register_alias("bamboo:bamboo", "mcl_bamboo:bamboo") +minetest.register_alias("mcl_scaffolding:scaffolding", "mcl_bamboo:scaffolding") +minetest.register_alias("mcl_scaffolding:scaffolding_horizontal", "mcl_bamboo:scaffolding") --[[ todo -- make scaffolds do side scaffold blocks, so that they jut out. @@ -805,4 +820,6 @@ 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 + +todo -- fix scaffolding placing, instead of using on_rightclick first. --]] From e0d48400a73868a5ae70cfa6fa474f210767c42f Mon Sep 17 00:00:00 2001 From: Michieal Date: Wed, 21 Dec 2022 16:16:53 -0500 Subject: [PATCH 005/105] Fix the removal of bamboo extras. --- mods/ITEMS/mcl_bamboo/init.lua | 3 --- 1 file changed, 3 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/init.lua b/mods/ITEMS/mcl_bamboo/init.lua index 3a69eddf2..a5aa36d1a 100644 --- a/mods/ITEMS/mcl_bamboo/init.lua +++ b/mods/ITEMS/mcl_bamboo/init.lua @@ -738,9 +738,6 @@ dofile(minetest.get_modpath(modname) .. "/mapgen.lua") -- BAMBOO_TOO (Bamboo two) dofile(minetest.get_modpath(modname) .. "/bambootoo.lua") --- BAMBOO EXTRAS -dofile(minetest.get_modpath(modname) .. "/extras.lua") - local BAMBOO_MAX_HEIGHT_CHECK = -16 --ABMs From 9445b02dcc5cb46f9d5c9cf0bf57313f6a6d0cf1 Mon Sep 17 00:00:00 2001 From: Michieal Date: Wed, 21 Dec 2022 20:57:34 -0500 Subject: [PATCH 006/105] MapGen update. Adjusted decorations. --- mods/MAPGEN/mcl_biomes/init.lua | 1592 ++++++++++++++++++------------- 1 file changed, 936 insertions(+), 656 deletions(-) diff --git a/mods/MAPGEN/mcl_biomes/init.lua b/mods/MAPGEN/mcl_biomes/init.lua index e39371651..d286fc5ec 100644 --- a/mods/MAPGEN/mcl_biomes/init.lua +++ b/mods/MAPGEN/mcl_biomes/init.lua @@ -126,6 +126,10 @@ local function register_biomes() "MesaPlateauF", "MesaPlateauFM", "MangroveSwamp", + "BambooJungle", + "BambooJungleM", + "BambooJungleEdge", + "BambooJungleEdgeM", } -- Ice Plains Spikes (rare) @@ -951,8 +955,6 @@ local function register_biomes() _mcl_palette_index = 20, }) - - -- Mesa Plateau F -- Identical to Mesa below Y=30. At Y=30 and above there is a "dry" oak forest minetest.register_biome({ @@ -1489,8 +1491,175 @@ local function register_biomes() _mcl_palette_index = 29, }) + -- Bamboo Jungle areas are like the Jungle areas, but warmer and more humid. + -- Bamboo Jungle + minetest.register_biome({ + name = "BambooJungle", + node_top = "mcl_core:dirt_with_grass", + depth_top = 1, + node_filler = "mcl_core:dirt", + depth_filler = 3, + node_riverbed = "mcl_core:sand", + depth_riverbed = 2, + y_min = 1, + y_max = mcl_vars.mg_overworld_max, + humidity_point = 90, + heat_point = 95, + _mcl_biome_type = "medium", + _mcl_palette_index = 24, + }) + minetest.register_biome({ + name = "BambooJungle_shore", + node_top = "mcl_core:dirt", + depth_top = 1, + node_filler = "mcl_core:dirt", + depth_filler = 3, + node_riverbed = "mcl_core:sand", + depth_riverbed = 2, + y_min = -2, + y_max = 0, + humidity_point = 90, + heat_point = 95, + _mcl_biome_type = "medium", + _mcl_palette_index = 24, + }) + minetest.register_biome({ + name = "BambooJungle_ocean", + node_top = "mcl_core:sand", + depth_top = 1, + node_filler = "mcl_core:sand", + depth_filler = 3, + node_riverbed = "mcl_core:sand", + depth_riverbed = 2, + y_min = OCEAN_MIN, + y_max = -3, + vertical_blend = 1, + humidity_point = 95, + heat_point = 90, + _mcl_biome_type = "medium", + _mcl_palette_index = 24, + }) + + -- Bamboo Jungle M + -- Like Bamboo Jungle but with even more dense vegetation + minetest.register_biome({ + name = "BambooJungleM", + node_top = "mcl_core:dirt_with_grass", + depth_top = 1, + node_filler = "mcl_core:dirt", + depth_filler = 3, + node_riverbed = "mcl_core:sand", + depth_riverbed = 2, + y_min = 1, + y_max = mcl_vars.mg_overworld_max, + humidity_point = 95, + heat_point = 95, + _mcl_biome_type = "medium", + _mcl_palette_index = 25, + }) + minetest.register_biome({ + name = "BambooJungleM_shore", + node_top = "mcl_core:dirt", + depth_top = 1, + node_filler = "mcl_core:dirt", + depth_filler = 3, + node_riverbed = "mcl_core:sand", + depth_riverbed = 2, + y_min = -2, + y_max = 0, + humidity_point = 95, + heat_point = 90, + _mcl_biome_type = "medium", + _mcl_palette_index = 25, + }) + minetest.register_biome({ + name = "BambooJungleM_ocean", + node_top = "mcl_core:sand", + depth_top = 1, + node_filler = "mcl_core:sand", + depth_filler = 3, + node_riverbed = "mcl_core:sand", + depth_riverbed = 2, + y_min = OCEAN_MIN, + y_max = -3, + vertical_blend = 1, + humidity_point = 95, + heat_point = 95, + _mcl_biome_type = "medium", + _mcl_palette_index = 25, + }) + + -- Bamboo Jungle Edge + minetest.register_biome({ + name = "BambooJungleEdge", + node_top = "mcl_core:dirt_with_grass", + depth_top = 1, + node_filler = "mcl_core:dirt", + depth_filler = 2, + node_riverbed = "mcl_core:sand", + depth_riverbed = 2, + y_min = 1, + y_max = mcl_vars.mg_overworld_max, + humidity_point = 92, + heat_point = 90, + _mcl_biome_type = "medium", + _mcl_palette_index = 26, + }) + minetest.register_biome({ + name = "BambooJungleEdge_ocean", + node_top = "mcl_core:sand", + depth_top = 1, + node_filler = "mcl_core:sand", + depth_filler = 2, + node_riverbed = "mcl_core:sand", + depth_riverbed = 2, + y_min = OCEAN_MIN, + y_max = 0, + humidity_point = 95, + heat_point = 88, + _mcl_biome_type = "medium", + _mcl_palette_index = 26, + }) + + -- Jungle Edge M (very rare). + -- Almost identical to Jungle Edge. Has deeper dirt. Melons spawn here a lot. + -- This biome occours directly between Jungle M and Jungle Edge but also has a small border to Jungle. + -- This biome is very small in general. + minetest.register_biome({ + name = "BambooJungleEdgeM", + node_top = "mcl_core:dirt_with_grass", + depth_top = 1, + node_filler = "mcl_core:dirt", + depth_filler = 4, + node_riverbed = "mcl_core:sand", + depth_riverbed = 2, + y_min = 1, + y_max = mcl_vars.mg_overworld_max, + humidity_point = 95, + heat_point = 95, + _mcl_biome_type = "medium", + _mcl_palette_index = 27, + }) + minetest.register_biome({ + name = "BambooJungleEdgeM_ocean", + node_top = "mcl_core:sand", + depth_top = 1, + node_filler = "mcl_core:sand", + depth_filler = 4, + node_riverbed = "mcl_core:sand", + depth_riverbed = 2, + y_min = OCEAN_MIN, + y_max = 0, + humidity_point = 97, + heat_point = 90, + _mcl_biome_type = "medium", + _mcl_palette_index = 27, + }) + + + -- Add deep ocean and underground biomes automatically. - for i=1, #overworld_biomes do + for i = 1, #overworld_biomes do local biome = overworld_biomes[i] -- Deep Ocean @@ -1500,11 +1669,11 @@ local function register_biomes() humidity_point = minetest.registered_biomes[biome].humidity_point, y_min = DEEP_OCEAN_MIN, y_max = DEEP_OCEAN_MAX, - node_top = minetest.registered_biomes[biome.."_ocean"].node_top, + node_top = minetest.registered_biomes[biome .. "_ocean"].node_top, depth_top = 2, - node_filler = minetest.registered_biomes[biome.."_ocean"].node_filler, + node_filler = minetest.registered_biomes[biome .. "_ocean"].node_filler, depth_filler = 3, - node_riverbed = minetest.registered_biomes[biome.."_ocean"].node_riverbed, + node_riverbed = minetest.registered_biomes[biome .. "_ocean"].node_riverbed, depth_riverbed = 2, vertical_blend = 5, _mcl_biome_type = minetest.registered_biomes[biome]._mcl_biome_type, @@ -1559,7 +1728,6 @@ local function register_dimension_biomes() param2 = 0, }) - minetest.register_biome({ name = "Nether", node_filler = "mcl_nether:netherrack", @@ -1579,10 +1747,10 @@ local function register_dimension_biomes() minetest.register_decoration({ deco_type = "simple", - place_on = {"mcl_nether:netherrack","mcl_nether:glowstone","mcl_blackstone:nether_gold","mcl_nether:quartz_ore","mcl_core:gravel","mcl_nether:soul_sand","mcl_nether:glowstone","mcl_nether:magma"}, + place_on = {"mcl_nether:netherrack", "mcl_nether:glowstone", "mcl_blackstone:nether_gold", "mcl_nether:quartz_ore", "mcl_core:gravel", "mcl_nether:soul_sand", "mcl_nether:glowstone", "mcl_nether:magma"}, sidelen = 16, fill_ratio = 10, - biomes = { "Nether" }, + biomes = {"Nether"}, y_min = mcl_vars.mg_lava_nether_max, y_max = mcl_vars.mg_nether_deco_max, decoration = "mcl_nether:netherrack", @@ -1607,10 +1775,10 @@ local function register_dimension_biomes() }) minetest.register_decoration({ deco_type = "simple", - place_on = {"mcl_nether:netherrack","mcl_nether:glowstone","mcl_nether:magma"}, + place_on = {"mcl_nether:netherrack", "mcl_nether:glowstone", "mcl_nether:magma"}, sidelen = 16, fill_ratio = 10, - biomes = { "SoulsandValley" }, + biomes = {"SoulsandValley"}, y_min = mcl_vars.mg_lava_nether_max, y_max = mcl_vars.mg_nether_deco_max, decoration = "mcl_blackstone:soul_soil", @@ -1619,20 +1787,20 @@ local function register_dimension_biomes() }) minetest.register_ore({ - ore_type = "blob", - ore = "mcl_nether:soul_sand", - wherein = { "mcl_nether:netherrack", "mcl_blackstone:soul_soil" }, + ore_type = "blob", + ore = "mcl_nether:soul_sand", + wherein = {"mcl_nether:netherrack", "mcl_blackstone:soul_soil"}, clust_scarcity = 100, clust_num_ores = 225, - clust_size = 15, - biomes = { "SoulsandValley" }, + clust_size = 15, + biomes = {"SoulsandValley"}, y_min = mcl_vars.mg_lava_nether_max, y_max = mcl_vars.mg_nether_deco_max, noise_params = { - offset = 0, - scale = 1, - spread = { x = 250, y = 250, z = 250 }, - seed = 12345, + offset = 0, + scale = 1, + spread = {x = 250, y = 250, z = 250}, + seed = 12345, octaves = 3, persist = 0.6, lacunarity = 2, @@ -1656,10 +1824,10 @@ local function register_dimension_biomes() }) minetest.register_decoration({ deco_type = "simple", - place_on = {"mcl_nether:netherrack","mcl_nether:glowstone","mcl_blackstone:nether_gold","mcl_nether:quartz_ore","mcl_core:gravel","mcl_nether:soul_sand","mcl_nether:magma","mcl_blackstone:blackstone"}, + place_on = {"mcl_nether:netherrack", "mcl_nether:glowstone", "mcl_blackstone:nether_gold", "mcl_nether:quartz_ore", "mcl_core:gravel", "mcl_nether:soul_sand", "mcl_nether:magma", "mcl_blackstone:blackstone"}, sidelen = 16, fill_ratio = 10, - biomes = { "CrimsonForest" }, + biomes = {"CrimsonForest"}, y_min = mcl_vars.mg_lava_nether_max, y_max = mcl_vars.mg_nether_deco_max, decoration = "mcl_crimson:crimson_nylium", @@ -1683,10 +1851,10 @@ local function register_dimension_biomes() }) minetest.register_decoration({ deco_type = "simple", - place_on = {"mcl_nether:netherrack","mcl_nether:glowstone","mcl_blackstone:nether_gold","mcl_nether:quartz_ore","mcl_core:gravel","mcl_nether:soul_sand","mcl_nether:magma","mcl_blackstone:blackstone"}, + place_on = {"mcl_nether:netherrack", "mcl_nether:glowstone", "mcl_blackstone:nether_gold", "mcl_nether:quartz_ore", "mcl_core:gravel", "mcl_nether:soul_sand", "mcl_nether:magma", "mcl_blackstone:blackstone"}, sidelen = 16, fill_ratio = 10, - biomes = { "WarpedForest" }, + biomes = {"WarpedForest"}, y_min = mcl_vars.mg_lava_nether_max, y_max = mcl_vars.mg_nether_deco_max, decoration = "mcl_crimson:warped_nylium", @@ -1711,10 +1879,10 @@ local function register_dimension_biomes() minetest.register_decoration({ deco_type = "simple", - place_on = {"mcl_nether:netherrack","mcl_nether:glowstone","mcl_blackstone:nether_gold","mcl_nether:quartz_ore","mcl_core:gravel","mcl_nether:soul_sand","mcl_blackstone:blackstone","mcl_nether:magma"}, + place_on = {"mcl_nether:netherrack", "mcl_nether:glowstone", "mcl_blackstone:nether_gold", "mcl_nether:quartz_ore", "mcl_core:gravel", "mcl_nether:soul_sand", "mcl_blackstone:blackstone", "mcl_nether:magma"}, sidelen = 16, fill_ratio = 10, - biomes = { "BasaltDelta" }, + biomes = {"BasaltDelta"}, y_min = mcl_vars.mg_lava_nether_max, y_max = mcl_vars.mg_nether_deco_max, decoration = "mcl_blackstone:basalt", @@ -1723,25 +1891,25 @@ local function register_dimension_biomes() }) minetest.register_ore({ - ore_type = "blob", - ore = "mcl_blackstone:blackstone", - wherein = {"mcl_nether:netherrack","mcl_nether:glowstone","mcl_core:gravel"}, - clust_scarcity = 100, - clust_num_ores = 400, - clust_size = 20, - biomes = { "BasaltDelta" }, - y_min = mcl_vars.mg_lava_nether_max, - y_max = mcl_vars.mg_nether_deco_max, - noise_params = { - offset = 0, - scale = 1, - spread = { x = 250, y = 250, z = 250 }, - seed = 12345, - octaves = 3, - persist = 0.6, - lacunarity = 2, - flags = "defaults", - } + ore_type = "blob", + ore = "mcl_blackstone:blackstone", + wherein = {"mcl_nether:netherrack", "mcl_nether:glowstone", "mcl_core:gravel"}, + clust_scarcity = 100, + clust_num_ores = 400, + clust_size = 20, + biomes = {"BasaltDelta"}, + y_min = mcl_vars.mg_lava_nether_max, + y_max = mcl_vars.mg_nether_deco_max, + noise_params = { + offset = 0, + scale = 1, + spread = {x = 250, y = 250, z = 250}, + seed = 12345, + octaves = 3, + persist = 0.6, + lacunarity = 2, + flags = "defaults", + } }) --[[ THE END ]] @@ -1863,15 +2031,15 @@ local function register_biome_ores() -- Emeralds minetest.register_ore({ - ore_type = "scatter", - ore = "mcl_core:stone_with_emerald", - wherein = stonelike, + ore_type = "scatter", + ore = "mcl_core:stone_with_emerald", + wherein = stonelike, clust_scarcity = 16384, clust_num_ores = 1, - clust_size = 1, - y_min = mcl_worlds.layer_to_y(4), - y_max = mcl_worlds.layer_to_y(32), - biomes = { + clust_size = 1, + y_min = mcl_worlds.layer_to_y(4), + y_max = mcl_worlds.layer_to_y(32), + biomes = { "ExtremeHills", "ExtremeHills_beach", "ExtremeHills_ocean", "ExtremeHills_deep_ocean", "ExtremeHills_underground", "ExtremeHills+", "ExtremeHills+_ocean", "ExtremeHills+_deep_ocean", "ExtremeHills+_underground", "ExtremeHillsM", "ExtremeHillsM_ocean", "ExtremeHillsM_deep_ocean", "ExtremeHillsM_underground", @@ -1887,15 +2055,15 @@ local function register_biome_ores() monster_egg_scarcity = 26 * 26 * 26 end minetest.register_ore({ - ore_type = "scatter", - ore = "mcl_monster_eggs:monster_egg_stone", - wherein = "mcl_core:stone", + ore_type = "scatter", + ore = "mcl_monster_eggs:monster_egg_stone", + wherein = "mcl_core:stone", clust_scarcity = monster_egg_scarcity, clust_num_ores = 3, - clust_size = 2, - y_min = mcl_vars.mg_overworld_min, - y_max = mcl_worlds.layer_to_y(61), - biomes = { + clust_size = 2, + y_min = mcl_vars.mg_overworld_min, + y_max = mcl_worlds.layer_to_y(61), + biomes = { "ExtremeHills", "ExtremeHills_beach", "ExtremeHills_ocean", "ExtremeHills_deep_ocean", "ExtremeHills_underground", "ExtremeHills+", "ExtremeHills+_ocean", "ExtremeHills+_deep_ocean", "ExtremeHills+_underground", "ExtremeHillsM", "ExtremeHillsM_ocean", "ExtremeHillsM_deep_ocean", "ExtremeHillsM_underground", @@ -1905,51 +2073,51 @@ local function register_biome_ores() -- Bonus gold spawn in Mesa if mg_name ~= "v6" then minetest.register_ore({ - ore_type = "scatter", - ore = "mcl_core:stone_with_gold", - wherein = stonelike, + ore_type = "scatter", + ore = "mcl_core:stone_with_gold", + wherein = stonelike, clust_scarcity = 3333, clust_num_ores = 5, - clust_size = 3, - y_min = mcl_worlds.layer_to_y(32), - y_max = mcl_worlds.layer_to_y(79), - biomes = { "Mesa", "Mesa_sandlevel", "Mesa_ocean", - "MesaBryce", "MesaBryce_sandlevel", "MesaBryce_ocean", - "MesaPlateauF", "MesaPlateauF_sandlevel", "MesaPlateauF_ocean", - "MesaPlateauFM", "MesaPlateauFM_sandlevel", "MesaPlateauFM_ocean", }, + clust_size = 3, + y_min = mcl_worlds.layer_to_y(32), + y_max = mcl_worlds.layer_to_y(79), + biomes = {"Mesa", "Mesa_sandlevel", "Mesa_ocean", + "MesaBryce", "MesaBryce_sandlevel", "MesaBryce_ocean", + "MesaPlateauF", "MesaPlateauF_sandlevel", "MesaPlateauF_ocean", + "MesaPlateauFM", "MesaPlateauFM_sandlevel", "MesaPlateauFM_ocean", }, }) end --nether gold if mg_name ~= "v6" then minetest.register_ore({ - ore_type = "scatter", - ore = "mcl_blackstone:blackstone_gilded", - wherein = "mcl_blackstone:blackstone", + ore_type = "scatter", + ore = "mcl_blackstone:blackstone_gilded", + wherein = "mcl_blackstone:blackstone", clust_scarcity = 4775, clust_num_ores = 2, - clust_size = 2, - y_min = mcl_vars.mg_nether_min, - y_max = mcl_vars.mg_nether_max, + clust_size = 2, + y_min = mcl_vars.mg_nether_min, + y_max = mcl_vars.mg_nether_max, }) minetest.register_ore({ - ore_type = "scatter", - ore = "mcl_blackstone:nether_gold", - wherein = "mcl_nether:netherrack", + ore_type = "scatter", + ore = "mcl_blackstone:nether_gold", + wherein = "mcl_nether:netherrack", clust_scarcity = 830, clust_num_ores = 5, - clust_size = 3, - y_min = mcl_vars.mg_nether_min, - y_max = mcl_vars.mg_nether_max, + clust_size = 3, + y_min = mcl_vars.mg_nether_min, + y_max = mcl_vars.mg_nether_max, }) minetest.register_ore({ - ore_type = "scatter", - ore = "mcl_blackstone:nether_gold", - wherein = "mcl_nether:netherrack", + ore_type = "scatter", + ore = "mcl_blackstone:nether_gold", + wherein = "mcl_nether:netherrack", clust_scarcity = 1660, clust_num_ores = 4, - clust_size = 2, - y_min = mcl_vars.mg_nether_min, - y_max = mcl_vars.mg_nether_max, + clust_size = 2, + y_min = mcl_vars.mg_nether_min, + y_max = mcl_vars.mg_nether_max, }) end end @@ -1959,182 +2127,182 @@ local function register_biomelike_ores() -- Random coarse dirt floor in Mega Taiga and Mesa Plateau F minetest.register_ore({ - ore_type = "sheet", - ore = "mcl_core:coarse_dirt", - wherein = {"mcl_core:podzol", "mcl_core:dirt"}, - clust_scarcity = 1, - clust_num_ores = 12, - clust_size = 10, - y_min = mcl_vars.mg_overworld_min, - y_max = mcl_vars.mg_overworld_max, + ore_type = "sheet", + ore = "mcl_core:coarse_dirt", + wherein = {"mcl_core:podzol", "mcl_core:dirt"}, + clust_scarcity = 1, + clust_num_ores = 12, + clust_size = 10, + y_min = mcl_vars.mg_overworld_min, + y_max = mcl_vars.mg_overworld_max, noise_threshold = 0.2, - noise_params = {offset=0, scale=15, spread={x=130, y=130, z=130}, seed=24, octaves=3, persist=0.70}, - biomes = { "MegaTaiga" }, + noise_params = {offset = 0, scale = 15, spread = {x = 130, y = 130, z = 130}, seed = 24, octaves = 3, persist = 0.70}, + biomes = {"MegaTaiga"}, }) minetest.register_ore({ - ore_type = "sheet", - ore = "mcl_core:coarse_dirt", - wherein = {"mcl_core:dirt_with_grass", "mcl_core:dirt"}, + ore_type = "sheet", + ore = "mcl_core:coarse_dirt", + wherein = {"mcl_core:dirt_with_grass", "mcl_core:dirt"}, column_height_max = 1, column_midpoint_factor = 0.0, - y_min = mcl_vars.mg_overworld_min, - y_max = mcl_vars.mg_overworld_max, + y_min = mcl_vars.mg_overworld_min, + y_max = mcl_vars.mg_overworld_max, noise_threshold = 0.0, - noise_params = {offset=0, scale=15, spread={x=250, y=250, z=250}, seed=24, octaves=3, persist=0.70}, - biomes = { "MesaPlateauF_grasstop" }, + noise_params = {offset = 0, scale = 15, spread = {x = 250, y = 250, z = 250}, seed = 24, octaves = 3, persist = 0.70}, + biomes = {"MesaPlateauF_grasstop"}, }) minetest.register_ore({ - ore_type = "blob", - ore = "mcl_core:coarse_dirt", - wherein = {"mcl_core:dirt_with_grass", "mcl_core:dirt"}, - clust_scarcity = 1500, - clust_num_ores = 25, - clust_size = 7, - y_min = mcl_vars.mg_overworld_min, - y_max = mcl_vars.mg_overworld_max, + ore_type = "blob", + ore = "mcl_core:coarse_dirt", + wherein = {"mcl_core:dirt_with_grass", "mcl_core:dirt"}, + clust_scarcity = 1500, + clust_num_ores = 25, + clust_size = 7, + y_min = mcl_vars.mg_overworld_min, + y_max = mcl_vars.mg_overworld_max, noise_params = { - offset = 0, - scale = 1, - spread = {x=250, y=250, z=250}, - seed = 12345, + offset = 0, + scale = 1, + spread = {x = 250, y = 250, z = 250}, + seed = 12345, octaves = 3, persist = 0.6, lacunarity = 2, flags = "defaults", }, - biomes = { "MesaPlateauF_grasstop" }, + biomes = {"MesaPlateauF_grasstop"}, }) minetest.register_ore({ - ore_type = "sheet", - ore = "mcl_core:coarse_dirt", - wherein = {"mcl_core:dirt_with_grass", "mcl_core:dirt"}, + ore_type = "sheet", + ore = "mcl_core:coarse_dirt", + wherein = {"mcl_core:dirt_with_grass", "mcl_core:dirt"}, column_height_max = 1, column_midpoint_factor = 0.0, - y_min = mcl_vars.mg_overworld_min, - y_max = mcl_vars.mg_overworld_max, + y_min = mcl_vars.mg_overworld_min, + y_max = mcl_vars.mg_overworld_max, noise_threshold = -2.5, - noise_params = {offset=1, scale=15, spread={x=250, y=250, z=250}, seed=24, octaves=3, persist=0.80}, - biomes = { "MesaPlateauFM_grasstop" }, + noise_params = {offset = 1, scale = 15, spread = {x = 250, y = 250, z = 250}, seed = 24, octaves = 3, persist = 0.80}, + biomes = {"MesaPlateauFM_grasstop"}, }) minetest.register_ore({ - ore_type = "blob", - ore = "mcl_core:coarse_dirt", - wherein = {"mcl_core:dirt_with_grass", "mcl_core:dirt"}, - clust_scarcity = 1800, - clust_num_ores = 65, - clust_size = 15, - y_min = mcl_vars.mg_overworld_min, - y_max = mcl_vars.mg_overworld_max, + ore_type = "blob", + ore = "mcl_core:coarse_dirt", + wherein = {"mcl_core:dirt_with_grass", "mcl_core:dirt"}, + clust_scarcity = 1800, + clust_num_ores = 65, + clust_size = 15, + y_min = mcl_vars.mg_overworld_min, + y_max = mcl_vars.mg_overworld_max, noise_params = { - offset = 0, - scale = 1, - spread = {x=250, y=250, z=250}, - seed = 12345, + offset = 0, + scale = 1, + spread = {x = 250, y = 250, z = 250}, + seed = 12345, octaves = 3, persist = 0.6, lacunarity = 2, flags = "defaults", }, - biomes = { "MesaPlateauFM_grasstop" }, + biomes = {"MesaPlateauFM_grasstop"}, }) -- Occasionally dig out portions of MesaPlateauFM minetest.register_ore({ - ore_type = "blob", - ore = "air", - wherein = {"group:hardened_clay", "group:sand","mcl_core:coarse_dirt"}, - clust_scarcity = 4000, - clust_size = 5, - y_min = mcl_vars.mg_overworld_min, - y_max = mcl_vars.mg_overworld_max, + ore_type = "blob", + ore = "air", + wherein = {"group:hardened_clay", "group:sand", "mcl_core:coarse_dirt"}, + clust_scarcity = 4000, + clust_size = 5, + y_min = mcl_vars.mg_overworld_min, + y_max = mcl_vars.mg_overworld_max, noise_params = { - offset = 0, - scale = 1, - spread = {x=250, y=250, z=250}, - seed = 12345, + offset = 0, + scale = 1, + spread = {x = 250, y = 250, z = 250}, + seed = 12345, octaves = 3, persist = 0.6, lacunarity = 2, flags = "defaults", }, - biomes = { "MesaPlateauFM", "MesaPlateauFM_grasstop" }, + biomes = {"MesaPlateauFM", "MesaPlateauFM_grasstop"}, }) minetest.register_ore({ - ore_type = "blob", - ore = "mcl_core:redsandstone", - wherein = {"mcl_colorblocks:hardened_clay_orange"}, - clust_scarcity = 300, - clust_size = 8, - y_min = mcl_vars.mg_overworld_min, - y_max = mcl_vars.mg_overworld_max, + ore_type = "blob", + ore = "mcl_core:redsandstone", + wherein = {"mcl_colorblocks:hardened_clay_orange"}, + clust_scarcity = 300, + clust_size = 8, + y_min = mcl_vars.mg_overworld_min, + y_max = mcl_vars.mg_overworld_max, noise_params = { - offset = 0, - scale = 1, - spread = {x=250, y=250, z=250}, - seed = 12345, + offset = 0, + scale = 1, + spread = {x = 250, y = 250, z = 250}, + seed = 12345, octaves = 3, persist = 0.6, lacunarity = 2, flags = "defaults", }, - biomes = { "MesaPlateauFM_sandlevel" }, + biomes = {"MesaPlateauFM_sandlevel"}, }) -- More red sand in MesaPlateauFM minetest.register_ore({ - ore_type = "sheet", - ore = "mcl_core:redsand", - wherein = {"group:hardened_clay"}, - clust_scarcity = 1, - clust_num_ores = 12, - clust_size = 10, - y_min = mcl_vars.mg_overworld_min, - y_max = mcl_vars.mg_overworld_max, + ore_type = "sheet", + ore = "mcl_core:redsand", + wherein = {"group:hardened_clay"}, + clust_scarcity = 1, + clust_num_ores = 12, + clust_size = 10, + y_min = mcl_vars.mg_overworld_min, + y_max = mcl_vars.mg_overworld_max, noise_threshold = 0.1, - noise_params = {offset=0, scale=15, spread={x=130, y=130, z=130}, seed=95, octaves=3, persist=0.70}, - biomes = { "MesaPlateauFM" }, + noise_params = {offset = 0, scale = 15, spread = {x = 130, y = 130, z = 130}, seed = 95, octaves = 3, persist = 0.70}, + biomes = {"MesaPlateauFM"}, }) minetest.register_ore({ - ore_type = "blob", - ore = "mcl_core:redsand", - wherein = {"group:hardened_clay"}, - clust_scarcity = 1500, - clust_size = 4, - y_min = mcl_vars.mg_overworld_min, - y_max = mcl_vars.mg_overworld_max, + ore_type = "blob", + ore = "mcl_core:redsand", + wherein = {"group:hardened_clay"}, + clust_scarcity = 1500, + clust_size = 4, + y_min = mcl_vars.mg_overworld_min, + y_max = mcl_vars.mg_overworld_max, noise_params = { - offset = 0, - scale = 1, - spread = {x=250, y=250, z=250}, - seed = 12345, + offset = 0, + scale = 1, + spread = {x = 250, y = 250, z = 250}, + seed = 12345, octaves = 3, persist = 0.6, lacunarity = 2, flags = "defaults", }, - biomes = { "MesaPlateauFM", "MesaPlateauFM_grasstop", "MesaPlateauFM_sandlevel" }, + biomes = {"MesaPlateauFM", "MesaPlateauFM_grasstop", "MesaPlateauFM_sandlevel"}, }) -- Small dirt patches in Extreme Hills M minetest.register_ore({ - ore_type = "blob", + ore_type = "blob", -- TODO: Should be grass block. But generating this as ore means gras blocks will spawn undeground. :-( - ore = "mcl_core:dirt", - wherein = {"mcl_core:gravel"}, - clust_scarcity = 5000, - clust_num_ores = 12, - clust_size = 4, - y_min = mcl_vars.mg_overworld_min, - y_max = mcl_vars.mg_overworld_max, + ore = "mcl_core:dirt", + wherein = {"mcl_core:gravel"}, + clust_scarcity = 5000, + clust_num_ores = 12, + clust_size = 4, + y_min = mcl_vars.mg_overworld_min, + y_max = mcl_vars.mg_overworld_max, noise_threshold = 0.2, - noise_params = {offset=0, scale=5, spread={x=250, y=250, z=250}, seed=64, octaves=3, persist=0.60}, - biomes = { "ExtremeHillsM" }, + noise_params = {offset = 0, scale = 5, spread = {x = 250, y = 250, z = 250}, seed = 64, octaves = 3, persist = 0.60}, + biomes = {"ExtremeHillsM"}, }) -- For a transition from stone to hardened clay in mesa biomes that is not perfectly flat minetest.register_ore({ ore_type = "stratum", ore = "mcl_core:stone", wherein = {"group:hardened_clay"}, - noise_params = {offset=-6, scale=2, spread={x=25, y=25, z=25}, octaves=1, persist=0.60}, + noise_params = {offset = -6, scale = 2, spread = {x = 25, y = 25, z = 25}, octaves = 1, persist = 0.60}, stratum_thickness = 8, biomes = { "Mesa_sandlevel", "Mesa_ocean", @@ -2157,18 +2325,18 @@ local function register_biomelike_ores() if not seed then seed = 39 end - local y_max = y_min + height-1 + local y_max = y_min + height - 1 local perfect_biomes if is_perfect then -- "perfect" means no erosion - perfect_biomes = { "MesaBryce", "Mesa", "MesaPlateauF", "MesaPlateauFM" } + perfect_biomes = {"MesaBryce", "Mesa", "MesaPlateauF", "MesaPlateauFM"} else - perfect_biomes = { "MesaBryce" } + perfect_biomes = {"MesaBryce"} end -- Full, perfect stratum minetest.register_ore({ ore_type = "stratum", - ore = "mcl_colorblocks:hardened_clay_"..color, + ore = "mcl_colorblocks:hardened_clay_" .. color, -- Only paint uncolored so the biome can choose -- a color in advance. wherein = {"mcl_colorblocks:hardened_clay"}, @@ -2177,56 +2345,56 @@ local function register_biomelike_ores() biomes = perfect_biomes, }) if not is_perfect then - -- Slightly eroded stratum, only minor imperfections - minetest.register_ore({ - ore_type = "stratum", - ore = "mcl_colorblocks:hardened_clay_"..color, - wherein = {"mcl_colorblocks:hardened_clay"}, - y_min = y_min, - y_max = y_max, - biomes = { "Mesa", "MesaPlateauF" }, - noise_params = { - offset = y_min+(y_max-y_min)/2, - scale = 0, - spread = {x = 50, y = 50, z = 50}, - seed = seed+4, - octaves = 1, - persist = 1.0 - }, - np_stratum_thickness = { - offset = 1.28, - scale = 1, - spread = {x = 18, y = 18, z = 18}, - seed = seed+4, - octaves = 3, - persist = 0.8, - }, - }) - -- Very eroded stratum, most of the color is gone - minetest.register_ore({ - ore_type = "stratum", - ore = "mcl_colorblocks:hardened_clay_"..color, - wherein = {"mcl_colorblocks:hardened_clay"}, - y_min = y_min, - y_max = y_max, - biomes = { "MesaPlateauFM" }, - noise_params = { - offset = y_min+(y_max-y_min)/2, - scale = 0, - spread = {x = 50, y = 50, z = 50}, - seed = seed+4, - octaves = 1, - persist = 1.0 - }, - np_stratum_thickness = { - offset = 0.1, - scale = 1, - spread = {x = 28, y = 28, z = 28}, - seed = seed+4, - octaves = 2, - persist = 0.6, - }, - }) + -- Slightly eroded stratum, only minor imperfections + minetest.register_ore({ + ore_type = "stratum", + ore = "mcl_colorblocks:hardened_clay_" .. color, + wherein = {"mcl_colorblocks:hardened_clay"}, + y_min = y_min, + y_max = y_max, + biomes = {"Mesa", "MesaPlateauF"}, + noise_params = { + offset = y_min + (y_max - y_min) / 2, + scale = 0, + spread = {x = 50, y = 50, z = 50}, + seed = seed + 4, + octaves = 1, + persist = 1.0 + }, + np_stratum_thickness = { + offset = 1.28, + scale = 1, + spread = {x = 18, y = 18, z = 18}, + seed = seed + 4, + octaves = 3, + persist = 0.8, + }, + }) + -- Very eroded stratum, most of the color is gone + minetest.register_ore({ + ore_type = "stratum", + ore = "mcl_colorblocks:hardened_clay_" .. color, + wherein = {"mcl_colorblocks:hardened_clay"}, + y_min = y_min, + y_max = y_max, + biomes = {"MesaPlateauFM"}, + noise_params = { + offset = y_min + (y_max - y_min) / 2, + scale = 0, + spread = {x = 50, y = 50, z = 50}, + seed = seed + 4, + octaves = 1, + persist = 1.0 + }, + np_stratum_thickness = { + offset = 0.1, + scale = 1, + spread = {x = 28, y = 28, z = 28}, + seed = seed + 4, + octaves = 2, + persist = 0.6, + }, + }) end end @@ -2255,7 +2423,7 @@ local function register_biomelike_ores() suddenly don't match up anymore. ]] -- Available Mesa colors: - local mesa_stratum_colors = { "silver", "brown", "orange", "red", "yellow", "white" } + local mesa_stratum_colors = {"silver", "brown", "orange", "red", "yellow", "white"} -- Start level local y = 17 @@ -2315,17 +2483,17 @@ local function register_dimension_ores() -- Soul sand minetest.register_ore({ - ore_type = "sheet", - ore = "mcl_nether:soul_sand", + ore_type = "sheet", + ore = "mcl_nether:soul_sand", -- Note: Stone is included only for v6 mapgen support. Netherrack is not generated naturally -- in v6, but instead set with the on_generated function in mcl_mapgen_core. - wherein = {"mcl_nether:netherrack", "mcl_core:stone"}, - clust_scarcity = 13 * 13 * 13, - clust_size = 5, - y_min = mcl_vars.mg_nether_min, - y_max = mcl_worlds.layer_to_y(64, "nether"), + wherein = {"mcl_nether:netherrack", "mcl_core:stone"}, + clust_scarcity = 13 * 13 * 13, + clust_size = 5, + y_min = mcl_vars.mg_nether_min, + y_max = mcl_worlds.layer_to_y(64, "nether"), noise_threshold = 0.0, - noise_params = { + noise_params = { offset = 0.5, scale = 0.1, spread = {x = 5, y = 5, z = 5}, @@ -2337,19 +2505,19 @@ local function register_dimension_ores() -- Magma blocks minetest.register_ore({ - ore_type = "blob", - ore = "mcl_nether:magma", - wherein = {"mcl_nether:netherrack", "mcl_core:stone"}, - clust_scarcity = 8*8*8, + ore_type = "blob", + ore = "mcl_nether:magma", + wherein = {"mcl_nether:netherrack", "mcl_core:stone"}, + clust_scarcity = 8 * 8 * 8, clust_num_ores = 45, - clust_size = 6, - y_min = mcl_worlds.layer_to_y(23, "nether"), - y_max = mcl_worlds.layer_to_y(37, "nether"), + clust_size = 6, + y_min = mcl_worlds.layer_to_y(23, "nether"), + y_max = mcl_worlds.layer_to_y(37, "nether"), noise_params = { - offset = 0, - scale = 1, - spread = {x=250, y=250, z=250}, - seed = 12345, + offset = 0, + scale = 1, + spread = {x = 250, y = 250, z = 250}, + seed = 12345, octaves = 3, persist = 0.6, lacunarity = 2, @@ -2357,19 +2525,19 @@ local function register_dimension_ores() }, }) minetest.register_ore({ - ore_type = "blob", - ore = "mcl_nether:magma", - wherein = {"mcl_nether:netherrack"}, - clust_scarcity = 10*10*10, + ore_type = "blob", + ore = "mcl_nether:magma", + wherein = {"mcl_nether:netherrack"}, + clust_scarcity = 10 * 10 * 10, clust_num_ores = 65, - clust_size = 8, - y_min = mcl_worlds.layer_to_y(23, "nether"), - y_max = mcl_worlds.layer_to_y(37, "nether"), + clust_size = 8, + y_min = mcl_worlds.layer_to_y(23, "nether"), + y_max = mcl_worlds.layer_to_y(37, "nether"), noise_params = { - offset = 0, - scale = 1, - spread = {x=250, y=250, z=250}, - seed = 12345, + offset = 0, + scale = 1, + spread = {x = 250, y = 250, z = 250}, + seed = 12345, octaves = 3, persist = 0.6, lacunarity = 2, @@ -2379,15 +2547,15 @@ local function register_dimension_ores() -- Glowstone minetest.register_ore({ - ore_type = "blob", - ore = "mcl_nether:glowstone", - wherein = {"mcl_nether:netherrack", "mcl_core:stone"}, - clust_scarcity = 26 * 26 * 26, - clust_size = 5, - y_min = mcl_vars.mg_lava_nether_max + 10, - y_max = mcl_vars.mg_nether_max - 13, + ore_type = "blob", + ore = "mcl_nether:glowstone", + wherein = {"mcl_nether:netherrack", "mcl_core:stone"}, + clust_scarcity = 26 * 26 * 26, + clust_size = 5, + y_min = mcl_vars.mg_lava_nether_max + 10, + y_max = mcl_vars.mg_nether_max - 13, noise_threshold = 0.0, - noise_params = { + noise_params = { offset = 0.5, scale = 0.1, spread = {x = 5, y = 5, z = 5}, @@ -2399,17 +2567,17 @@ local function register_dimension_ores() -- Gravel (Nether) minetest.register_ore({ - ore_type = "sheet", - ore = "mcl_core:gravel", - wherein = {"mcl_nether:netherrack", "mcl_core:stone"}, + ore_type = "sheet", + ore = "mcl_core:gravel", + wherein = {"mcl_nether:netherrack", "mcl_core:stone"}, column_height_min = 1, column_height_max = 1, column_midpoint_factor = 0, - y_min = mcl_worlds.layer_to_y(63, "nether"), + y_min = mcl_worlds.layer_to_y(63, "nether"), -- This should be 65, but for some reason with this setting, the sheet ore really stops at 65. o_O - y_max = mcl_worlds.layer_to_y(65+2, "nether"), + y_max = mcl_worlds.layer_to_y(65 + 2, "nether"), noise_threshold = 0.2, - noise_params = { + noise_params = { offset = 0.0, scale = 0.5, spread = {x = 20, y = 20, z = 20}, @@ -2422,22 +2590,22 @@ local function register_dimension_ores() -- Nether quartz if minetest.settings:get_bool("mcl_generate_ores", true) then minetest.register_ore({ - ore_type = "scatter", - ore = "mcl_nether:quartz_ore", - wherein = {"mcl_nether:netherrack", "mcl_core:stone"}, + ore_type = "scatter", + ore = "mcl_nether:quartz_ore", + wherein = {"mcl_nether:netherrack", "mcl_core:stone"}, clust_scarcity = 850, clust_num_ores = 4, -- MC cluster amount: 4-10 - clust_size = 3, + clust_size = 3, y_min = mcl_vars.mg_nether_min, y_max = mcl_vars.mg_nether_max, }) minetest.register_ore({ - ore_type = "scatter", - ore = "mcl_nether:quartz_ore", - wherein = {"mcl_nether:netherrack", "mcl_core:stone"}, + ore_type = "scatter", + ore = "mcl_nether:quartz_ore", + wherein = {"mcl_nether:netherrack", "mcl_core:stone"}, clust_scarcity = 1650, clust_num_ores = 8, -- MC cluster amount: 4-10 - clust_size = 4, + clust_size = 4, y_min = mcl_vars.mg_nether_min, y_max = mcl_vars.mg_nether_max, }) @@ -2445,62 +2613,62 @@ local function register_dimension_ores() -- Lava springs in the Nether minetest.register_ore({ - ore_type = "scatter", - ore = "mcl_nether:nether_lava_source", - wherein = {"mcl_nether:netherrack", "mcl_core:stone"}, + ore_type = "scatter", + ore = "mcl_nether:nether_lava_source", + wherein = {"mcl_nether:netherrack", "mcl_core:stone"}, clust_scarcity = 13500, --rare clust_num_ores = 1, - clust_size = 1, - y_min = mcl_vars.mg_lava_nether_max, - y_max = mcl_vars.mg_nether_max - 13, + clust_size = 1, + y_min = mcl_vars.mg_lava_nether_max, + y_max = mcl_vars.mg_nether_max - 13, }) - local lava_biomes = {"BasaltDelta","Nether"} + local lava_biomes = {"BasaltDelta", "Nether"} minetest.register_ore({ - ore_type = "scatter", - ore = "mcl_nether:nether_lava_source", - wherein = {"mcl_nether:netherrack", "mcl_core:stone"}, + ore_type = "scatter", + ore = "mcl_nether:nether_lava_source", + wherein = {"mcl_nether:netherrack", "mcl_core:stone"}, clust_scarcity = 500, clust_num_ores = 1, - clust_size = 1, - biomes = lava_biomes, - y_min = mcl_vars.mg_nether_min, - y_max = mcl_vars.mg_lava_nether_max + 1, + clust_size = 1, + biomes = lava_biomes, + y_min = mcl_vars.mg_nether_min, + y_max = mcl_vars.mg_lava_nether_max + 1, }) minetest.register_ore({ - ore_type = "scatter", - ore = "mcl_nether:nether_lava_source", - wherein = {"mcl_nether:netherrack", "mcl_core:stone"}, + ore_type = "scatter", + ore = "mcl_nether:nether_lava_source", + wherein = {"mcl_nether:netherrack", "mcl_core:stone"}, clust_scarcity = 1000, clust_num_ores = 1, - clust_size = 1, - biomes = lava_biomes, - y_min = mcl_vars.mg_lava_nether_max + 2, - y_max = mcl_vars.mg_lava_nether_max + 12, + clust_size = 1, + biomes = lava_biomes, + y_min = mcl_vars.mg_lava_nether_max + 2, + y_max = mcl_vars.mg_lava_nether_max + 12, }) minetest.register_ore({ - ore_type = "scatter", - ore = "mcl_nether:nether_lava_source", - wherein = {"mcl_nether:netherrack", "mcl_core:stone"}, + ore_type = "scatter", + ore = "mcl_nether:nether_lava_source", + wherein = {"mcl_nether:netherrack", "mcl_core:stone"}, clust_scarcity = 2000, clust_num_ores = 1, - clust_size = 1, - biomes = lava_biomes, - y_min = mcl_vars.mg_lava_nether_max + 13, - y_max = mcl_vars.mg_lava_nether_max + 48, + clust_size = 1, + biomes = lava_biomes, + y_min = mcl_vars.mg_lava_nether_max + 13, + y_max = mcl_vars.mg_lava_nether_max + 48, }) minetest.register_ore({ - ore_type = "scatter", - ore = "mcl_nether:nether_lava_source", - wherein = {"mcl_nether:netherrack", "mcl_core:stone"}, + ore_type = "scatter", + ore = "mcl_nether:nether_lava_source", + wherein = {"mcl_nether:netherrack", "mcl_core:stone"}, clust_scarcity = 3500, clust_num_ores = 1, - clust_size = 1, - biomes = lava_biomes, - y_min = mcl_vars.mg_lava_nether_max + 49, - y_max = mcl_vars.mg_nether_max - 13, + clust_size = 1, + biomes = lava_biomes, + y_min = mcl_vars.mg_lava_nether_max + 49, + y_max = mcl_vars.mg_nether_max - 13, }) --[[ THE END ]] @@ -2519,20 +2687,20 @@ local function register_dimension_ores() local mult = 1.0 minetest.register_ore({ - ore_type = "stratum", - ore = "mcl_end:end_stone", - wherein = end_wherein, - biomes = {"EndSmallIslands","Endborder"}, - y_min = mcl_vars.mg_end_min+64, - y_max = mcl_vars.mg_end_min+80, - clust_num_ores = 3375, - clust_size = 15, + ore_type = "stratum", + ore = "mcl_end:end_stone", + wherein = end_wherein, + biomes = {"EndSmallIslands", "Endborder"}, + y_min = mcl_vars.mg_end_min + 64, + y_max = mcl_vars.mg_end_min + 80, + clust_num_ores = 3375, + clust_size = 15, noise_params = { - offset = mcl_vars.mg_end_min+70, - scale = -1, - spread = {x=84, y=84, z=84}, - seed = 145, + offset = mcl_vars.mg_end_min + 70, + scale = -1, + spread = {x = 84, y = 84, z = 84}, + seed = 145, octaves = 3, persist = 0.6, lacunarity = 2, @@ -2540,10 +2708,10 @@ local function register_dimension_ores() }, np_stratum_thickness = { - offset = 0, - scale = 15, - spread = {x=84, y=84, z=84}, - seed = 145, + offset = 0, + scale = 15, + spread = {x = 84, y = 84, z = 84}, + seed = 145, octaves = 3, persist = 0.6, lacunarity = 2, @@ -2553,27 +2721,27 @@ local function register_dimension_ores() }) minetest.register_ore({ - ore_type = "stratum", - ore = "mcl_end:end_stone", - wherein = end_wherein, - biomes = {"End","EndMidlands","EndHighlands","EndBarrens"}, - y_min = mcl_vars.mg_end_min+64, - y_max = mcl_vars.mg_end_min+80, + ore_type = "stratum", + ore = "mcl_end:end_stone", + wherein = end_wherein, + biomes = {"End", "EndMidlands", "EndHighlands", "EndBarrens"}, + y_min = mcl_vars.mg_end_min + 64, + y_max = mcl_vars.mg_end_min + 80, noise_params = { - offset = mcl_vars.mg_end_min+70, - scale = -1, - spread = {x=126, y=126, z=126}, - seed = mg_seed+9999, + offset = mcl_vars.mg_end_min + 70, + scale = -1, + spread = {x = 126, y = 126, z = 126}, + seed = mg_seed + 9999, octaves = 3, persist = 0.5, }, np_stratum_thickness = { - offset = -2, - scale = 10, - spread = {x=126, y=126, z=126}, - seed = mg_seed+9999, + offset = -2, + scale = 10, + spread = {x = 126, y = 126, z = 126}, + seed = mg_seed + 9999, octaves = 3, persist = 0.5, }, @@ -2581,54 +2749,54 @@ local function register_dimension_ores() }) minetest.register_ore({ - ore_type = "stratum", - ore = "mcl_end:end_stone", - wherein = end_wherein, - biomes = {"End","EndMidlands","EndHighlands","EndBarrens"}, - y_min = mcl_vars.mg_end_min+64, - y_max = mcl_vars.mg_end_min+80, + ore_type = "stratum", + ore = "mcl_end:end_stone", + wherein = end_wherein, + biomes = {"End", "EndMidlands", "EndHighlands", "EndBarrens"}, + y_min = mcl_vars.mg_end_min + 64, + y_max = mcl_vars.mg_end_min + 80, noise_params = { - offset = mcl_vars.mg_end_min+72, - scale = -3, - spread = {x=84, y=84, z=84}, - seed = mg_seed+999, + offset = mcl_vars.mg_end_min + 72, + scale = -3, + spread = {x = 84, y = 84, z = 84}, + seed = mg_seed + 999, octaves = 4, persist = 0.8, }, np_stratum_thickness = { - offset = -4, - scale = 10, - spread = {x=84, y=84, z=84}, - seed = mg_seed+999, + offset = -4, + scale = 10, + spread = {x = 84, y = 84, z = 84}, + seed = mg_seed + 999, octaves = 4, persist = 0.8, }, clust_scarcity = 1, }) minetest.register_ore({ - ore_type = "stratum", - ore = "mcl_end:end_stone", - wherein = end_wherein, - biomes = {"End","EndMidlands","EndHighlands","EndBarrens"}, - y_min = mcl_vars.mg_end_min+64, - y_max = mcl_vars.mg_end_min+80, + ore_type = "stratum", + ore = "mcl_end:end_stone", + wherein = end_wherein, + biomes = {"End", "EndMidlands", "EndHighlands", "EndBarrens"}, + y_min = mcl_vars.mg_end_min + 64, + y_max = mcl_vars.mg_end_min + 80, noise_params = { - offset = mcl_vars.mg_end_min+70, - scale = -2, - spread = {x=84, y=84, z=84}, - seed = mg_seed+99, + offset = mcl_vars.mg_end_min + 70, + scale = -2, + spread = {x = 84, y = 84, z = 84}, + seed = mg_seed + 99, octaves = 4, persist = 0.85, }, np_stratum_thickness = { - offset = -3, - scale = 5, - spread = {x=63, y=63, z=63}, - seed = mg_seed+50, + offset = -3, + scale = 5, + spread = {x = 63, y = 63, z = 63}, + seed = mg_seed + 50, octaves = 4, persist = 0.85, }, @@ -2645,11 +2813,11 @@ local function register_grass_decoration(grasstype, offset, scale, biomes) local place_on, seed, node if grasstype == "fern" then node = "mcl_flowers:fern" - place_on = {"group:grass_block_no_snow", "mcl_core:podzol","mcl_mud:mud"} + place_on = {"group:grass_block_no_snow", "mcl_core:podzol", "mcl_mud:mud"} seed = 333 elseif grasstype == "tallgrass" then node = "mcl_flowers:tallgrass" - place_on = {"group:grass_block_no_snow","mcl_mud:mud"} + place_on = {"group:grass_block_no_snow", "mcl_mud:mud"} seed = 420 end local noise = { @@ -2660,14 +2828,14 @@ local function register_grass_decoration(grasstype, offset, scale, biomes) octaves = 3, persist = 0.6 } - for b=1, #biomes do + for b = 1, #biomes do local param2 = minetest.registered_biomes[biomes[b]]._mcl_palette_index minetest.register_decoration({ deco_type = "simple", place_on = place_on, sidelen = 16, noise_params = noise, - biomes = { biomes[b] }, + biomes = {biomes[b]}, y_min = 1, y_max = mcl_vars.mg_overworld_max, decoration = node, @@ -2680,15 +2848,15 @@ local function register_seagrass_decoration(grasstype, offset, scale, biomes) local seed, nodes, surfaces, param2, param2_max, y_max if grasstype == "seagrass" then seed = 16 - surfaces = { "mcl_core:dirt", "mcl_core:sand", "mcl_core:gravel", "mcl_core:redsand" } - nodes = { "mcl_ocean:seagrass_dirt", "mcl_ocean:seagrass_sand", "mcl_ocean:seagrass_gravel", "mcl_ocean:seagrass_redsand" } + surfaces = {"mcl_core:dirt", "mcl_core:sand", "mcl_core:gravel", "mcl_core:redsand"} + nodes = {"mcl_ocean:seagrass_dirt", "mcl_ocean:seagrass_sand", "mcl_ocean:seagrass_gravel", "mcl_ocean:seagrass_redsand"} y_max = 0 elseif grasstype == "kelp" then seed = 32 param2 = 16 param2_max = 96 - surfaces = { "mcl_core:dirt", "mcl_core:sand", "mcl_core:gravel" } - nodes = { "mcl_ocean:kelp_dirt", "mcl_ocean:kelp_sand", "mcl_ocean:kelp_gravel" } + surfaces = {"mcl_core:dirt", "mcl_core:sand", "mcl_core:gravel"} + nodes = {"mcl_ocean:kelp_dirt", "mcl_ocean:kelp_sand", "mcl_ocean:kelp_gravel"} y_max = -6 end local noise = { @@ -2700,10 +2868,10 @@ local function register_seagrass_decoration(grasstype, offset, scale, biomes) persist = 0.6, } - for s=1, #surfaces do + for s = 1, #surfaces do minetest.register_decoration({ deco_type = "simple", - place_on = { surfaces[s] }, + place_on = {surfaces[s]}, sidelen = 16, noise_params = noise, biomes = biomes, @@ -2749,48 +2917,48 @@ local corals = { local function register_coral_decos(ck) local c = corals[ck] local noise = { - offset = -0.0085, - scale = 0.002, - spread = {x = 25, y = 120, z = 25}, - seed = 235, - octaves = 5, - persist = 1.8, - lacunarity = 3.5, - flags = "absvalue" - } + offset = -0.0085, + scale = 0.002, + spread = {x = 25, y = 120, z = 25}, + seed = 235, + octaves = 5, + persist = 1.8, + lacunarity = 3.5, + flags = "absvalue" + } minetest.register_decoration({ deco_type = "schematic", - place_on = {"group:sand","mcl_core:gravel","mcl_mud:mud"}, + place_on = {"group:sand", "mcl_core:gravel", "mcl_mud:mud"}, sidelen = 80, noise_params = noise, biomes = warm_oceans, y_min = coral_min, y_max = coral_max, - schematic = mod_mcl_structures.."/schematics/mcl_structures_coral_"..c.."_1.mts", + schematic = mod_mcl_structures .. "/schematics/mcl_structures_coral_" .. c .. "_1.mts", rotation = "random", flags = "all_floors,force_placement", }) minetest.register_decoration({ deco_type = "schematic", - place_on = {"group:sand","mcl_core:gravel","mcl_mud:mud"}, + place_on = {"group:sand", "mcl_core:gravel", "mcl_mud:mud"}, noise_params = noise, sidelen = 80, biomes = warm_oceans, y_min = coral_min, y_max = coral_max, - schematic = mod_mcl_structures.."/schematics/mcl_structures_coral_"..c.."_2.mts", + schematic = mod_mcl_structures .. "/schematics/mcl_structures_coral_" .. c .. "_2.mts", rotation = "random", flags = "all_floors,force_placement", }) minetest.register_decoration({ deco_type = "simple", - place_on = {"mcl_ocean:"..c.."_coral_block"}, + place_on = {"mcl_ocean:" .. c .. "_coral_block"}, sidelen = 16, fill_ratio = 3, y_min = coral_min, y_max = coral_max, - decoration = "mcl_ocean:"..c.."_coral", + decoration = "mcl_ocean:" .. c .. "_coral", biomes = warm_oceans, flags = "force_placement, all_floors", height = 1, @@ -2803,7 +2971,7 @@ local function register_coral_decos(ck) fill_ratio = 7, y_min = coral_min, y_max = coral_max, - decoration = "mcl_ocean:"..c.."_coral_fan", + decoration = "mcl_ocean:" .. c .. "_coral_fan", biomes = warm_oceans, flags = "force_placement, all_floors", height = 1, @@ -2813,12 +2981,12 @@ end local function register_decorations() -- Coral Reefs - for k,_ in pairs(corals) do + for k, _ in pairs(corals) do register_coral_decos(k) end minetest.register_decoration({ deco_type = "simple", - place_on = {"group:sand","mcl_core:gravel","mcl_mud:mud"}, + place_on = {"group:sand", "mcl_core:gravel", "mcl_mud:mud"}, sidelen = 16, noise_params = { offset = -0.0085, @@ -2899,20 +3067,20 @@ local function register_decorations() --rare CORAl minetest.register_decoration({ deco_type = "schematic", - place_on = {"group:sand","mcl_core:gravel"}, + place_on = {"group:sand", "mcl_core:gravel"}, fill_ratio = 0.0001, sidelen = 80, biomes = warm_oceans, y_min = coral_min, y_max = coral_max, - schematic = mod_mcl_structures.."/schematics/coral_cora.mts", + schematic = mod_mcl_structures .. "/schematics/coral_cora.mts", rotation = "random", flags = "place_center_x,place_center_z, force_placement", }) minetest.register_decoration({ deco_type = "simple", - place_on = {"mcl_core:dirt_with_grass","mcl_core:podzol"}, + place_on = {"mcl_core:dirt_with_grass", "mcl_core:podzol"}, sidelen = 16, noise_params = { offset = 0, @@ -2924,7 +3092,7 @@ local function register_decorations() lacunarity = 1.0, flags = "absvalue" }, - biomes = {"Taiga","ColdTaiga","MegaTaiga","MegaSpruceTaiga", "Forest"}, + biomes = {"Taiga", "ColdTaiga", "MegaTaiga", "MegaSpruceTaiga", "Forest"}, y_max = mcl_vars.mg_overworld_max, y_min = 2, decoration = "mcl_sweet_berry:sweet_berry_bush_3" @@ -2946,7 +3114,7 @@ local function register_decorations() biomes = {"IcePlainsSpikes"}, y_min = 4, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_structures.."/schematics/mcl_structures_ice_spike_large.mts", + schematic = mod_mcl_structures .. "/schematics/mcl_structures_ice_spike_large.mts", rotation = "random", flags = "place_center_x, place_center_z", }) @@ -2967,14 +3135,14 @@ local function register_decorations() biomes = {"IcePlainsSpikes"}, y_min = 4, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_structures.."/schematics/mcl_structures_ice_spike_small.mts", + schematic = mod_mcl_structures .. "/schematics/mcl_structures_ice_spike_small.mts", rotation = "random", flags = "place_center_x, place_center_z", }) -- Oak -- Large oaks - for i=1, 4 do + for i = 1, 4 do minetest.register_decoration({ deco_type = "schematic", place_on = {"group:grass_block_no_snow", "mcl_core:dirt"}, @@ -2990,7 +3158,7 @@ local function register_decorations() biomes = {"Forest"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_oak_large_"..i..".mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_oak_large_" .. i .. ".mts", flags = "place_center_x, place_center_z", rotation = "random", }) @@ -3010,7 +3178,7 @@ local function register_decorations() biomes = {"ExtremeHills", "ExtremeHillsM", "ExtremeHills+", "ExtremeHills+_snowtop"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_oak_large_"..i..".mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_oak_large_" .. i .. ".mts", flags = "place_center_x, place_center_z", rotation = "random", }) @@ -3031,7 +3199,7 @@ local function register_decorations() biomes = {"Forest"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_oak_classic.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_oak_classic.mts", flags = "place_center_x, place_center_z", rotation = "random", }) @@ -3050,7 +3218,7 @@ local function register_decorations() biomes = {"FlowerForest"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_oak_classic.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_oak_classic.mts", flags = "place_center_x, place_center_z", rotation = "random", }) @@ -3069,7 +3237,7 @@ local function register_decorations() biomes = {"ExtremeHills", "ExtremeHillsM", "ExtremeHills+", "ExtremeHills+_snowtop"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_oak_classic.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_oak_classic.mts", flags = "place_center_x, place_center_z", rotation = "random", }) @@ -3089,7 +3257,7 @@ local function register_decorations() biomes = {"ExtremeHills+", "ExtremeHills+_snowtop"}, y_min = 50, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_oak_classic.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_oak_classic.mts", flags = "place_center_x, place_center_z", rotation = "random", }) @@ -3108,7 +3276,7 @@ local function register_decorations() biomes = {"MesaPlateauF_grasstop"}, y_min = 30, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_oak_classic.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_oak_classic.mts", flags = "place_center_x, place_center_z", rotation = "random", }) @@ -3127,7 +3295,7 @@ local function register_decorations() biomes = {"MesaPlateauFM_grasstop"}, y_min = 30, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_oak_classic.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_oak_classic.mts", flags = "place_center_x, place_center_z", rotation = "random", }) @@ -3147,7 +3315,7 @@ local function register_decorations() biomes = {"IcePlains"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_oak_classic.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_oak_classic.mts", flags = "place_center_x, place_center_z", rotation = "random", }) @@ -3156,10 +3324,10 @@ local function register_decorations() place_on = {"group:grass_block_no_snow", "mcl_core:dirt"}, sidelen = 80, fill_ratio = 0.004, - biomes = {"Jungle", "JungleM"}, + biomes = {"Jungle", "JungleM","BambooJungle", "BambooJungleM"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_oak_classic.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_oak_classic.mts", flags = "place_center_x, place_center_z", rotation = "random", }) @@ -3171,7 +3339,7 @@ local function register_decorations() biomes = {"JungleEdge", "JungleEdgeM", "Savanna"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_oak_classic.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_oak_classic.mts", flags = "place_center_x, place_center_z", rotation = "random", }) @@ -3191,7 +3359,7 @@ local function register_decorations() biomes = {"FlowerForest"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_oak_classic_bee_nest.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_oak_classic_bee_nest.mts", flags = "place_center_x, place_center_z", rotation = "random", spawn_by = "group:flower", @@ -3212,7 +3380,7 @@ local function register_decorations() biomes = {"Forest"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_oak_classic_bee_nest.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_oak_classic_bee_nest.mts", flags = "place_center_x, place_center_z", rotation = "random", spawn_by = "group:flower", @@ -3234,7 +3402,7 @@ local function register_decorations() biomes = {"Forest"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_oak_balloon.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_oak_balloon.mts", flags = "place_center_x, place_center_z", rotation = "random", }) @@ -3255,7 +3423,7 @@ local function register_decorations() biomes = {"Swampland", "Swampland_shore"}, y_min = 0, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_oak_swamp.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_oak_swamp.mts", flags = "place_center_x, place_center_z", rotation = "random", }) @@ -3266,10 +3434,10 @@ local function register_decorations() place_on = {"mcl_mud:mud"}, sidelen = 80, fill_ratio = 0.0065, - biomes = {"MangroveSwamp","MangroveSwamp_shore"}, + biomes = {"MangroveSwamp", "MangroveSwamp_shore"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_mangrove.."/schematics/mcl_mangrove_tree_1.mts", + schematic = mod_mcl_mangrove .. "/schematics/mcl_mangrove_tree_1.mts", flags = "place_center_x, place_center_z, force_placement", rotation = "random", }) @@ -3279,10 +3447,10 @@ local function register_decorations() place_on = {"mcl_mud:mud"}, sidelen = 80, fill_ratio = 0.0045, - biomes = {"MangroveSwamp","MangroveSwamp_shore"}, + biomes = {"MangroveSwamp", "MangroveSwamp_shore"}, y_min = -1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_mangrove.."/schematics/mcl_mangrove_tree_2.mts", + schematic = mod_mcl_mangrove .. "/schematics/mcl_mangrove_tree_2.mts", flags = "place_center_x, place_center_z, force_placement", rotation = "random", }) @@ -3292,10 +3460,10 @@ local function register_decorations() place_on = {"mcl_mud:mud"}, sidelen = 80, fill_ratio = 0.023, - biomes = {"MangroveSwamp","MangroveSwamp_shore"}, + biomes = {"MangroveSwamp", "MangroveSwamp_shore"}, y_min = -1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_mangrove.."/schematics/mcl_mangrove_tree_3.mts", + schematic = mod_mcl_mangrove .. "/schematics/mcl_mangrove_tree_3.mts", flags = "place_center_x, place_center_z, force_placement", rotation = "random", }) @@ -3305,10 +3473,10 @@ local function register_decorations() place_on = {"mcl_mud:mud"}, sidelen = 80, fill_ratio = 0.023, - biomes = {"MangroveSwamp","MangroveSwamp_shore"}, + biomes = {"MangroveSwamp", "MangroveSwamp_shore"}, y_min = -1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_mangrove.."/schematics/mcl_mangrove_tree_4.mts", + schematic = mod_mcl_mangrove .. "/schematics/mcl_mangrove_tree_4.mts", flags = "place_center_x, place_center_z, force_placement", rotation = "random", }) @@ -3318,10 +3486,10 @@ local function register_decorations() place_on = {"mcl_mud:mud"}, sidelen = 80, fill_ratio = 0.023, - biomes = {"MangroveSwamp","MangroveSwamp_shore"}, + biomes = {"MangroveSwamp", "MangroveSwamp_shore"}, y_min = -1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_mangrove.."/schematics/mcl_mangrove_tree_5.mts", + schematic = mod_mcl_mangrove .. "/schematics/mcl_mangrove_tree_5.mts", flags = "place_center_x, place_center_z, force_placement", rotation = "random", }) @@ -3341,7 +3509,7 @@ local function register_decorations() biomes = {"MangroveSwamp"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_mangrove.."/schematics/mcl_mangrove_bee_nest.mts", + schematic = mod_mcl_mangrove .. "/schematics/mcl_mangrove_bee_nest.mts", flags = "place_center_x, place_center_z, force_placement", rotation = "random", spawn_by = "group:flower", @@ -3351,7 +3519,7 @@ local function register_decorations() place_on = {"mcl_mud:mud"}, sidelen = 80, fill_ratio = 0.045, - biomes = {"MangroveSwamp","MangroveSwamp_shore"}, + biomes = {"MangroveSwamp", "MangroveSwamp_shore"}, y_min = 0, y_max = 0, decoration = "mcl_mangrove:water_logged_roots", @@ -3365,7 +3533,7 @@ local function register_decorations() num_spawn_by = 2, sidelen = 80, fill_ratio = 10, - biomes = {"MangroveSwamp","MangroveSwamp_shore"}, + biomes = {"MangroveSwamp", "MangroveSwamp_shore"}, y_min = 0, y_max = 0, decoration = "mcl_mangrove:water_logged_roots", @@ -3376,7 +3544,7 @@ local function register_decorations() place_on = {"mcl_mud:mud"}, sidelen = 80, fill_ratio = 0.045, - biomes = {"MangroveSwamp","MangroveSwamp_shore"}, + biomes = {"MangroveSwamp", "MangroveSwamp_shore"}, place_offset_y = -1, decoration = "mcl_mangrove:mangrove_mud_roots", flags = "place_center_x, place_center_z, force_placement", @@ -3386,7 +3554,7 @@ local function register_decorations() place_on = {"mcl_mud:mud"}, sidelen = 80, fill_ratio = 0.008, - biomes = {"MangroveSwamp","MangroveSwamp_shore"}, + biomes = {"MangroveSwamp", "MangroveSwamp_shore"}, decoration = "mcl_core:deadbush", flags = "place_center_x, place_center_z", }) @@ -3395,7 +3563,7 @@ local function register_decorations() place_on = {"mcl_core:water_source"}, sidelen = 80, fill_ratio = 0.035, - biomes = {"MangroveSwamp","MangroveSwamp_shore"}, + biomes = {"MangroveSwamp", "MangroveSwamp_shore"}, decoration = "mcl_flowers:waterlily", flags = "place_center_x, place_center_z, liquid_surface", }) @@ -3403,7 +3571,7 @@ local function register_decorations() -- Jungle tree -- Huge jungle tree (4 variants) - for i=1, 4 do + for i = 1, 4 do minetest.register_decoration({ deco_type = "schematic", place_on = {"group:grass_block_no_snow", "mcl_core:dirt"}, @@ -3412,7 +3580,7 @@ local function register_decorations() biomes = {"Jungle"}, y_min = 4, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_jungle_tree_huge_"..i..".mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_jungle_tree_huge_" .. i .. ".mts", flags = "place_center_x, place_center_z", rotation = "random", }) @@ -3424,7 +3592,7 @@ local function register_decorations() biomes = {"JungleM"}, y_min = 4, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_jungle_tree_huge_"..i..".mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_jungle_tree_huge_" .. i .. ".mts", flags = "place_center_x, place_center_z", rotation = "random", }) @@ -3439,7 +3607,7 @@ local function register_decorations() biomes = {"Jungle"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_jungle_tree.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_jungle_tree.mts", flags = "place_center_x, place_center_z", rotation = "random", }) @@ -3451,7 +3619,7 @@ local function register_decorations() biomes = {"Jungle"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_jungle_tree_2.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_jungle_tree_2.mts", flags = "place_center_x, place_center_z", rotation = "random", }) @@ -3463,7 +3631,7 @@ local function register_decorations() biomes = {"Jungle"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_jungle_tree_3.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_jungle_tree_3.mts", flags = "place_center_x, place_center_z", rotation = "random", }) @@ -3475,7 +3643,7 @@ local function register_decorations() biomes = {"Jungle"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_jungle_tree_4.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_jungle_tree_4.mts", flags = "place_center_x, place_center_z", rotation = "random", }) @@ -3484,10 +3652,10 @@ local function register_decorations() place_on = {"group:grass_block_no_snow", "mcl_core:dirt"}, sidelen = 80, fill_ratio = 0.025, - biomes = {"Jungle"}, + biomes = {"Jungle","BambooJungle"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_jungle_tree.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_jungle_tree.mts", flags = "place_center_x, place_center_z", rotation = "random", }) @@ -3496,10 +3664,10 @@ local function register_decorations() place_on = {"group:grass_block_no_snow", "mcl_core:dirt"}, sidelen = 80, fill_ratio = 0.0045, - biomes = {"JungleEdge", "JungleEdgeM"}, + biomes = {"JungleEdge", "JungleEdgeM", "BambooJungleEdge", "BambooJungleEdgeM"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_jungle_tree.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_jungle_tree.mts", flags = "place_center_x, place_center_z", rotation = "random", }) @@ -3509,10 +3677,10 @@ local function register_decorations() place_on = {"group:grass_block_no_snow", "mcl_core:dirt"}, sidelen = 80, fill_ratio = 0.09, - biomes = {"JungleM"}, + biomes = {"JungleM", "BambooJungleM"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_jungle_tree_2.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_jungle_tree_2.mts", flags = "place_center_x, place_center_z", rotation = "random", }) @@ -3536,7 +3704,7 @@ local function register_decorations() biomes = biomes, y_min = y, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/"..sprucename, + schematic = mod_mcl_core .. "/schematics/" .. sprucename, flags = "place_center_x, place_center_z", }) end @@ -3590,7 +3758,7 @@ local function register_decorations() biomes = {"Taiga", "ColdTaiga"}, y_min = 2, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_spruce_lollipop.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_spruce_lollipop.mts", flags = "place_center_x, place_center_z", }) @@ -3610,7 +3778,7 @@ local function register_decorations() biomes = {"Taiga", "ColdTaiga"}, y_min = 3, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_spruce_matchstick.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_spruce_matchstick.mts", flags = "place_center_x, place_center_z", }) @@ -3630,12 +3798,12 @@ local function register_decorations() biomes = {"IcePlains"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_spruce_5.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_spruce_5.mts", flags = "place_center_x, place_center_z", }) -- Acacia (many variants) - for a=1, 7 do + for a = 1, 7 do minetest.register_decoration({ deco_type = "schematic", place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt", "mcl_core:coarse_dirt"}, @@ -3644,7 +3812,7 @@ local function register_decorations() biomes = {"Savanna", "SavannaM"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_acacia_"..a..".mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_acacia_" .. a .. ".mts", flags = "place_center_x, place_center_z", rotation = "random", }) @@ -3666,7 +3834,7 @@ local function register_decorations() biomes = {"BirchForest"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_birch.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_birch.mts", flags = "place_center_x, place_center_z", }) minetest.register_decoration({ @@ -3684,7 +3852,7 @@ local function register_decorations() biomes = {"BirchForestM"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_birch_tall.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_birch_tall.mts", flags = "place_center_x, place_center_z", }) @@ -3703,7 +3871,7 @@ local function register_decorations() biomes = {"Forest", "FlowerForest"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_birch.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_birch.mts", flags = "place_center_x, place_center_z", }) minetest.register_decoration({ @@ -3722,7 +3890,7 @@ local function register_decorations() biomes = {"Forest", "BirchForest", "BirchForestM"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_birch_bee_nest.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_birch_bee_nest.mts", flags = "place_center_x, place_center_z", rotation = "random", spawn_by = "group:flower", @@ -3744,66 +3912,65 @@ local function register_decorations() biomes = {"RoofedForest"}, y_min = 4, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_dark_oak.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_dark_oak.mts", flags = "place_center_x, place_center_z", rotation = "random", }) - local ratio_mushroom = 0.0001 - local ratio_mushroom_huge = ratio_mushroom * (11/12) - local ratio_mushroom_giant = ratio_mushroom * (1/12) + local ratio_mushroom_huge = ratio_mushroom * (11 / 12) + local ratio_mushroom_giant = ratio_mushroom * (1 / 12) local ratio_mushroom_mycelium = 0.002 - local ratio_mushroom_mycelium_huge = ratio_mushroom_mycelium * (11/12) - local ratio_mushroom_mycelium_giant = ratio_mushroom_mycelium * (1/12) + local ratio_mushroom_mycelium_huge = ratio_mushroom_mycelium * (11 / 12) + local ratio_mushroom_mycelium_giant = ratio_mushroom_mycelium * (1 / 12) -- Huge Brown Mushroom minetest.register_decoration({ deco_type = "schematic", - place_on = { "group:grass_block_no_snow", "mcl_core:dirt" }, + place_on = {"group:grass_block_no_snow", "mcl_core:dirt"}, sidelen = 80, fill_ratio = ratio_mushroom_huge, - biomes = { "RoofedForest" }, + biomes = {"RoofedForest"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_mushrooms.."/schematics/mcl_mushrooms_huge_brown.mts", + schematic = mod_mcl_mushrooms .. "/schematics/mcl_mushrooms_huge_brown.mts", flags = "place_center_x, place_center_z", rotation = "0", }) minetest.register_decoration({ deco_type = "schematic", - place_on = { "group:grass_block_no_snow", "mcl_core:dirt" }, + place_on = {"group:grass_block_no_snow", "mcl_core:dirt"}, sidelen = 80, fill_ratio = ratio_mushroom_giant, - biomes = { "RoofedForest" }, + biomes = {"RoofedForest"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_mushrooms.."/schematics/mcl_mushrooms_giant_brown.mts", + schematic = mod_mcl_mushrooms .. "/schematics/mcl_mushrooms_giant_brown.mts", flags = "place_center_x, place_center_z", rotation = "0", }) minetest.register_decoration({ deco_type = "schematic", - place_on = { "mcl_core:mycelium" }, + place_on = {"mcl_core:mycelium"}, sidelen = 80, fill_ratio = ratio_mushroom_mycelium_huge, - biomes = { "MushroomIsland", "MushroomIslandShore" }, + biomes = {"MushroomIsland", "MushroomIslandShore"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_mushrooms.."/schematics/mcl_mushrooms_huge_brown.mts", + schematic = mod_mcl_mushrooms .. "/schematics/mcl_mushrooms_huge_brown.mts", flags = "place_center_x, place_center_z", rotation = "0", }) minetest.register_decoration({ deco_type = "schematic", - place_on = { "mcl_core:mycelium" }, + place_on = {"mcl_core:mycelium"}, sidelen = 80, fill_ratio = ratio_mushroom_mycelium_giant, - biomes = { "MushroomIsland", "MushroomIslandShore" }, + biomes = {"MushroomIsland", "MushroomIslandShore"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_mushrooms.."/schematics/mcl_mushrooms_giant_brown.mts", + schematic = mod_mcl_mushrooms .. "/schematics/mcl_mushrooms_giant_brown.mts", flags = "place_center_x, place_center_z", rotation = "0", }) @@ -3811,50 +3978,50 @@ local function register_decorations() -- Huge Red Mushroom minetest.register_decoration({ deco_type = "schematic", - place_on = { "group:grass_block_no_snow", "mcl_core:dirt" }, + place_on = {"group:grass_block_no_snow", "mcl_core:dirt"}, sidelen = 80, fill_ratio = ratio_mushroom_huge, - biomes = { "RoofedForest" }, + biomes = {"RoofedForest"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_mushrooms.."/schematics/mcl_mushrooms_huge_red.mts", + schematic = mod_mcl_mushrooms .. "/schematics/mcl_mushrooms_huge_red.mts", flags = "place_center_x, place_center_z", rotation = "0", }) minetest.register_decoration({ deco_type = "schematic", - place_on = { "group:grass_block_no_snow", "mcl_core:dirt" }, + place_on = {"group:grass_block_no_snow", "mcl_core:dirt"}, sidelen = 80, fill_ratio = ratio_mushroom_giant, - biomes = { "RoofedForest" }, + biomes = {"RoofedForest"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_mushrooms.."/schematics/mcl_mushrooms_giant_red.mts", + schematic = mod_mcl_mushrooms .. "/schematics/mcl_mushrooms_giant_red.mts", flags = "place_center_x, place_center_z", rotation = "0", }) minetest.register_decoration({ deco_type = "schematic", - place_on = { "mcl_core:mycelium" }, + place_on = {"mcl_core:mycelium"}, sidelen = 80, fill_ratio = ratio_mushroom_mycelium_huge, - biomes = { "MushroomIsland", "MushroomIslandShore" }, + biomes = {"MushroomIsland", "MushroomIslandShore"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_mushrooms.."/schematics/mcl_mushrooms_huge_red.mts", + schematic = mod_mcl_mushrooms .. "/schematics/mcl_mushrooms_huge_red.mts", flags = "place_center_x, place_center_z", rotation = "0", }) minetest.register_decoration({ deco_type = "schematic", - place_on = { "mcl_core:mycelium" }, + place_on = {"mcl_core:mycelium"}, sidelen = 80, fill_ratio = ratio_mushroom_mycelium_giant, - biomes = { "MushroomIsland", "MushroomIslandShore" }, + biomes = {"MushroomIsland", "MushroomIslandShore"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_mushrooms.."/schematics/mcl_mushrooms_giant_red.mts", + schematic = mod_mcl_mushrooms .. "/schematics/mcl_mushrooms_giant_red.mts", flags = "place_center_x, place_center_z", rotation = "0", }) @@ -3910,7 +4077,7 @@ local function register_decorations() biomes = {"MegaTaiga", "MegaSpruceTaiga"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_structures.."/schematics/mcl_structures_boulder.mts", + schematic = mod_mcl_structures .. "/schematics/mcl_structures_boulder.mts", flags = "place_center_x, place_center_z", rotation = "random", }) @@ -3931,7 +4098,7 @@ local function register_decorations() biomes = {"MegaTaiga", "MegaSpruceTaiga"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_structures.."/schematics/mcl_structures_boulder_small.mts", + schematic = mod_mcl_structures .. "/schematics/mcl_structures_boulder_small.mts", flags = "place_center_x, place_center_z", rotation = "random", }) @@ -3953,9 +4120,9 @@ local function register_decorations() y_max = mcl_vars.mg_overworld_max, decoration = "mcl_core:cactus", biomes = {"Desert", - "Mesa","Mesa_sandlevel", - "MesaPlateauF","MesaPlateauF_sandlevel", - "MesaPlateauFM","MesaPlateauFM_sandlevel"}, + "Mesa", "Mesa_sandlevel", + "MesaPlateauF", "MesaPlateauF_sandlevel", + "MesaPlateauFM", "MesaPlateauFM_sandlevel"}, height = 1, height_max = 3, }) @@ -3978,7 +4145,7 @@ local function register_decorations() decoration = "mcl_core:reeds", height = 1, height_max = 3, - spawn_by = { "mcl_core:water_source", "group:frosted_ice" }, + spawn_by = {"mcl_core:water_source", "group:frosted_ice"}, num_spawn_by = 1, }) minetest.register_decoration({ @@ -3999,23 +4166,23 @@ local function register_decorations() decoration = "mcl_core:reeds", height = 1, height_max = 3, - spawn_by = { "mcl_core:water_source", "group:frosted_ice" }, + spawn_by = {"mcl_core:water_source", "group:frosted_ice"}, num_spawn_by = 1, }) -- Doubletall grass local function register_doubletall_grass(offset, scale, biomes) - for b=1, #biomes do + for b = 1, #biomes do local param2 = minetest.registered_biomes[biomes[b]]._mcl_palette_index minetest.register_decoration({ deco_type = "schematic", schematic = { - size = { x=1, y=3, z=1 }, + size = {x = 1, y = 3, z = 1}, data = { - { name = "air", prob = 0 }, - { name = "mcl_flowers:double_grass", param1=255, param2=param2 }, - { name = "mcl_flowers:double_grass_top", param1=255, param2=param2 }, + {name = "air", prob = 0}, + {name = "mcl_flowers:double_grass", param1 = 255, param2 = param2}, + {name = "mcl_flowers:double_grass_top", param1 = 255, param2 = param2}, }, }, place_on = {"group:grass_block_no_snow"}, @@ -4030,7 +4197,7 @@ local function register_decorations() }, y_min = 1, y_max = mcl_vars.mg_overworld_max, - biomes = { biomes[b] }, + biomes = {biomes[b]}, }) end end @@ -4041,16 +4208,16 @@ local function register_decorations() -- Large ferns local function register_double_fern(offset, scale, biomes) - for b=1, #biomes do + for b = 1, #biomes do local param2 = minetest.registered_biomes[biomes[b]]._mcl_palette_index minetest.register_decoration({ deco_type = "schematic", schematic = { - size = { x=1, y=3, z=1 }, + size = {x = 1, y = 3, z = 1}, data = { - { name = "air", prob = 0 }, - { name = "mcl_flowers:double_fern", param1=255, param2=param2 }, - { name = "mcl_flowers:double_fern_top", param1=255, param2=param2 }, + {name = "air", prob = 0}, + {name = "mcl_flowers:double_fern", param1 = 255, param2 = param2}, + {name = "mcl_flowers:double_fern_top", param1 = 255, param2 = param2}, }, }, place_on = {"group:grass_block_no_snow", "mcl_core:podzol"}, @@ -4070,8 +4237,8 @@ local function register_decorations() end end - register_double_fern(0.01, 0.03, { "Jungle", "JungleM", "JungleEdge", "JungleEdgeM", "Taiga", "ColdTaiga", "MegaTaiga", "MegaSpruceTaiga" }) - register_double_fern(0.15, 0.1, { "JungleM" }) + register_double_fern(0.01, 0.03, {"Jungle", "JungleM", "JungleEdge", "JungleEdgeM", "Taiga", "ColdTaiga", "MegaTaiga", "MegaSpruceTaiga", "BambooJungle", "BambooJungleM", "BambooJungleEdge", "BambooJungleEdgeM",}) + register_double_fern(0.15, 0.1, {"JungleM"}) -- Large flowers local function register_large_flower(name, biomes, seed, offset, flower_forest_offset) @@ -4081,24 +4248,24 @@ local function register_decorations() else maxi = 1 end - for i=1, maxi do + for i = 1, maxi do local o, b -- offset, biomes if i == 1 then o = offset b = biomes else o = flower_forest_offset - b = { "FlowerForest" } + b = {"FlowerForest"} end minetest.register_decoration({ deco_type = "schematic", schematic = { - size = { x=1, y=3, z=1 }, + size = {x = 1, y = 3, z = 1}, data = { - { name = "air", prob = 0 }, - { name = "mcl_flowers:"..name, param1=255, }, - { name = "mcl_flowers:"..name.."_top", param1=255, }, + {name = "air", prob = 0}, + {name = "mcl_flowers:" .. name, param1 = 255, }, + {name = "mcl_flowers:" .. name .. "_top", param1 = 255, }, }, }, place_on = {"group:grass_block_no_snow", "mcl_core:dirt"}, @@ -4142,7 +4309,7 @@ local function register_decorations() biomes = {"Jungle"}, y_min = 3, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_jungle_bush_oak_leaves.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_jungle_bush_oak_leaves.mts", flags = "place_center_x, place_center_z", }) minetest.register_decoration({ @@ -4157,10 +4324,10 @@ local function register_decorations() octaves = 4, persist = 0.6, }, - biomes = {"Jungle"}, + biomes = {"Jungle", "BambooJungle"}, y_min = 3, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_jungle_bush_oak_leaves_2.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_jungle_bush_oak_leaves_2.mts", flags = "place_center_x, place_center_z", }) minetest.register_decoration({ @@ -4175,10 +4342,10 @@ local function register_decorations() octaves = 4, persist = 0.6, }, - biomes = {"JungleM"}, + biomes = {"JungleM","BambooJungleM"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_jungle_bush_oak_leaves.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_jungle_bush_oak_leaves.mts", flags = "place_center_x, place_center_z", }) minetest.register_decoration({ @@ -4193,13 +4360,121 @@ local function register_decorations() octaves = 4, persist = 0.6, }, - biomes = {"JungleEdge", "JungleEdgeM"}, + biomes = {"JungleEdge", "JungleEdgeM","BambooJungleEdge", "BambooJungleEdgeM"}, y_min = 3, y_max = mcl_vars.mg_overworld_max, - schematic = mod_mcl_core.."/schematics/mcl_core_jungle_bush_oak_leaves.mts", + schematic = mod_mcl_core .. "/schematics/mcl_core_jungle_bush_oak_leaves.mts", flags = "place_center_x, place_center_z", }) + -- Bamboo + minetest.register_decoration({ + deco_type = "simple", + place_on = {"group:grass_block_no_snow", "mcl_core:dirt",}, + sidelen = 80, + fill_ratio = 0.0043, + biomes = {"Jungle", "JungleM", "JungleEdge", "JungleEdgeM"}, + y_min = 1, + y_max = mcl_vars.mg_overworld_max, + decoration = "mcl_bamboo:bamboo", + height = 12, + max_height = 15, + flags = "place_center_x, place_center_z", + rotation = "random", + }) + + minetest.register_decoration({ + deco_type = "simple", + place_on = {"group:grass_block_no_snow", "mcl_core:dirt", "mcl_core:podzol"}, + sidelen = 80, + fill_ratio = 0.095, + biomes = {"BambooJungle", "BambooJungleM", "BambooJungleEdge", "BambooJungleEdgeM"}, + y_min = 1, + y_max = mcl_vars.mg_overworld_max, + decoration = "mcl_bamboo:bamboo", + height = 12, + max_height = 15, + flags = "place_center_x, place_center_z", + rotation = "random", + }) + + minetest.register_decoration({ + deco_type = "simple", + place_on = {"mcl_bamboo:bamboo"}, + sidelen = 80, + fill_ratio = 1, + biomes = {"BambooJungle", "BambooJungleM", "BambooJungleEdge", "BambooJungleEdgeM", "Jungle", "JungleM", "JungleEdge", "JungleEdgeM"}, + y_min = 1, + y_max = mcl_vars.mg_overworld_max, + decoration = "mcl_bamboo:bamboo_endcap", + height = 1, + max_height = 4, + flags = "all_floors", + }) + + minetest.register_decoration({ + deco_type = "simple", + place_on = {"group:grass_block_no_snow"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = 0.012, + spread = {x = 100, y = 100, z = 100}, + seed = 354, + octaves = 1, + persist = 0.5, + lacunarity = 1.0, + flags = "absvalue" + }, + biomes = {"BambooJungle", "BambooJungleM"}, + y_max = mcl_vars.mg_overworld_max, + y_min = 2, + decoration = "mcl_core:podzol" + }) + + minetest.register_decoration({ + deco_type = "simple", + place_on = {"group:grass_block_no_snow"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = 0.012, + spread = {x = 100, y = 100, z = 100}, + seed = 354, + octaves = 1, + persist = 0.5, + lacunarity = 1.0, + flags = "absvalue" + }, + biomes = {"BambooJungle", "BambooJungleEdge","BambooJungleM", "BambooJungleEdge"}, + y_max = mcl_vars.mg_overworld_max, + y_min = 1, + decoration = "mcl_flowers:tallgrass" + }) + + minetest.register_decoration({ + deco_type = "simple", + place_on = {"group:grass_block_no_snow"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = 0.012, + spread = {x = 100, y = 100, z = 100}, + seed = 354, + octaves = 1, + persist = 0.5, + lacunarity = 1.0, + flags = "absvalue" + }, + biomes = {"BambooJungle", "BambooJungleM", "BambooJungleEdge"}, + y_max = mcl_vars.mg_overworld_max, + y_min = 2, + decoration = "mcl_mud:mud" + }) + register_doubletall_grass(-0.0005, -0.3, {"BambooJungle", "BambooJungleM", "BambooJungleEdge"}) + register_grass_decoration("tallgrass", -0.03, 1, {"BambooJungle", "BambooJungleM", "BambooJungleEdge"}) + + ----------------- -- Fallen logs -- These fallen logs are not really good yet. They must be longer and also have one upright block. -- Note the decortion API does not like wide schematics, they are likely to overhang. @@ -4282,7 +4557,7 @@ local function register_decorations() octaves = 3, persist = 0.66 }, - biomes = {"BirchForest", "BirchForestM",}, + biomes = {"BirchForest", "BirchForestM", }, y_min = 1, y_max = mcl_vars.mg_overworld_max, schematic = { @@ -4366,23 +4641,23 @@ local function register_decorations() -- Lily pad local lily_schem = { - { name = "mcl_core:water_source" }, - { name = "mcl_flowers:waterlily" }, + {name = "mcl_core:water_source"}, + {name = "mcl_flowers:waterlily"}, } -- Spawn them in shallow water at ocean level in Swampland. -- Tweak lilydepth to change the maximum water depth local lilydepth = 2 - for d=1, lilydepth do + for d = 1, lilydepth do local height = d + 2 local y = 1 - d - table.insert(lily_schem, 1, { name = "air", prob = 0 }) + table.insert(lily_schem, 1, {name = "air", prob = 0}) minetest.register_decoration({ deco_type = "schematic", schematic = { - size = { x=1, y=height, z=1 }, + size = {x = 1, y = height, z = 1}, data = lily_schem, }, place_on = "mcl_core:dirt", @@ -4397,7 +4672,7 @@ local function register_decorations() }, y_min = y, y_max = y, - biomes = { "Swampland_shore" }, + biomes = {"Swampland_shore"}, rotation = "random", }) end @@ -4418,7 +4693,7 @@ local function register_decorations() y_min = 1, y_max = mcl_vars.mg_overworld_max, decoration = "mcl_farming:melon", - biomes = { "Jungle" }, + biomes = {"Jungle"}, }) minetest.register_decoration({ deco_type = "simple", @@ -4435,7 +4710,7 @@ local function register_decorations() y_min = 1, y_max = mcl_vars.mg_overworld_max, decoration = "mcl_farming:melon", - biomes = { "JungleM" }, + biomes = {"JungleM"}, }) minetest.register_decoration({ deco_type = "simple", @@ -4452,7 +4727,7 @@ local function register_decorations() y_min = 1, y_max = mcl_vars.mg_overworld_max, decoration = "mcl_farming:melon", - biomes = { "JungleEdge", "JungleEdgeM" }, + biomes = {"JungleEdge", "JungleEdgeM"}, }) -- Lots of melons in Jungle Edge M @@ -4471,7 +4746,7 @@ local function register_decorations() y_min = 1, y_max = mcl_vars.mg_overworld_max, decoration = "mcl_farming:melon", - biomes = { "JungleEdgeM" }, + biomes = {"JungleEdgeM"}, }) -- Pumpkin @@ -4497,16 +4772,16 @@ local function register_decorations() -- Grasses and ferns local grass_forest = {"Plains", "Taiga", "Forest", "FlowerForest", "BirchForest", "BirchForestM", "RoofedForest", "Swampland", } local grass_mpf = {"MesaPlateauF_grasstop"} - local grass_plains = {"Plains", "SunflowerPlains", "JungleEdge", "JungleEdgeM", "MangroveSwamp" } + local grass_plains = {"Plains", "SunflowerPlains", "JungleEdge", "JungleEdgeM", "MangroveSwamp"} local grass_savanna = {"Savanna", "SavannaM"} - local grass_sparse = {"ExtremeHills", "ExtremeHills+", "ExtremeHills+_snowtop", "ExtremeHillsM", "Jungle" } - local grass_mpfm = {"MesaPlateauFM_grasstop" } + local grass_sparse = {"ExtremeHills", "ExtremeHills+", "ExtremeHills+_snowtop", "ExtremeHillsM", "Jungle"} + local grass_mpfm = {"MesaPlateauFM_grasstop"} - register_grass_decoration("tallgrass", -0.03, 0.09, grass_forest) + register_grass_decoration("tallgrass", -0.03, 0.09, grass_forest) register_grass_decoration("tallgrass", -0.015, 0.075, grass_forest) - register_grass_decoration("tallgrass", 0, 0.06, grass_forest) - register_grass_decoration("tallgrass", 0.015, 0.045, grass_forest) - register_grass_decoration("tallgrass", 0.03, 0.03, grass_forest) + register_grass_decoration("tallgrass", 0, 0.06, grass_forest) + register_grass_decoration("tallgrass", 0.015, 0.045, grass_forest) + register_grass_decoration("tallgrass", 0.03, 0.03, grass_forest) register_grass_decoration("tallgrass", -0.03, 0.09, grass_mpf) register_grass_decoration("tallgrass", -0.015, 0.075, grass_mpf) register_grass_decoration("tallgrass", 0, 0.06, grass_mpf) @@ -4520,16 +4795,16 @@ local function register_decorations() register_grass_decoration("tallgrass", 0.05, -0.03, grass_sparse) register_grass_decoration("tallgrass", 0.05, 0.05, grass_mpfm) - local fern_minimal = { "Jungle", "JungleM", "JungleEdge", "JungleEdgeM", "Taiga", "MegaTaiga", "MegaSpruceTaiga", "ColdTaiga", "MangroveSwamp" } - local fern_low = { "Jungle", "JungleM", "JungleEdge", "JungleEdgeM", "Taiga", "MegaTaiga", "MegaSpruceTaiga" } - local fern_Jungle = { "Jungle", "JungleM", "JungleEdge", "JungleEdgeM" } + local fern_minimal = {"Jungle", "JungleM", "JungleEdge", "JungleEdgeM", "Taiga", "MegaTaiga", "MegaSpruceTaiga", "ColdTaiga", "MangroveSwamp"} + local fern_low = {"Jungle", "JungleM", "JungleEdge", "JungleEdgeM", "Taiga", "MegaTaiga", "MegaSpruceTaiga"} + local fern_Jungle = {"Jungle", "JungleM", "JungleEdge", "JungleEdgeM"} --local fern_JungleM = { "JungleM" }, - register_grass_decoration("fern", -0.03, 0.09, fern_minimal) + register_grass_decoration("fern", -0.03, 0.09, fern_minimal) register_grass_decoration("fern", -0.015, 0.075, fern_minimal) - register_grass_decoration("fern", 0, 0.06, fern_minimal) - register_grass_decoration("fern", 0.015, 0.045, fern_low) - register_grass_decoration("fern", 0.03, 0.03, fern_low) + register_grass_decoration("fern", 0, 0.06, fern_minimal) + register_grass_decoration("fern", 0.015, 0.045, fern_low) + register_grass_decoration("fern", 0.03, 0.03, fern_low) register_grass_decoration("fern", 0.01, 0.05, fern_Jungle) register_grass_decoration("fern", 0.03, 0.03, fern_Jungle) register_grass_decoration("fern", 0.05, 0.01, fern_Jungle) @@ -4537,17 +4812,17 @@ local function register_decorations() register_grass_decoration("fern", 0.09, -0.03, fern_Jungle) register_grass_decoration("fern", 0.12, -0.03, {"JungleM"}) - local b_seagrass = {"ColdTaiga_ocean","ExtremeHills_ocean","ExtremeHillsM_ocean","ExtremeHills+_ocean","Taiga_ocean","MegaTaiga_ocean","MegaSpruceTaiga_ocean","StoneBeach_ocean","Plains_ocean","SunflowerPlains_ocean","Forest_ocean","FlowerForest_ocean","BirchForest_ocean","BirchForestM_ocean","RoofedForest_ocean","Swampland_ocean","Jungle_ocean","JungleM_ocean","JungleEdge_ocean","JungleEdgeM_ocean","MushroomIsland_ocean","Desert_ocean","Savanna_ocean","SavannaM_ocean","Mesa_ocean","MesaBryce_ocean","MesaPlateauF_ocean","MesaPlateauFM_ocean", -"ColdTaiga_deep_ocean","ExtremeHills_deep_ocean","ExtremeHillsM_deep_ocean","ExtremeHills+_deep_ocean","Taiga_deep_ocean","MegaTaiga_deep_ocean","MegaSpruceTaiga_deep_ocean","StoneBeach_deep_ocean","Plains_deep_ocean","SunflowerPlains_deep_ocean","Forest_deep_ocean","FlowerForest_deep_ocean","BirchForest_deep_ocean","BirchForestM_deep_ocean","RoofedForest_deep_ocean","Swampland_deep_ocean","Jungle_deep_ocean","JungleM_deep_ocean","JungleEdge_deep_ocean","JungleEdgeM_deep_ocean","MushroomIsland_deep_ocean","Desert_deep_ocean","Savanna_deep_ocean","SavannaM_deep_ocean","Mesa_deep_ocean","MesaBryce_deep_ocean","MesaPlateauF_deep_ocean","MesaPlateauFM_deep_ocean", -"Mesa_sandlevel","MesaBryce_sandlevel","MesaPlateauF_sandlevel","MesaPlateauFM_sandlevel","Swampland_shore","Jungle_shore","JungleM_shore","Savanna_beach","FlowerForest_beach","ColdTaiga_beach_water","ExtremeHills_beach"} - local b_kelp = {"ExtremeHillsM_ocean","ExtremeHills+_ocean","MegaTaiga_ocean","MegaSpruceTaiga_ocean","Plains_ocean","SunflowerPlains_ocean","Forest_ocean","FlowerForest_ocean","BirchForest_ocean","BirchForestM_ocean","RoofedForest_ocean","Swampland_ocean","Jungle_ocean","JungleM_ocean","JungleEdge_ocean","JungleEdgeM_ocean","MushroomIsland_ocean", -"ExtremeHillsM_deep_ocean","ExtremeHills+_deep_ocean","MegaTaiga_deep_ocean","MegaSpruceTaiga_deep_ocean","Plains_deep_ocean","SunflowerPlains_deep_ocean","Forest_deep_ocean","FlowerForest_deep_ocean","BirchForest_deep_ocean","BirchForestM_deep_ocean","RoofedForest_deep_ocean","Swampland_deep_ocean","Jungle_deep_ocean","JungleM_deep_ocean","JungleEdge_deep_ocean","JungleEdgeM_deep_ocean","MushroomIsland_deep_ocean" -} + local b_seagrass = {"ColdTaiga_ocean", "ExtremeHills_ocean", "ExtremeHillsM_ocean", "ExtremeHills+_ocean", "Taiga_ocean", "MegaTaiga_ocean", "MegaSpruceTaiga_ocean", "StoneBeach_ocean", "Plains_ocean", "SunflowerPlains_ocean", "Forest_ocean", "FlowerForest_ocean", "BirchForest_ocean", "BirchForestM_ocean", "RoofedForest_ocean", "Swampland_ocean", "Jungle_ocean", "JungleM_ocean", "JungleEdge_ocean", "JungleEdgeM_ocean", "MushroomIsland_ocean", "Desert_ocean", "Savanna_ocean", "SavannaM_ocean", "Mesa_ocean", "MesaBryce_ocean", "MesaPlateauF_ocean", "MesaPlateauFM_ocean", + "ColdTaiga_deep_ocean", "ExtremeHills_deep_ocean", "ExtremeHillsM_deep_ocean", "ExtremeHills+_deep_ocean", "Taiga_deep_ocean", "MegaTaiga_deep_ocean", "MegaSpruceTaiga_deep_ocean", "StoneBeach_deep_ocean", "Plains_deep_ocean", "SunflowerPlains_deep_ocean", "Forest_deep_ocean", "FlowerForest_deep_ocean", "BirchForest_deep_ocean", "BirchForestM_deep_ocean", "RoofedForest_deep_ocean", "Swampland_deep_ocean", "Jungle_deep_ocean", "JungleM_deep_ocean", "JungleEdge_deep_ocean", "JungleEdgeM_deep_ocean", "MushroomIsland_deep_ocean", "Desert_deep_ocean", "Savanna_deep_ocean", "SavannaM_deep_ocean", "Mesa_deep_ocean", "MesaBryce_deep_ocean", "MesaPlateauF_deep_ocean", "MesaPlateauFM_deep_ocean", + "Mesa_sandlevel", "MesaBryce_sandlevel", "MesaPlateauF_sandlevel", "MesaPlateauFM_sandlevel", "Swampland_shore", "Jungle_shore", "JungleM_shore", "Savanna_beach", "FlowerForest_beach", "ColdTaiga_beach_water", "ExtremeHills_beach"} + local b_kelp = {"ExtremeHillsM_ocean", "ExtremeHills+_ocean", "MegaTaiga_ocean", "MegaSpruceTaiga_ocean", "Plains_ocean", "SunflowerPlains_ocean", "Forest_ocean", "FlowerForest_ocean", "BirchForest_ocean", "BirchForestM_ocean", "RoofedForest_ocean", "Swampland_ocean", "Jungle_ocean", "JungleM_ocean", "JungleEdge_ocean", "JungleEdgeM_ocean", "MushroomIsland_ocean", + "ExtremeHillsM_deep_ocean", "ExtremeHills+_deep_ocean", "MegaTaiga_deep_ocean", "MegaSpruceTaiga_deep_ocean", "Plains_deep_ocean", "SunflowerPlains_deep_ocean", "Forest_deep_ocean", "FlowerForest_deep_ocean", "BirchForest_deep_ocean", "BirchForestM_deep_ocean", "RoofedForest_deep_ocean", "Swampland_deep_ocean", "Jungle_deep_ocean", "JungleM_deep_ocean", "JungleEdge_deep_ocean", "JungleEdgeM_deep_ocean", "MushroomIsland_deep_ocean" + } register_seagrass_decoration("seagrass", 0, 0.5, b_seagrass) register_seagrass_decoration("kelp", -0.5, 1, b_kelp) - local b_sponge = {"Plains_deep_ocean","SunflowerPlains_deep_ocean","Forest_deep_ocean","FlowerForest_deep_ocean","BirchForest_deep_ocean","BirchForestM_deep_ocean","RoofedForest_deep_ocean","Jungle_deep_ocean","JungleM_deep_ocean","JungleEdge_deep_ocean","JungleEdgeM_deep_ocean","MushroomIsland_deep_ocean","Desert_deep_ocean","Savanna_deep_ocean","SavannaM_deep_ocean","Mesa_deep_ocean","MesaBryce_deep_ocean","MesaPlateauF_deep_ocean","MesaPlateauFM_deep_ocean"} + local b_sponge = {"Plains_deep_ocean", "SunflowerPlains_deep_ocean", "Forest_deep_ocean", "FlowerForest_deep_ocean", "BirchForest_deep_ocean", "BirchForestM_deep_ocean", "RoofedForest_deep_ocean", "Jungle_deep_ocean", "JungleM_deep_ocean", "JungleEdge_deep_ocean", "JungleEdgeM_deep_ocean", "MushroomIsland_deep_ocean", "Desert_deep_ocean", "Savanna_deep_ocean", "SavannaM_deep_ocean", "Mesa_deep_ocean", "MesaBryce_deep_ocean", "MesaPlateauF_deep_ocean", "MesaPlateauFM_deep_ocean"} -- Wet Sponge -- TODO: Remove this when we got ocean monuments minetest.register_decoration({ @@ -4556,7 +4831,7 @@ local function register_decorations() biomes = b_sponge, spawn_by = {"group:water"}, num_spawn_by = 1, - place_on = {"mcl_core:dirt","mcl_core:sand","mcl_core:gravel"}, + place_on = {"mcl_core:dirt", "mcl_core:sand", "mcl_core:gravel"}, sidelen = 16, noise_params = { offset = 0.00495, @@ -4588,10 +4863,10 @@ local function register_decorations() y_min = 1, y_max = mcl_vars.mg_overworld_max, schematic = { - size = { x=1, y=2, z=1 }, + size = {x = 1, y = 2, z = 1}, data = { - { name = "mcl_core:dirt_with_grass", force_place=true, }, - { name = "mcl_flowers:tallgrass", param2 = minetest.registered_biomes["IcePlains"]._mcl_palette_index }, + {name = "mcl_core:dirt_with_grass", force_place = true, }, + {name = "mcl_flowers:tallgrass", param2 = minetest.registered_biomes["IcePlains"]._mcl_palette_index}, }, }, }) @@ -4611,10 +4886,10 @@ local function register_decorations() y_min = 1, y_max = mcl_vars.mg_overworld_max, schematic = { - size = { x=1, y=2, z=1 }, + size = {x = 1, y = 2, z = 1}, data = { - { name = "mcl_core:dirt_with_grass", force_place=true, }, - { name = "mcl_flowers:tallgrass", param2 = minetest.registered_biomes["ExtremeHills+_snowtop"]._mcl_palette_index }, + {name = "mcl_core:dirt_with_grass", force_place = true, }, + {name = "mcl_flowers:tallgrass", param2 = minetest.registered_biomes["ExtremeHills+_snowtop"]._mcl_palette_index}, }, }, }) @@ -4635,7 +4910,7 @@ local function register_decorations() }, y_min = 4, y_max = mcl_vars.mg_overworld_max, - biomes = {"Desert", "Mesa", "Mesa_sandlevel", "MesaPlateauF", "MesaPlateauF_sandlevel", "MesaPlateauF_grasstop","MesaBryce","Taiga", "MegaTaiga"}, + biomes = {"Desert", "Mesa", "Mesa_sandlevel", "MesaPlateauF", "MesaPlateauF_sandlevel", "MesaPlateauF_grasstop", "MesaBryce", "Taiga", "MegaTaiga"}, decoration = "mcl_core:deadbush", height = 1, }) @@ -4671,7 +4946,7 @@ local function register_decorations() }, y_min = 4, y_max = mcl_vars.mg_overworld_max, - biomes = {"MesaPlateauFM","MesaPlateauFM_sandlevel"}, + biomes = {"MesaPlateauFM", "MesaPlateauFM_sandlevel"}, decoration = "mcl_core:deadbush", height = 1, }) @@ -4742,8 +5017,8 @@ local function register_decorations() -- Mushrooms next to trees local mushrooms = {"mcl_mushrooms:mushroom_red", "mcl_mushrooms:mushroom_brown"} - local mseeds = { 7133, 8244 } - for m=1, #mushrooms do + local mseeds = {7133, 8244} + for m = 1, #mushrooms do -- Mushrooms next to trees minetest.register_decoration({ deco_type = "simple", @@ -4760,7 +5035,7 @@ local function register_decorations() y_min = 1, y_max = mcl_vars.mg_overworld_max, decoration = mushrooms[m], - spawn_by = { "mcl_core:tree", "mcl_core:sprucetree", "mcl_core:darktree", "mcl_core:birchtree" }, + spawn_by = {"mcl_core:tree", "mcl_core:sprucetree", "mcl_core:darktree", "mcl_core:birchtree"}, num_spawn_by = 1, }) @@ -4780,8 +5055,8 @@ local function register_decorations() y_min = 1, y_max = mcl_vars.mg_overworld_max, decoration = mushrooms[m], - biomes = { "Swampland"}, - spawn_by = { "mcl_core:tree", "mcl_core:sprucetree", "mcl_core:darktree", "mcl_core:birchtree" }, + biomes = {"Swampland"}, + spawn_by = {"mcl_core:tree", "mcl_core:sprucetree", "mcl_core:darktree", "mcl_core:birchtree"}, num_spawn_by = 1, }) end @@ -4805,7 +5080,7 @@ local function register_decorations() y_min = 1, y_max = mcl_vars.mg_overworld_max, biomes = biomes, - decoration = "mcl_flowers:"..name, + decoration = "mcl_flowers:" .. name, }) end if is_in_flower_forest then @@ -4813,8 +5088,8 @@ local function register_decorations() deco_type = "simple", place_on = {"group:grass_block_no_snow", "mcl_core:dirt"}, sidelen = 80, - noise_params= { - offset = 0.0008*40, + noise_params = { + offset = 0.0008 * 40, scale = 0.003, spread = {x = 100, y = 100, z = 100}, seed = seed, @@ -4824,12 +5099,12 @@ local function register_decorations() y_min = 1, y_max = mcl_vars.mg_overworld_max, biomes = {"FlowerForest"}, - decoration = "mcl_flowers:"..name, + decoration = "mcl_flowers:" .. name, }) end end - local flower_biomes1 = {"Plains", "SunflowerPlains", "RoofedForest", "Forest", "BirchForest", "BirchForestM", "Taiga", "ColdTaiga", "Jungle", "JungleM", "JungleEdge", "JungleEdgeM", "Savanna", "SavannaM", "ExtremeHills", "ExtremeHillsM", "ExtremeHills+", "ExtremeHills+_snowtop" } + local flower_biomes1 = {"Plains", "SunflowerPlains", "RoofedForest", "Forest", "BirchForest", "BirchForestM", "Taiga", "ColdTaiga", "Jungle", "JungleM", "JungleEdge", "JungleEdgeM", "Savanna", "SavannaM", "ExtremeHills", "ExtremeHillsM", "ExtremeHills+", "ExtremeHills+_snowtop"} register_flower("dandelion", flower_biomes1, 8) register_flower("poppy", flower_biomes1, 9439) @@ -4853,12 +5128,12 @@ local function register_dimension_decorations() --NETHER WASTES (Nether) minetest.register_decoration({ deco_type = "simple", - place_on = {"mcl_nether:netherrack","mcl_nether:magma"}, + place_on = {"mcl_nether:netherrack", "mcl_nether:magma"}, sidelen = 16, fill_ratio = 0.04, biomes = {"Nether"}, y_min = mcl_vars.mg_lava_nether_max + 1, - y_max = mcl_vars.mg_nether_max - 1, + y_max = mcl_vars.mg_nether_max - 1, flags = "all_floors", decoration = "mcl_fire:eternal_fire", }) @@ -4869,7 +5144,7 @@ local function register_dimension_decorations() fill_ratio = 0.013, biomes = {"Nether"}, y_min = mcl_vars.mg_lava_nether_max + 1, - y_max = mcl_vars.mg_nether_max - 1, + y_max = mcl_vars.mg_nether_max - 1, flags = "all_floors", decoration = "mcl_mushrooms:mushroom_brown", }) @@ -4880,7 +5155,7 @@ local function register_dimension_decorations() fill_ratio = 0.012, biomes = {"Nether"}, y_min = mcl_vars.mg_lava_nether_max + 1, - y_max = mcl_vars.mg_nether_max - 1, + y_max = mcl_vars.mg_nether_max - 1, flags = "all_floors", decoration = "mcl_mushrooms:mushroom_red", }) @@ -4893,7 +5168,7 @@ local function register_dimension_decorations() fill_ratio = 0.02, biomes = {"WarpedForest"}, y_min = mcl_vars.mg_lava_nether_max + 1, - y_max = mcl_vars.mg_nether_max - 10, + y_max = mcl_vars.mg_nether_max - 10, flags = "all_floors", decoration = "mcl_crimson:warped_fungus", }) @@ -4907,7 +5182,7 @@ local function register_dimension_decorations() y_min = mcl_vars.mg_lava_nether_max + 1, y_max = mcl_vars.mg_nether_max - 15, flags = "all_floors, place_center_x, place_center_z", - schematic = mod_mcl_crimson.."/schematics/warped_fungus_1.mts", + schematic = mod_mcl_crimson .. "/schematics/warped_fungus_1.mts", size = {x = 5, y = 11, z = 5}, rotation = "random", }) @@ -4921,7 +5196,7 @@ local function register_dimension_decorations() y_min = mcl_vars.mg_lava_nether_max + 1, y_max = mcl_vars.mg_nether_max - 10, flags = "all_floors, place_center_x, place_center_z", - schematic = mod_mcl_crimson.."/schematics/warped_fungus_2.mts", + schematic = mod_mcl_crimson .. "/schematics/warped_fungus_2.mts", size = {x = 5, y = 6, z = 5}, rotation = "random", }) @@ -4935,13 +5210,13 @@ local function register_dimension_decorations() y_min = mcl_vars.mg_lava_nether_max + 1, y_max = mcl_vars.mg_nether_max - 14, flags = "all_floors, place_center_x, place_center_z", - schematic = mod_mcl_crimson.."/schematics/warped_fungus_3.mts", + schematic = mod_mcl_crimson .. "/schematics/warped_fungus_3.mts", size = {x = 5, y = 12, z = 5}, rotation = "random", }) minetest.register_decoration({ deco_type = "simple", - place_on = {"mcl_crimson:warped_nylium","mcl_crimson:twisting_vines"}, + place_on = {"mcl_crimson:warped_nylium", "mcl_crimson:twisting_vines"}, sidelen = 16, fill_ratio = 0.032, biomes = {"WarpedForest"}, @@ -4980,7 +5255,7 @@ local function register_dimension_decorations() fill_ratio = 0.02, biomes = {"CrimsonForest"}, y_min = mcl_vars.mg_lava_nether_max + 1, - y_max = mcl_vars.mg_nether_max - 10, + y_max = mcl_vars.mg_nether_max - 10, flags = "all_floors", decoration = "mcl_crimson:crimson_fungus", }) @@ -4994,7 +5269,7 @@ local function register_dimension_decorations() y_min = mcl_vars.mg_lava_nether_max + 1, y_max = mcl_vars.mg_nether_max - 10, flags = "all_floors, place_center_x, place_center_z", - schematic = mod_mcl_crimson.."/schematics/crimson_fungus_1.mts", + schematic = mod_mcl_crimson .. "/schematics/crimson_fungus_1.mts", size = {x = 5, y = 8, z = 5}, rotation = "random", }) @@ -5008,7 +5283,7 @@ local function register_dimension_decorations() y_min = mcl_vars.mg_lava_nether_max + 1, y_max = mcl_vars.mg_nether_max - 15, flags = "all_floors, place_center_x, place_center_z", - schematic = mod_mcl_crimson.."/schematics/crimson_fungus_2.mts", + schematic = mod_mcl_crimson .. "/schematics/crimson_fungus_2.mts", size = {x = 5, y = 12, z = 5}, rotation = "random", }) @@ -5022,13 +5297,13 @@ local function register_dimension_decorations() y_min = mcl_vars.mg_lava_nether_max + 1, y_max = mcl_vars.mg_nether_max - 20, flags = "all_floors, place_center_x, place_center_z", - schematic = mod_mcl_crimson.."/schematics/crimson_fungus_3.mts", + schematic = mod_mcl_crimson .. "/schematics/crimson_fungus_3.mts", size = {x = 7, y = 13, z = 7}, rotation = "random", }) minetest.register_decoration({ deco_type = "simple", - place_on = {"mcl_crimson:warped_nylium","mcl_crimson:weeping_vines","mcl_nether:netherrack"}, + place_on = {"mcl_crimson:warped_nylium", "mcl_crimson:weeping_vines", "mcl_nether:netherrack"}, sidelen = 16, fill_ratio = 0.063, biomes = {"CrimsonForest"}, @@ -5054,7 +5329,7 @@ local function register_dimension_decorations() --SOULSAND VALLEY minetest.register_decoration({ deco_type = "simple", - place_on = {"mcl_blackstone:soul_soil","mcl_nether:soul_sand"}, + place_on = {"mcl_blackstone:soul_soil", "mcl_nether:soul_sand"}, sidelen = 16, fill_ratio = 0.062, biomes = {"SoulsandValley"}, @@ -5065,49 +5340,49 @@ local function register_dimension_decorations() }) minetest.register_decoration({ deco_type = "schematic", - place_on = {"mcl_blackstone:soul_soil","mcl_nether:soulsand"}, + place_on = {"mcl_blackstone:soul_soil", "mcl_nether:soulsand"}, sidelen = 16, fill_ratio = 0.000212, biomes = {"SoulsandValley"}, y_min = mcl_vars.mg_lava_nether_max + 1, flags = "all_floors, place_center_x, place_center_z", - schematic = mod_mcl_blackstone.."/schematics/mcl_blackstone_nether_fossil_1.mts", + schematic = mod_mcl_blackstone .. "/schematics/mcl_blackstone_nether_fossil_1.mts", size = {x = 5, y = 8, z = 5}, rotation = "random", }) minetest.register_decoration({ deco_type = "schematic", - place_on = {"mcl_blackstone:soul_soil","mcl_nether:soulsand"}, + place_on = {"mcl_blackstone:soul_soil", "mcl_nether:soulsand"}, sidelen = 16, fill_ratio = 0.0002233, biomes = {"SoulsandValley"}, y_min = mcl_vars.mg_lava_nether_max + 1, flags = "all_floors, place_center_x, place_center_z", - schematic = mod_mcl_blackstone.."/schematics/mcl_blackstone_nether_fossil_2.mts", + schematic = mod_mcl_blackstone .. "/schematics/mcl_blackstone_nether_fossil_2.mts", size = {x = 5, y = 8, z = 5}, rotation = "random", }) minetest.register_decoration({ deco_type = "schematic", - place_on = {"mcl_blackstone:soul_soil","mcl_nether:soulsand"}, + place_on = {"mcl_blackstone:soul_soil", "mcl_nether:soulsand"}, sidelen = 16, fill_ratio = 0.000225, biomes = {"SoulsandValley"}, y_min = mcl_vars.mg_lava_nether_max + 1, flags = "all_floors, place_center_x, place_center_z", - schematic = mod_mcl_blackstone.."/schematics/mcl_blackstone_nether_fossil_3.mts", + schematic = mod_mcl_blackstone .. "/schematics/mcl_blackstone_nether_fossil_3.mts", size = {x = 5, y = 8, z = 5}, rotation = "random", }) minetest.register_decoration({ deco_type = "schematic", - place_on = {"mcl_blackstone:soul_soil","mcl_nether:soulsand"}, + place_on = {"mcl_blackstone:soul_soil", "mcl_nether:soulsand"}, sidelen = 16, fill_ratio = 0.00022323, biomes = {"SoulsandValley"}, y_min = mcl_vars.mg_lava_nether_max + 1, flags = "all_floors, place_center_x, place_center_z", - schematic = mod_mcl_blackstone.."/schematics/mcl_blackstone_nether_fossil_4.mts", + schematic = mod_mcl_blackstone .. "/schematics/mcl_blackstone_nether_fossil_4.mts", size = {x = 5, y = 8, z = 5}, rotation = "random", }) @@ -5115,10 +5390,10 @@ local function register_dimension_decorations() minetest.register_decoration({ deco_type = "simple", decoration = "mcl_blackstone:basalt", - place_on = {"mcl_blackstone:basalt","mcl_nether:netherrack","mcl_blackstone:blackstone"}, + place_on = {"mcl_blackstone:basalt", "mcl_nether:netherrack", "mcl_blackstone:blackstone"}, sidelen = 80, height_max = 55, - noise_params={ + noise_params = { offset = -0.0085, scale = 0.002, spread = {x = 25, y = 120, z = 25}, @@ -5136,10 +5411,10 @@ local function register_dimension_decorations() minetest.register_decoration({ deco_type = "simple", decoration = "mcl_blackstone:basalt", - place_on = {"mcl_blackstone:basalt","mcl_nether:netherrack","mcl_blackstone:blackstone"}, + place_on = {"mcl_blackstone:basalt", "mcl_nether:netherrack", "mcl_blackstone:blackstone"}, sidelen = 80, height_max = 15, - noise_params={ + noise_params = { offset = -0.0085, scale = 0.004, spread = {x = 25, y = 120, z = 25}, @@ -5157,7 +5432,7 @@ local function register_dimension_decorations() minetest.register_decoration({ deco_type = "simple", decoration = "mcl_blackstone:basalt", - place_on = {"mcl_blackstone:basalt","mcl_nether:netherrack","mcl_blackstone:blackstone"}, + place_on = {"mcl_blackstone:basalt", "mcl_nether:netherrack", "mcl_blackstone:blackstone"}, sidelen = 80, height_max = 3, fill_ratio = 0.4, @@ -5169,24 +5444,24 @@ local function register_dimension_decorations() minetest.register_decoration({ deco_type = "simple", decoration = "mcl_nether:magma", - place_on = {"mcl_blackstone:basalt","mcl_nether:netherrack","mcl_blackstone:blackstone"}, + place_on = {"mcl_blackstone:basalt", "mcl_nether:netherrack", "mcl_blackstone:blackstone"}, sidelen = 80, fill_ratio = 0.082323, biomes = {"BasaltDelta"}, - place_offset_y = -1, + place_offset_y = -1, y_min = mcl_vars.mg_lava_nether_max + 1, flags = "all_floors, all ceilings", }) minetest.register_decoration({ deco_type = "simple", decoration = "mcl_nether:nether_lava_source", - place_on = {"mcl_blackstone:basalt","mcl_nether:netherrack","mcl_blackstone:blackstone"}, - spawn_by = {"mcl_blackstone:basalt","mcl_blackstone:blackstone"}, + place_on = {"mcl_blackstone:basalt", "mcl_nether:netherrack", "mcl_blackstone:blackstone"}, + spawn_by = {"mcl_blackstone:basalt", "mcl_blackstone:blackstone"}, num_spawn_by = 14, sidelen = 80, fill_ratio = 4, biomes = {"BasaltDelta"}, - place_offset_y = -1, + place_offset_y = -1, y_min = mcl_vars.mg_lava_nether_max + 1, y_max = mcl_vars.mg_nether_max - 5, flags = "all_floors, force_placement", @@ -5214,7 +5489,7 @@ local function register_dimension_decorations() decoration = "mcl_end:chorus_plant", height = 1, height_max = 8, - biomes = { "End", "EndMidlands", "EndHighlands", "EndBarrens", "EndSmallIslands" }, + biomes = {"End", "EndMidlands", "EndHighlands", "EndBarrens", "EndSmallIslands"}, }) minetest.register_decoration({ name = "mcl_biomes:chorus_plant", @@ -5235,17 +5510,18 @@ local function register_dimension_decorations() y_max = mcl_vars.mg_end_max, decoration = "mcl_end:chorus_flower", height = 1, - biomes = { "End", "EndMidlands", "EndHighlands", "EndBarrens", "EndSmallIslands" }, + biomes = {"End", "EndMidlands", "EndHighlands", "EndBarrens", "EndSmallIslands"}, }) deco_id_chorus_plant = minetest.get_decoration_id("mcl_biomes:chorus_plant") - minetest.set_gen_notify({decoration=true}, { deco_id_chorus_plant }) + minetest.set_gen_notify({decoration = true}, {deco_id_chorus_plant}) -- TODO: End cities end + -- -- Detect mapgen to select functions -- @@ -5276,7 +5552,7 @@ if mg_name ~= "singlenode" then -- Overworld decorations for v6 are handled in mcl_mapgen_core - local deco_ids_fungus ={ + local deco_ids_fungus = { minetest.get_decoration_id("mcl_biomes:crimson_tree1"), minetest.get_decoration_id("mcl_biomes:crimson_tree2"), minetest.get_decoration_id("mcl_biomes:crimson_tree3"), @@ -5289,51 +5565,55 @@ if mg_name ~= "singlenode" then minetest.get_decoration_id("mcl_biomes:mangrove_tree_2"), minetest.get_decoration_id("mcl_biomes:mangrove_tree_3"), } - for _,f in pairs(deco_ids_fungus) do - minetest.set_gen_notify({decoration=true}, { f }) + for _, f in pairs(deco_ids_fungus) do + minetest.set_gen_notify({decoration = true}, {f}) end - for _,f in pairs(deco_ids_trees) do - minetest.set_gen_notify({decoration=true}, { f }) + for _, f in pairs(deco_ids_trees) do + minetest.set_gen_notify({decoration = true}, {f}) end if deco_id_chorus_plant or deco_ids_fungus or deco_ids_trees then mcl_mapgen_core.register_generator("chorus_grow", nil, function(minp, maxp, blockseed) local gennotify = minetest.get_mapgen_object("gennotify") local pr = PseudoRandom(blockseed + 14) - for _,f in pairs(deco_ids_trees) do - for _, pos in ipairs(gennotify["decoration#"..f] or {}) do - local nn=minetest.find_nodes_in_area(vector.offset(pos,-8,-1,-8),vector.offset(pos,8,0,8),{"mcl_mangrove:mangrove_roots"}) - for _,v in pairs(nn) do - local l = pr:next(2,16) - local n = minetest.get_node(vector.offset(v,0,-1,0)).name - if minetest.get_item_group(n,"water") > 0 then + for _, f in pairs(deco_ids_trees) do + for _, pos in ipairs(gennotify["decoration#" .. f] or {}) do + local nn = minetest.find_nodes_in_area(vector.offset(pos, -8, -1, -8), vector.offset(pos, 8, 0, 8), {"mcl_mangrove:mangrove_roots"}) + for _, v in pairs(nn) do + local l = pr:next(2, 16) + local n = minetest.get_node(vector.offset(v, 0, -1, 0)).name + if minetest.get_item_group(n, "water") > 0 then local wl = "mcl_mangrove:water_logged_roots" if n:find("river") then wl = "mcl_mangrove:river_water_logged_roots" end - minetest.bulk_set_node(minetest.find_nodes_in_area(vector.offset(v,0,0,0),vector.offset(v,0,-l,0),{"group:water"}),{name=wl}) + minetest.bulk_set_node(minetest.find_nodes_in_area(vector.offset(v, 0, 0, 0), vector.offset(v, 0, -l, 0), {"group:water"}), {name = wl}) elseif n == "mcl_mud:mud" then - minetest.bulk_set_node(minetest.find_nodes_in_area(vector.offset(v,0,0,0),vector.offset(v,0,-l,0),{"mcl_mud:mud"}),{name="mcl_mangrove:mangrove_mud_roots"}) + minetest.bulk_set_node(minetest.find_nodes_in_area(vector.offset(v, 0, 0, 0), vector.offset(v, 0, -l, 0), {"mcl_mud:mud"}), {name = "mcl_mangrove:mangrove_mud_roots"}) elseif n == "air" then - minetest.bulk_set_node(minetest.find_nodes_in_area(vector.offset(v,0,0,0),vector.offset(v,0,-l,0),{"air"}),{name="mcl_mangrove:mangrove_roots"}) + minetest.bulk_set_node(minetest.find_nodes_in_area(vector.offset(v, 0, 0, 0), vector.offset(v, 0, -l, 0), {"air"}), {name = "mcl_mangrove:mangrove_roots"}) end end end end - if minp.y > -26900 then return end - for _, pos in ipairs(gennotify["decoration#"..deco_id_chorus_plant] or {}) do + if minp.y > -26900 then + return + end + for _, pos in ipairs(gennotify["decoration#" .. deco_id_chorus_plant] or {}) do local x, y, z = pos.x, pos.y, pos.z if x < -10 or x > 10 or z < -10 or z > 10 then - local realpos = { x = x, y = y + 1, z = z } + local realpos = {x = x, y = y + 1, z = z} local node = minetest.get_node(realpos) if node and node.name == "mcl_end:chorus_flower" then mcl_end.grow_chorus_plant(realpos, node, pr) end end end - if minp.y > mcl_vars.mg_nether_max then return end - for _,f in pairs(deco_ids_fungus) do - for _, pos in ipairs(gennotify["decoration#"..f] or {}) do - minetest.fix_light(vector.offset(pos,-8,-8,-8),vector.offset(pos,8,8,8)) + if minp.y > mcl_vars.mg_nether_max then + return + end + for _, f in pairs(deco_ids_fungus) do + for _, pos in ipairs(gennotify["decoration#" .. f] or {}) do + minetest.fix_light(vector.offset(pos, -8, -8, -8), vector.offset(pos, 8, 8, 8)) end end end) From 2b11b5c17a5ca3743127ae46667827c3e350c74b Mon Sep 17 00:00:00 2001 From: Michieal Date: Wed, 21 Dec 2022 22:22:51 -0500 Subject: [PATCH 007/105] Added full node names for bamboo on_place. Added in bamboo top destruct. Removed mapgen.lua. --- mods/ITEMS/mcl_bamboo/init.lua | 68 +++++++++++++++++++++----------- mods/ITEMS/mcl_bamboo/mapgen.lua | 60 ---------------------------- 2 files changed, 46 insertions(+), 82 deletions(-) delete mode 100644 mods/ITEMS/mcl_bamboo/mapgen.lua diff --git a/mods/ITEMS/mcl_bamboo/init.lua b/mods/ITEMS/mcl_bamboo/init.lua index a5aa36d1a..b147e69bb 100644 --- a/mods/ITEMS/mcl_bamboo/init.lua +++ b/mods/ITEMS/mcl_bamboo/init.lua @@ -8,12 +8,7 @@ local modname = minetest.get_current_modname() local S = minetest.get_translator(modname) local bamboo = "mcl_bamboo:bamboo" -local adj_nodes = { - vector.new(0, 0, 1), - vector.new(0, 0, -1), - vector.new(1, 0, 0), - vector.new(-1, 0, 0), -} + local node_sound = mcl_sounds.node_sound_wood_defaults() -- CONSTS @@ -27,13 +22,13 @@ local bamboo_dirt_nodes = { "mcl_core:redsand", "mcl_core:sand", "mcl_core:dirt", -"mcl_core:coarse_dirt", -"mcl_core:dirt_with_grass", -"mcl_core:podzol", -"mcl_core:mycelium", -"mcl_lush_caves:rooted_dirt", -"mcl_lush_caves:moss", -"mcl_mud:mud", + "mcl_core:coarse_dirt", + "mcl_core:dirt_with_grass", + "mcl_core:podzol", + "mcl_core:mycelium", + "mcl_lush_caves:rooted_dirt", + "mcl_lush_caves:moss", + "mcl_mud:mud", } -- Due to door fix #2736, doors are displayed backwards. When this is fixed, set this variable to false. @@ -126,7 +121,14 @@ local function create_nodes() if node.name ~= "mcl_bamboo:bamboo" then if node.name ~= "mcl_flowerpots:flower_pot" then - if minetest.get_item_group(node.name, "dirt") == 0 then + local found = false + for i = 1, #bamboo_dirt_nodes do + if node.name == bamboo_dirt_nodes[i] then + found = true + break + end + end + if not found then return itemstack end end @@ -143,13 +145,18 @@ local function create_nodes() -- Node destructor; called before removing node. 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 == bamboo then 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) + elseif node_above and node_above.name == "mcl_bamboo:bamboo_endcap" then minetest.remove_node(new_pos) minetest.sound_play(node_sound.dug, sound_params, true) local istack = ItemStack("mcl_bamboo:bamboo") @@ -157,9 +164,10 @@ local function create_nodes() end end, } - minetest.register_node("mcl_bamboo:bamboo", bamboo_def) + minetest.register_node(bamboo, bamboo_def) local bamboo_top = table.copy(bamboo_def) bamboo_top.groups = {not_in_creative_inventory = 1, handy = 1, axey = 1, choppy = 1, flammable = 3} + bamboo_top.drops = bamboo bamboo_top.on_place = function(itemstack, placer, pointed_thing) if pointed_thing.type ~= "node" then @@ -200,7 +208,26 @@ local function create_nodes() minetest.log("mcl_bamboo::placing bamboo directly.") end return minetest.item_place(itemstack, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under))) - end, + end + --[[ + bamboo_top.on_destruct = function(pos) + -- Node destructor; called before removing node. + local node = minetest.get_node(pos) + if node and node.name == "mcl_bamboo:bamboo_endcap" then + local sound_params = { + pos = pos, + gain = 1.0, -- default + max_hear_distance = 10, -- default, uses a Euclidean metric + } + + minetest.remove_node(pos) + minetest.sound_play(node_sound.dug, sound_params, true) + local istack = ItemStack("mcl_bamboo:bamboo") + minetest.add_item(pos, istack) + end + + end + ]] minetest.register_node("mcl_bamboo:bamboo_endcap", bamboo_top) @@ -732,9 +759,6 @@ end create_nodes() register_craftings() --- MAPGEN -dofile(minetest.get_modpath(modname) .. "/mapgen.lua") - -- BAMBOO_TOO (Bamboo two) dofile(minetest.get_modpath(modname) .. "/bambootoo.lua") @@ -745,8 +769,8 @@ minetest.register_abm({ nodenames = {"mcl_bamboo:bamboo"}, interval = 40, chance = 40, - action = function(pos, node) - local soil_pos = nil + action = function(pos, _) + local soil_pos if minetest.get_node_light(pos) < 8 then return end diff --git a/mods/ITEMS/mcl_bamboo/mapgen.lua b/mods/ITEMS/mcl_bamboo/mapgen.lua deleted file mode 100644 index 8fa61ca54..000000000 --- a/mods/ITEMS/mcl_bamboo/mapgen.lua +++ /dev/null @@ -1,60 +0,0 @@ -local item_water, item_dirt, item_grass - -item_water = "mcl_core:water_source" -item_dirt = "mcl_core:dirt" -item_grass = "mcl_core:dirt_with_grass" -local function make_bamboo(pos, size) - for y = 0, size - 1 do - local p = {x = pos.x, y = pos.y + y, z = pos.z} - if minetest.get_node(p).name ~= "air" then - return - end - minetest.set_node(p, {name = "mcl_bamboo:bamboo"}) - end -end - -minetest.register_on_generated(function(minp, maxp, seed) - if maxp.y < 2 and minp.y > 0 then - return - end - - local c_grass = minetest.get_content_id(item_grass) - local n_bamboo = minetest.get_perlin(8234, 3, 0.6, 100) - - local vm = minetest.get_voxel_manip() - local emin, emax = vm:read_from_map(minp, maxp) - local area = VoxelArea:new {MinEdge = emin, MaxEdge = emax} - local data = vm:get_data() - - local rand = PseudoRandom(seed % 8000) - for z = minp.z + 2, maxp.z - 2, 4 do - for x = minp.x + 2, maxp.x - 2, 4 do - local bamboo_amount = math.floor(n_bamboo:get_2d({x = x, y = z}) * 7 - 3) - for i = 1, bamboo_amount do - local p_pos = { - x = rand:next(x - 2, x + 2), - y = 0, - z = rand:next(z - 2, z + 2) - } - - local found = false - local node = -1 - for y = 4, 0, -1 do - p_pos.y = y - node = data[area:index(p_pos.x, p_pos.y, p_pos.z)] - if node == c_grass then - found = true - break - end - end - - if found and - minetest.find_node_near(p_pos, 5, {"group:water", item_water}) then - p_pos.y = p_pos.y + 1 - make_bamboo(p_pos, rand:next(4, 12)) - end - end - end - end -end -) From b0978d275d7de223b18e47de0a2392fca1c045fb Mon Sep 17 00:00:00 2001 From: Michieal Date: Thu, 22 Dec 2022 16:08:05 -0500 Subject: [PATCH 008/105] Abstracted variables in bamboo abm. Fix Base scaffolding in Creative mode. Fixed Lua Warnings. --- mods/ITEMS/mcl_bamboo/init.lua | 62 ++++++++++++++++++++++++---------- 1 file changed, 44 insertions(+), 18 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/init.lua b/mods/ITEMS/mcl_bamboo/init.lua index b147e69bb..8a8be302c 100644 --- a/mods/ITEMS/mcl_bamboo/init.lua +++ b/mods/ITEMS/mcl_bamboo/init.lua @@ -15,7 +15,6 @@ local node_sound = mcl_sounds.node_sound_wood_defaults() local SIDE_SCAFFOLDING = false local MAKE_STAIRS = true local DEBUG = false -local USE_END_CAPS = false --Bamboo can be planted on moss blocks, grass blocks, dirt, coarse dirt, rooted dirt, gravel, mycelium, podzol, sand, red sand, or mud local bamboo_dirt_nodes = { @@ -570,6 +569,7 @@ local function create_nodes() _mcl_blast_resistance = 0, _mcl_hardness = 0, on_place = function(itemstack, placer, ptd) + local scaff_node_name = "mcl_bamboo:scaffolding" if SIDE_SCAFFOLDING then -- count param2 up when placing to the sides. Fall when > 6 local ctrl = placer:get_player_control() @@ -586,29 +586,51 @@ local function create_nodes() return itemstack end end + if DEBUG then + minetest.log("mcl_bamboo::Checking for protected placement of scaffolding.") + end + local node = minetest.get_node(ptd.under) + local pos = ptd.under + local pname = placer:get_player_name() + if minetest.is_protected(pos, pname) then + minetest.record_protection_violation(pos, pname) + return + end + if DEBUG then + minetest.log("mcl_bamboo::placement of scaffolding is not protected.") + end --place on solid nodes - local node = minetest.get_node(ptd.under) if itemstack:get_name() ~= node.name then - minetest.set_node(ptd.above, {name = "mcl_bamboo:scaffolding", param2 = 0}) - itemstack:take_item(1) + minetest.set_node(ptd.above, {name = scaff_node_name, param2 = 0}) + if not minetest.is_creative_enabled(placer:get_player_name()) then + itemstack:take_item(1) + end return itemstack end --build up when placing on existing scaffold local h = 0 - local pos = ptd.under repeat pos.y = pos.y + 1 - h = h + 1 local cn = minetest.get_node(pos) + local cnb = minetest.get_node(ptd.under) + local bn = minetest.get_node(vector.offset(ptd.under, 0, -1, 0)) if cn.name == "air" then + -- first step to making scaffolding work like Minecraft scaffolding. + if cnb.name == scaff_node_name and bn == scaff_node_name and SIDE_SCAFFOLDING == false then + return itemstack + end + minetest.set_node(pos, node) - itemstack:take_item(1) + if not minetest.is_creative_enabled(placer:get_player_name()) then + itemstack:take_item(1) + end placer:set_wielded_item(itemstack) return itemstack end - until cn.name ~= node.name or h >= 32 + h = h + 1 + until cn.name ~= node.name or itemstack:get_count() == 0 or h >= 128 end, on_destruct = function(pos) -- Node destructor; called before removing node. @@ -762,11 +784,13 @@ register_craftings() -- BAMBOO_TOO (Bamboo two) dofile(minetest.get_modpath(modname) .. "/bambootoo.lua") -local BAMBOO_MAX_HEIGHT_CHECK = -16 +local BAMBOO_SOIL_DIST = -16 +local BAM_MAX_HEIGHT_STCHK = 11 +local BAM_MAX_HEIGHT_TOP = 15 --ABMs minetest.register_abm({ - nodenames = {"mcl_bamboo:bamboo"}, + nodenames = {bamboo}, interval = 40, chance = 40, action = function(pos, _) @@ -775,7 +799,7 @@ minetest.register_abm({ return end local found_soil = false - for py = -1, BAMBOO_MAX_HEIGHT_CHECK, -1 do + for py = -1, BAMBOO_SOIL_DIST, -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 @@ -789,14 +813,16 @@ minetest.register_abm({ if not found_soil then return end - for py = 1, 14 do + for py = 1, 15 do local npos = vector.offset(pos, 0, py, 0) local name = minetest.get_node(npos).name - if vector.distance(soil_pos, npos) >= 15 then + local dist = vector.distance(soil_pos, npos) + if dist >= BAM_MAX_HEIGHT_STCHK then -- stop growing check. - if USE_END_CAPS then - if name == "air" then - minetest.set_node(npos, {name = "mcl_bamboo:bamboo_top"}) + if name == "air" then + local height = math.random(BAM_MAX_HEIGHT_STCHK, BAM_MAX_HEIGHT_TOP) + if height == dist then + minetest.set_node(npos, {name = "mcl_bamboo:bamboo_endcap"}) end end break @@ -804,7 +830,7 @@ minetest.register_abm({ if name == "air" then minetest.set_node(npos, {name = "mcl_bamboo:bamboo"}) break - elseif name ~= "mcl_bamboo:bamboo" then + elseif name ~= bamboo then break end end @@ -827,7 +853,7 @@ minetest.register_alias("mcl_scaffolding:scaffolding_horizontal", "mcl_bamboo:sc todo -- make scaffolds do side scaffold blocks, so that they jut out. todo -- Also, make those blocks collapse (break) when a nearby connected scaffold breaks. todo -- add in alternative bamboo styles to simulate random placement. (see commented out node box definitions. -todo -- make endcap node for bamboo, so that they can be 12-16 nodes high and stop growing. +todo -- Add Flourish to the endcap node for bamboo. todo -- mash all of that together so that it drops as one item, and chooses what version to be, in on_place. todo -- Raft todo -- Raft with Chest. From 42f8fbf9b86dfe8b7e908b9b86e9f6af0aef3991 Mon Sep 17 00:00:00 2001 From: Michieal Date: Fri, 23 Dec 2022 17:27:01 -0500 Subject: [PATCH 009/105] Added in Fuel Recipes for bamboo slabs / stairs; including mosaics. Finished Bamboo Mosaic nodes. --- mods/ITEMS/mcl_bamboo/bambootoo.lua | 35 +++++++++++++---------------- mods/ITEMS/mcl_bamboo/init.lua | 26 +++++++++++++++------ 2 files changed, 34 insertions(+), 27 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/bambootoo.lua b/mods/ITEMS/mcl_bamboo/bambootoo.lua index 11b47b83c..17de9dd75 100644 --- a/mods/ITEMS/mcl_bamboo/bambootoo.lua +++ b/mods/ITEMS/mcl_bamboo/bambootoo.lua @@ -24,15 +24,16 @@ local function bambootoo_create_nodes() bamboo_mosaic.description = S("Bamboo Mosaic Plank") bamboo_mosaic._doc_items_longdesc = S("Bamboo Mosaic Plank") minetest.register_node("mcl_bamboo:bamboo_mosaic",bamboo_mosaic) + -- crafted by "mcl_stair:slab_bamboo_plank", "mcl_stair:slab_bamboo_block", "mcl_stair:slab_bamboo_stripped" if minetest.get_modpath("mcl_stairs") then if mcl_stairs ~= nil then mcl_stairs.register_stair_and_slab_simple( "bamboo_mosaic", "mcl_bamboo:bamboo_mosaic", - S("Bamboo Stair"), - S("Bamboo Slab"), - S("Double Bamboo Slab") + S("Bamboo Mosaic Stair"), + S("Bamboo Mosaic Slab"), + S("Double Bamboo Mosaic Slab") ) end end @@ -91,22 +92,6 @@ local function bambootoo_register_craftings() } }) - minetest.register_craft({ - output = bamboo .. "_mosaic", - recipe = { - {"mcl_stair:slab_bamboo_block"}, - {"mcl_stair:slab_bamboo_block"}, - } - }) - - minetest.register_craft({ - output = bamboo .. "_mosaic", - recipe = { - {"mcl_stair:slab_bamboo_stripped"}, - {"mcl_stair:slab_bamboo_stripped"}, - } - }) - -- Fuels... minetest.register_craft({ @@ -114,9 +99,19 @@ local function bambootoo_register_craftings() recipe = bamboo .. "_mosaic", burntime = 7.5, }) + minetest.register_craft({ + type = "fuel", + recipe = "mcl_stairs:slab_bamboo_mosaic", + burntime = 7.5, + }) + minetest.register_craft({ + type = "fuel", + recipe = "mcl_stairs:stair_bamboo_mosaic", + burntime = 15, + }) end bambootoo_create_nodes() -bambootoo_register_craftings() \ No newline at end of file +bambootoo_register_craftings() diff --git a/mods/ITEMS/mcl_bamboo/init.lua b/mods/ITEMS/mcl_bamboo/init.lua index 8a8be302c..b98cb6916 100644 --- a/mods/ITEMS/mcl_bamboo/init.lua +++ b/mods/ITEMS/mcl_bamboo/init.lua @@ -770,6 +770,22 @@ local function register_craftings() burntime = 7.5, }) + minetest.register_craft({ + type = "fuel", + recipe = "mcl_stairs:stair_bamboo_plank", + burntime = 15, + }) + minetest.register_craft({ + type = "fuel", + recipe = "mcl_stairs:stair_bamboo_block", + burntime = 15, + }) + minetest.register_craft({ + type = "fuel", + recipe = "mcl_stairs:stair_bamboo_stripped", + burntime = 15, + }) + minetest.register_craft({ type = "fuel", recipe = "mesecons_button:button_bamboo_off", @@ -858,15 +874,11 @@ todo -- mash all of that together so that it drops as one item, and chooses what todo -- Raft todo -- Raft with Chest. todo -- Add in Extras. -todo: Added a new "Mosaic" plank variant that is unique to Bamboo called Bamboo Mosaic - It can be crafted with 1x2 Bamboo Slabs in a vertical strip +todo -- [X] Added a new "Mosaic" plank variant that is unique to Bamboo called Bamboo Mosaic + It can be crafted with 1x2 Bamboo (plank) Slabs in a vertical strip 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. - -todo -- add in fuel recipes for: - [-] bamboo slab + stripped bamboo slab - [-] bamboo stair + stripped bamboo stair + bamboo plank stair + used as fuel. [Done] todo -- fix scaffolding placing, instead of using on_rightclick first. --]] From c55332bf425c7d1f050d9ab6e6f1f26517c03588 Mon Sep 17 00:00:00 2001 From: Michieal Date: Sat, 24 Dec 2022 00:57:44 -0500 Subject: [PATCH 010/105] Change mod.conf and readme's depends. Optipng images, after adding in bamboo top image. Try out a plantlike style top node for bamboo stalks. Make Bamboo drop 1-2 bamboo. Fix Bamboo top drops. --- mods/ITEMS/mcl_bamboo/README.md | 12 +- mods/ITEMS/mcl_bamboo/bambootoo.lua | 29 ++-- mods/ITEMS/mcl_bamboo/init.lua | 155 +++++++----------- mods/ITEMS/mcl_bamboo/mod.conf | 2 +- .../mcl_bamboo_bamboo_plank_mosaic.png | Bin 520 -> 389 bytes .../textures/mcl_bamboo_door_wield.png | Bin 1394 -> 1392 bytes .../mcl_bamboo/textures/mcl_bamboo_endcap.png | Bin 0 -> 941 bytes .../textures/mcl_bamboo_fence_bamboo.png | Bin 388 -> 205 bytes .../textures/mcl_bamboo_fence_gate_bamboo.png | Bin 371 -> 206 bytes 9 files changed, 84 insertions(+), 114 deletions(-) create mode 100644 mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_endcap.png diff --git a/mods/ITEMS/mcl_bamboo/README.md b/mods/ITEMS/mcl_bamboo/README.md index e330cf202..9bd5523d3 100644 --- a/mods/ITEMS/mcl_bamboo/README.md +++ b/mods/ITEMS/mcl_bamboo/README.md @@ -1,9 +1,9 @@ mcl_bamboo ========= -This mod adds simple bamboo nodes to your Mineclone 2 world. +This mod adds minecraft-like bamboo nodes to your Mineclone 2 world. -Code redo for Mineclone 2: Michieal. Original bamboo code by: Krock. +Code: Michieal. Original (basic) bamboo code by: Krock. License for code: GPL3; images / textures: CC-BY-SA. Images Created by Michieal, except for: @@ -11,9 +11,11 @@ Inventory / wield image: created by RandomLegoBrick#8692 and is CC0. Dependencies: mcl_core, mcl_sounds, mcl_tools -Optional Dependencies = mcl_flowerpots, mclx_stairs, mcl_doors, mcl_signs, mesecons_pressureplates, mcl_fences, mesecons_button +Optional Dependencies = mcl_flowerpots, mclx_stairs, mcl_doors, mcl_signs, mesecons_pressureplates, mcl_fences, mesecons_button, mcl_boats Special thanks to Nicu for help with the nodebox stalk design. -Original code's forum topic: -Forum topic: https://forum.minetest.net/viewtopic.php?id=8289 \ No newline at end of file +Krock's bamboo forum topic: +Forum topic: https://forum.minetest.net/viewtopic.php?id=8289 + +Scaffold inspiration: Cora, because she said that it couldn't be done. \ No newline at end of file diff --git a/mods/ITEMS/mcl_bamboo/bambootoo.lua b/mods/ITEMS/mcl_bamboo/bambootoo.lua index 17de9dd75..2df7cd42a 100644 --- a/mods/ITEMS/mcl_bamboo/bambootoo.lua +++ b/mods/ITEMS/mcl_bamboo/bambootoo.lua @@ -16,14 +16,13 @@ local adj_nodes = { } local SIDE_SCAFFOLDING = false - local function bambootoo_create_nodes() local bamboo_mosaic = minetest.registered_nodes[bamboo .. "_plank"] bamboo_mosaic.tiles = {"mcl_bamboo_bamboo_plank.png"} bamboo_mosaic.groups = {handy = 1, axey = 1, flammable = 3, fire_encouragement = 5, fire_flammability = 20} bamboo_mosaic.description = S("Bamboo Mosaic Plank") bamboo_mosaic._doc_items_longdesc = S("Bamboo Mosaic Plank") - minetest.register_node("mcl_bamboo:bamboo_mosaic",bamboo_mosaic) + minetest.register_node("mcl_bamboo:bamboo_mosaic", bamboo_mosaic) -- crafted by "mcl_stair:slab_bamboo_plank", "mcl_stair:slab_bamboo_block", "mcl_stair:slab_bamboo_stripped" if minetest.get_modpath("mcl_stairs") then @@ -99,19 +98,21 @@ local function bambootoo_register_craftings() recipe = bamboo .. "_mosaic", burntime = 7.5, }) - minetest.register_craft({ - type = "fuel", - recipe = "mcl_stairs:slab_bamboo_mosaic", - burntime = 7.5, - }) - minetest.register_craft({ - type = "fuel", - recipe = "mcl_stairs:stair_bamboo_mosaic", - burntime = 15, - }) - + if minetest.get_modpath("mcl_stairs") then + if mcl_stairs ~= nil then + minetest.register_craft({ + type = "fuel", + recipe = "mcl_stairs:slab_bamboo_mosaic", + burntime = 7.5, + }) + minetest.register_craft({ + type = "fuel", + recipe = "mcl_stairs:stair_bamboo_mosaic", + burntime = 15, + }) + end + end end - bambootoo_create_nodes() bambootoo_register_craftings() diff --git a/mods/ITEMS/mcl_bamboo/init.lua b/mods/ITEMS/mcl_bamboo/init.lua index b98cb6916..a6fee7c32 100644 --- a/mods/ITEMS/mcl_bamboo/init.lua +++ b/mods/ITEMS/mcl_bamboo/init.lua @@ -15,6 +15,8 @@ local node_sound = mcl_sounds.node_sound_wood_defaults() local SIDE_SCAFFOLDING = false local MAKE_STAIRS = true local DEBUG = false +local DOUBLE_DROP_CHANCE = 8 + --Bamboo can be planted on moss blocks, grass blocks, dirt, coarse dirt, rooted dirt, gravel, mycelium, podzol, sand, red sand, or mud local bamboo_dirt_nodes = { @@ -62,17 +64,40 @@ local function create_nodes() paramtype = "light", groups = {handy = 1, axey = 1, choppy = 1, flammable = 3}, sounds = node_sound, - drops = "mcl_bamboo:bamboo", + + drop = { + max_items = 1, + -- Maximum number of item lists to drop. + -- The entries in 'items' are processed in order. For each: + -- Item filtering is applied, chance of drop is applied, if both are + -- successful the entire item list is dropped. + -- Entry processing continues until the number of dropped item lists + -- equals 'max_items'. + -- Therefore, entries should progress from low to high drop chance. + items = { + -- Examples: + { + -- 1 in 100 chance of dropping. + -- Default rarity is '1'. + rarity = DOUBLE_DROP_CHANCE, + items = {bamboo .. " 2"}, + }, + { + -- 1 in 2 chance of dropping. + -- Default rarity is '1'. + rarity = 1, + items = {bamboo}, + }, + }, + }, + inventory_image = "mcl_bamboo_bamboo_shoot.png", wield_image = "mcl_bamboo_bamboo_shoot.png", _mcl_blast_resistance = 1, - _mcl_hardness = 2, + _mcl_hardness = 1.5, node_box = { type = "fixed", fixed = { - -- {0.1875, -0.5, -0.125, 0.4125, 0.5, 0.0625}, - -- {-0.125, -0.5, 0.125, -0.3125, 0.5, 0.3125}, - -- {-0.25, -0.5, -0.3125, 0, 0.5, -0.125}, {-0.175, -0.5, -0.195, 0.05, 0.5, 0.030}, } }, @@ -152,81 +177,36 @@ local function create_nodes() } minetest.remove_node(new_pos) minetest.sound_play(node_sound.dug, sound_params, true) - local istack = ItemStack("mcl_bamboo:bamboo") + local istack = ItemStack(bamboo) + if math.random(1, DOUBLE_DROP_CHANCE) == 1 then + minetest.add_item(new_pos, istack) + end minetest.add_item(new_pos, istack) - elseif node_above and node_above.name == "mcl_bamboo:bamboo_endcap" then minetest.remove_node(new_pos) minetest.sound_play(node_sound.dug, sound_params, true) - local istack = ItemStack("mcl_bamboo:bamboo") + local istack = ItemStack(bamboo) minetest.add_item(new_pos, istack) + if math.random(1, DOUBLE_DROP_CHANCE) == 1 then + minetest.add_item(new_pos, istack) + end end end, } minetest.register_node(bamboo, bamboo_def) local bamboo_top = table.copy(bamboo_def) bamboo_top.groups = {not_in_creative_inventory = 1, handy = 1, axey = 1, choppy = 1, flammable = 3} - bamboo_top.drops = bamboo + bamboo_top.tiles = {"mcl_bamboo_endcap.png"} + bamboo_top.drawtype = "plantlike" + bamboo_top.paramtype2 = "meshoptions" + bamboo_top.param2 = 34 + bamboo_top.nodebox = nil - bamboo_top.on_place = function(itemstack, placer, pointed_thing) - if pointed_thing.type ~= "node" then - return itemstack - end - local node = minetest.get_node(pointed_thing.under) - local pos = pointed_thing.under - if DEBUG then - minetest.log("mcl_bamboo::Node placement data:") - minetest.log(dump(pointed_thing)) - minetest.log(dump(node)) - end - - if DEBUG then - minetest.log("mcl_bamboo::Checking for protected placement of bamboo.") - end - local pname = placer:get_player_name() - if pname then - if minetest.is_protected(pos, pname) then - minetest.record_protection_violation(pos, pname) - return - end - --not for player use. - if minetest.is_creative_enabled(pname) == false then - itemstack:set_count(0) - return itemstack - end - end - if DEBUG then - minetest.log("mcl_bamboo::placement of bamboo is not protected.") - end - - if node.name ~= "mcl_bamboo:bamboo" then - return itemstack - end - - if DEBUG then - minetest.log("mcl_bamboo::placing bamboo directly.") - end - return minetest.item_place(itemstack, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under))) + bamboo_top.on_place = function(itemstack, _, _) + -- Should never occur... but, if it does, then nix it. + itemstack:set_name(bamboo) + return itemstack end - --[[ - bamboo_top.on_destruct = function(pos) - -- Node destructor; called before removing node. - local node = minetest.get_node(pos) - if node and node.name == "mcl_bamboo:bamboo_endcap" then - local sound_params = { - pos = pos, - gain = 1.0, -- default - max_hear_distance = 10, -- default, uses a Euclidean metric - } - - minetest.remove_node(pos) - minetest.sound_play(node_sound.dug, sound_params, true) - local istack = ItemStack("mcl_bamboo:bamboo") - minetest.add_item(pos, istack) - end - - end - ]] minetest.register_node("mcl_bamboo:bamboo_endcap", bamboo_top) @@ -329,25 +309,6 @@ local function create_nodes() sounds = mcl_sounds.node_sound_wood_defaults(), } - --[[ Registers a door - -- name: The name of the door - -- def: a table with the folowing fields: - -- description - -- inventory_image - -- groups - -- tiles_bottom: the tiles of the bottom part of the door {front, side} - -- tiles_top: the tiles of the bottom part of the door {front, side} - -- If the following fields are not defined the default values are used - -- node_box_bottom - -- node_box_top - -- selection_box_bottom - -- selection_box_top - -- only_placer_can_open: if true only the player who placed the door can - -- open it - -- only_redstone_can_open: if true, the door can only be opened by redstone, - -- not by rightclicking it - --]] - mcl_doors:register_door(name, def) name = "mcl_bamboo:bamboo_trapdoor" @@ -871,14 +832,20 @@ todo -- Also, make those blocks collapse (break) when a nearby connected scaffol todo -- add in alternative bamboo styles to simulate random placement. (see commented out node box definitions. todo -- Add Flourish to the endcap node for bamboo. todo -- mash all of that together so that it drops as one item, and chooses what version to be, in on_place. -todo -- Raft -todo -- Raft with Chest. todo -- Add in Extras. -todo -- [X] Added a new "Mosaic" plank variant that is unique to Bamboo called Bamboo Mosaic - It can be crafted with 1x2 Bamboo (plank) Slabs in a vertical strip - 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. [Done] - todo -- fix scaffolding placing, instead of using on_rightclick first. + +todo -- make graphic for top node of bamboo. + +waiting on specific things: +todo -- Raft -- need model +todo -- Raft with Chest. same. +todo -- handle bonemeal... + +Notes: +When bone meal is used on it, it grows by 1–2 blocks. Bamboo can grow up to 12–16 blocks tall. +The top of a bamboo plant requires a light level of 9 or above to grow. + +Design Decision - to not make bamboo saplings, and not make them go through a ton of transformations. + --]] diff --git a/mods/ITEMS/mcl_bamboo/mod.conf b/mods/ITEMS/mcl_bamboo/mod.conf index 57f97a5a4..18bfc79f8 100644 --- a/mods/ITEMS/mcl_bamboo/mod.conf +++ b/mods/ITEMS/mcl_bamboo/mod.conf @@ -1,4 +1,4 @@ name = mcl_bamboo depends = mcl_core, mcl_sounds, mcl_tools -optional_depends = mcl_flowerpots, mclx_stairs, mcl_doors, mcl_signs, mesecons_pressureplates, mcl_fences, mesecons_button, mcl_lanterns +optional_depends = mcl_flowerpots, mclx_stairs, mcl_doors, mcl_signs, mesecons_pressureplates, mcl_fences, mesecons_button, mcl_boats author = Michieal \ No newline at end of file diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_bamboo_plank_mosaic.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_bamboo_plank_mosaic.png index 97c5cb58f331742c650200888f9fc7d2efd1c655..f3ef80872295011164df35df0d686b7e708f4f90 100644 GIT binary patch delta 373 zcmV-*0gC>J1cd{T8Gi!+001a04^sdD0EAFXR7J760JXmWw!Q$nz5u+z0KUHfzQO>) z!~n<00LaV$$jl7L&jHEG0LjfE$<6@D&IrlR2g=MA%FQ6k&J@ee0nE!6%*`0g&K%6o z8qLfZ&CL?c%@fVe8_mug&CVmu&j`)W5Y5jS&CeXp%nZ)W4}Z?j7|zfI&d?an(IC#z zE6>je&(Q#gK4VJ&006v6L_t&-S4GT8qJl6G1;EZjR1k51pmYWTb})wf-|w%!Zfj9= z0I=HwDJ80mIgqJ^T?+gV!KtqC1s!AAih!z9TTQp?C4_LSm_dZ{SOUm7my>flN)kg} z49l|MmeT$oY;HCN*APJIp+lDZep|+c8KjMY?K(g;3P3^6c~bUJGOBgE0XS}Kh9C|FI_l}xt(2xxv_8G(PPh4r3YuwjTzs}Zl~Vw z%Wz$uj2mz@qN6(NNX#J}0ihI;y8ximAI{??p~woHz2|||n5|KIrOEG5 z%HP(F-~f_ckbg$K&ZRxh9WWP>U4d2b;)D#6%LfRlKVmMgT5h&1uD%fM8C0;^{GDdz zO}^LL4#*xAKp=QdLXbgJf$V<5pV~QMMc|H`77{;kc7}5uQbDjNWLe(4fe;!L?@su~ zyD@PCdyF2VXLW#Ke43i819;9b-D19CRKi&c@fr>15OO~d3fE#5vw4ExHYDvPyxiVT z9;^=e4YqGQP>0#!O>}FVe+g2@qMd;&Q4%+oJ?2V`EpcoyUlNRwIJVP(vBzA;|5gwl v^W`K7^GL-B4>?56Fu_1ip&F?<{ldUMkSx?a<00000NkvXXu0mjfJ*4Un diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_door_wield.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_door_wield.png index 6d61e8fcfa0b99a8cd258c3451533e54f46d2d35..8fd32398c59d99d3baf95aaed1fcda0b6cfb1f6b 100644 GIT binary patch delta 1373 zcmV-j1)}=$3h)Y$B!4$aL_t&-8I8f+i(O|Gz~SFo@4NRt`}gaRUth|*#dWneHEg0+Y{u`H>F1*R|> zR^&u7BpExMF@L(%@z#%hibwe&FP(phGQm$i{dWHL+viwaUFDUF|G>@hu186zMMz{t zGE|lAtqqE*B>@jS{Dkm7{QgT1xobt$3aOdWcSeqq(Ilfcc=3hHWC<)SlxSJNu%ZfN zMKV-jvo?<2|891}JkaTFBt@VnN6BzA+#NR8*$t77VShEC)Ib_Ua+Hh^0&FK@8Q2Yz zfG49U3Yyp7u;wg+pleqqh$1L%ZKkh z$f;8&c*|tS+O=C8zV|qf|NI$_ER8`*ZWGaA#loa!@BSg5c;7vo*gv2u0y#>?a8z>T z)oav)5%pk1NF51B9ri2^37S})6jX7{($Zlbdw=YY#KjSBJaHE%-+YW5C1bL0fp@&& zZbA|9iL-jRCKQ3`>?SLFMx>Njef{g0ZmqNS{L_5!!3T&|vRDc`DUhRNeCzDfJbv|M z@Bp=P=0yQjaI72=|@-ICq?X_8K`#Ml2MqYltNk#=h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$Ds4z*t%?@tJ2dzQy999w{Z3UjI5q+Z(Js|1=+b@BxD6 z40FeBnt}q~I`=e>ufGK5p%jiS50OwZ?3XMbpTTE2H`dp21g>4X$&;6^P;>&j>e2BO zW`E!#_pf4gNtF^oJWET0$euwh_WC&I7>^xBq%2E5`mR+rHb(Tb4!-D24&Xw|pKfiD zxkSn{7W&6^IM|`lh2Stjx2yRZqu=f>dZs+^FvG&U@xaDWMLWSBj#;d|8sr$h#HK(SrEOb|b^8E}#|^&78SHFP0J;9Mf5gmaEY4T*{>lLMq^ zgk(79Xk$%GEvAr*q4^LIq24xBm4B$pbI)HUbA4K8|An3`6DH*@=^_@H%W}NiyQMZY zQNc-KbA4m4P=d`HBkH!HG@(vRrv+8Br=_M0L`X4`cN7spTuy2|?lrGCq=CvAtp|cm z2VgKaK!cDMLed5VjEr%$vzM5A2~bi>RB4-P9P#E5pHJb(L?c_H+jw81l~~~sya{>M zq0?Q&d(WvO$I)n*8Jn>rsFIwqb7wS#XQ+F*&s0gWml4%koO9SrjXKBTaDdTZX4G{> h?FBPqrylPM@E^gRT_J^xhFJgr002ovPDHLkV1iX&pqKyv diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_endcap.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_endcap.png new file mode 100644 index 0000000000000000000000000000000000000000..dea7059b4d94cc7b814f071c45d021469288d7c1 GIT binary patch literal 941 zcmV;e15*5nP)kkc1yGm(P?!Z!nFdgr0#TX(QkEZ5n*dUq0#=>{SCa@=od8#!09c&?Sf2q{ zp9ff=0$i9DT$vYLqYPf73t*WVV4V?To*HGL6lSOnXrd%*s4j7+LUFAsajp_^u^M%< z6m_!~c(5LLvm1J}6neB7dbAsQv@m;w9ec7Zd$S;Wv>SW1AAGhMeVj*qus(gVIDNA< zeYG8ZwIY78Hh#A!f3HV>w={paBY(Ihf4U}ss#JitCxNq7g1R+>vQLA$F@&{3h_^|I zx0*QzfO|AWs<;JlEFlh!A_ICT$8>~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boo.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_fence_gate_bamboo.png index bd51d0683b7d020034a268051a9acc95bcaf5f27..0195c9eecc74e61d731b57269b36c18851a8588e 100644 GIT binary patch delta 190 zcmV;v073ur0?q-D7=Hu<0002(-QrRJ000$GOjJec+imOJdhX(h@8gc|IK2ho|4%qm%xYFE8(yB< z&-aGK@KXk&qY-m5p^sWo97XgHQE=EA2Wnu-jp^HP%Dm3`TsMfD>yfChD-+jIL+LdI slOOlGrfNSHC}G!{0t z`iJ}{BVxJ%-3^>n=}6lo45>{+gRm4u$+Mm3XNS&jFNymBDSC*JVWj90!wri+f%^el z6WiU-2-1Zhw-Du>1r7KMbrpXz(&! z^6pO>wD?m#Cl8`l@2t`yhG{wgfU^%f+V1YTT9TD)DUJwnT_x`WfdBzWAb^StBjy8h5Vf$&p@}MYx%Kg+YT3H zrO(2q+583hShZ2M)jlU*EurRXrRMqTz3^Ac|KQ&o9F@z(^ThiA0000 Date: Sun, 25 Dec 2022 07:30:31 -0500 Subject: [PATCH 011/105] Fix Licensing. Removed Make_Stairs check. Made unified protection check. Began work on the second half of scaffolding. Removed comments that was no longer needed. --- mods/ITEMS/mcl_bamboo/README.md | 6 +- mods/ITEMS/mcl_bamboo/bambootoo.lua | 89 +++++++------- mods/ITEMS/mcl_bamboo/init.lua | 174 +++++++++++++++------------- 3 files changed, 145 insertions(+), 124 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/README.md b/mods/ITEMS/mcl_bamboo/README.md index 9bd5523d3..a6ef7911d 100644 --- a/mods/ITEMS/mcl_bamboo/README.md +++ b/mods/ITEMS/mcl_bamboo/README.md @@ -3,9 +3,9 @@ mcl_bamboo This mod adds minecraft-like bamboo nodes to your Mineclone 2 world. -Code: Michieal. Original (basic) bamboo code by: Krock. +Code: Michieal. Original (basic) bamboo code by: Small Joker. -License for code: GPL3; images / textures: CC-BY-SA. +License for code / images / textures: CC-BY-SA. Images Created by Michieal, except for: Inventory / wield image: created by RandomLegoBrick#8692 and is CC0. @@ -15,7 +15,7 @@ Optional Dependencies = mcl_flowerpots, mclx_stairs, mcl_doors, mcl_signs, mesec Special thanks to Nicu for help with the nodebox stalk design. -Krock's bamboo forum topic: +Small Joker's bamboo forum topic: Forum topic: https://forum.minetest.net/viewtopic.php?id=8289 Scaffold inspiration: Cora, because she said that it couldn't be done. \ No newline at end of file diff --git a/mods/ITEMS/mcl_bamboo/bambootoo.lua b/mods/ITEMS/mcl_bamboo/bambootoo.lua index 2df7cd42a..e75f3af8f 100644 --- a/mods/ITEMS/mcl_bamboo/bambootoo.lua +++ b/mods/ITEMS/mcl_bamboo/bambootoo.lua @@ -14,7 +14,6 @@ local adj_nodes = { vector.new(1, 0, 0), vector.new(-1, 0, 0), } -local SIDE_SCAFFOLDING = false local function bambootoo_create_nodes() local bamboo_mosaic = minetest.registered_nodes[bamboo .. "_plank"] @@ -24,7 +23,6 @@ local function bambootoo_create_nodes() bamboo_mosaic._doc_items_longdesc = S("Bamboo Mosaic Plank") minetest.register_node("mcl_bamboo:bamboo_mosaic", bamboo_mosaic) - -- crafted by "mcl_stair:slab_bamboo_plank", "mcl_stair:slab_bamboo_block", "mcl_stair:slab_bamboo_stripped" if minetest.get_modpath("mcl_stairs") then if mcl_stairs ~= nil then mcl_stairs.register_stair_and_slab_simple( @@ -37,47 +35,60 @@ local function bambootoo_create_nodes() end end - if SIDE_SCAFFOLDING then - --currently, disabled. - minetest.register_node("mcl_bamboo:scaffolding_horizontal", { - description = S("Scaffolding (horizontal)"), - doc_items_longdesc = S("Scaffolding block used to climb up or out across areas."), - doc_items_hidden = false, - tiles = {"mcl_bamboo_scaffolding_top.png", "mcl_bamboo_scaffolding_top.png", "mcl_bamboo_scaffolding_bottom.png"}, - drawtype = "nodebox", - paramtype = "light", - use_texture_alpha = "clip", - node_box = { - type = "fixed", - fixed = { - {-0.5, 0.375, -0.5, 0.5, 0.5, 0.5}, - {-0.5, -0.5, -0.5, -0.375, 0.5, -0.375}, - {0.375, -0.5, -0.5, 0.5, 0.5, -0.375}, - {0.375, -0.5, 0.375, 0.5, 0.5, 0.5}, - {-0.5, -0.5, 0.375, -0.375, 0.5, 0.5}, - {-0.5, -0.5, -0.5, 0.5, -0.375, 0.5}, - } + minetest.register_node("mcl_bamboo:scaffolding_horizontal", { + description = S("Scaffolding (horizontal)"), + doc_items_longdesc = S("Scaffolding block used to climb up or out across areas."), + doc_items_hidden = false, + tiles = {"mcl_bamboo_scaffolding_top.png", "mcl_bamboo_scaffolding_top.png", "mcl_bamboo_scaffolding_bottom.png"}, + drop = "mcl_bamboo:scaffolding", + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "4dir", + param2 = 0, + use_texture_alpha = "clip", + node_box = { + type = "fixed", + fixed = { + {-0.5, 0.375, -0.5, 0.5, 0.5, 0.5}, + {-0.5, -0.5, -0.5, -0.375, 0.5, -0.375}, + {0.375, -0.5, -0.5, 0.5, 0.5, -0.375}, + {0.375, -0.5, 0.375, 0.5, 0.5, 0.5}, + {-0.5, -0.5, 0.375, -0.375, 0.5, 0.5}, + {-0.5, -0.5, -0.5, 0.5, -0.375, 0.5}, + } + }, + selection_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, }, - selection_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, - }, - }, - groups = {handy = 1, axey = 1, flammable = 3, building_block = 1, material_wood = 1, fire_encouragement = 5, fire_flammability = 20, not_in_creative_inventory = 1, falling_node = 1}, - _mcl_after_falling = function(pos) - if minetest.get_node(pos).name == "mcl_bamboo:scaffolding_horizontal" then - if minetest.get_node(vector.offset(pos, 0, 0, 0)).name ~= "mcl_bamboo:scaffolding" then - minetest.remove_node(pos) - minetest.add_item(pos, "mcl_bamboo:scaffolding") - else - minetest.set_node(vector.offset(pos, 0, 1, 0), {name = "mcl_bamboo:scaffolding"}) - end + }, + groups = {handy = 1, axey = 1, flammable = 3, building_block = 1, material_wood = 1, fire_encouragement = 5, fire_flammability = 20, not_in_creative_inventory = 1, falling_node = 1}, + _mcl_after_falling = function(pos) + if minetest.get_node(pos).name == "mcl_bamboo:scaffolding_horizontal" then + if minetest.get_node(vector.offset(pos, 0, 0, 0)).name ~= "mcl_bamboo:scaffolding" then + minetest.remove_node(pos) + minetest.add_item(pos, "mcl_bamboo:scaffolding") + else + minetest.set_node(vector.offset(pos, 0, 1, 0), {name = "mcl_bamboo:scaffolding"}) end end - }) - end + end, + on_place = function(itemstack, placer, pointed_thing) + if pointed_thing.type ~= "node" then + return itemstack + end + local node = minetest.get_node(pointed_thing.under) + local pos = pointed_thing.under + if mcl_bamboo.is_protected(pos, placer) then + return + end + + end + + + }) end diff --git a/mods/ITEMS/mcl_bamboo/init.lua b/mods/ITEMS/mcl_bamboo/init.lua index a6fee7c32..6a5b0b025 100644 --- a/mods/ITEMS/mcl_bamboo/init.lua +++ b/mods/ITEMS/mcl_bamboo/init.lua @@ -1,7 +1,8 @@ -- [bamboo] mod by SmallJoker, Made for MineClone 2 by Michieal (as mcl_bamboo). --- Parts of mcl_scaffolding were used. Mcl_scaffolding originally created by Cora; heavily reworked for mcl_bamboo by Michieal. +-- Parts of mcl_scaffolding were used. Mcl_scaffolding originally created by Cora; Fixed and heavily reworked +-- for mcl_bamboo by Michieal. -- Creation date: 12-01-2022 (Dec 1st, 2022) --- License for everything: GPL3 +-- License for everything: CC-BY-SA 4.0 -- Bamboo max height: 12-16 -- LOCALS @@ -13,10 +14,21 @@ local node_sound = mcl_sounds.node_sound_wood_defaults() -- CONSTS local SIDE_SCAFFOLDING = false -local MAKE_STAIRS = true local DEBUG = false local DOUBLE_DROP_CHANCE = 8 +mcl_bamboo ={} + +--- pos: node position; placer: ObjectRef that is placing the item +--- returns: true if protected, otherwise false. +function mcl_bamboo.is_protected(pos, placer) + local name = placer:get_player_name() + if minetest.is_protected(pos, name) then + minetest.record_protection_violation(pos, name) + return true + end + return false +end --Bamboo can be planted on moss blocks, grass blocks, dirt, coarse dirt, rooted dirt, gravel, mycelium, podzol, sand, red sand, or mud local bamboo_dirt_nodes = { @@ -38,7 +50,7 @@ local BROKEN_DOORS = true -- LOCAL FUNCTIONS -- Add Groups function, courtesy of Warr1024. -function addgroups(name, ...) +function mcl_bamboo.addgroups(name, ...) local def = minetest.registered_items[name] or error(name .. " not found") local groups = {} for k, v in pairs(def.groups) do @@ -124,9 +136,7 @@ local function create_nodes() if DEBUG then minetest.log("mcl_bamboo::Checking for protected placement of bamboo.") end - local pname = placer:get_player_name() - if minetest.is_protected(pos, pname) then - minetest.record_protection_violation(pos, pname) + if mcl_bamboo.is_protected(pos, placer) then return end if DEBUG then @@ -224,9 +234,7 @@ local function create_nodes() local pos = pointed_thing.under - local pname = placer:get_player_name() - if minetest.is_protected(pos, pname) then - minetest.record_protection_violation(pos, pname) + if mcl_bamboo.is_protected(pos, placer) then return end @@ -335,47 +343,45 @@ local function create_nodes() end end - if MAKE_STAIRS then - if minetest.get_modpath("mcl_stairs") then - if mcl_stairs ~= nil then - mcl_stairs.register_stair_and_slab_simple( - "bamboo_block", - "mcl_bamboo:bamboo_block", - S("Bamboo Stair"), - S("Bamboo Slab"), - S("Double Bamboo Slab") - ) - mcl_stairs.register_stair_and_slab_simple( - "bamboo_stripped", - "mcl_bamboo:bamboo_block_stripped", - S("Stripped Bamboo Stair"), - S("Stripped Bamboo Slab"), - S("Double Stripped Bamboo Slab") - ) - mcl_stairs.register_stair_and_slab_simple( - "bamboo_plank", - "mcl_bamboo:bamboo_plank", - S("Bamboo Plank Stair"), - S("Bamboo Plank Slab"), - S("Double Bamboo Plank Slab") - ) + if minetest.get_modpath("mcl_stairs") then + if mcl_stairs ~= nil then + mcl_stairs.register_stair_and_slab_simple( + "bamboo_block", + "mcl_bamboo:bamboo_block", + S("Bamboo Stair"), + S("Bamboo Slab"), + S("Double Bamboo Slab") + ) + mcl_stairs.register_stair_and_slab_simple( + "bamboo_stripped", + "mcl_bamboo:bamboo_block_stripped", + S("Stripped Bamboo Stair"), + S("Stripped Bamboo Slab"), + S("Double Stripped Bamboo Slab") + ) + mcl_stairs.register_stair_and_slab_simple( + "bamboo_plank", + "mcl_bamboo:bamboo_plank", + S("Bamboo Plank Stair"), + 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_groups = { - wood_slab = 1, - building_block = 1, - slab = 1, - axey = 1, - handy = 1, - stair = 1, - flammable = 1, - fire_encouragement = 5, - fire_flammability = 20 - } + -- let's add plank slabs to the wood_slab group. + local bamboo_plank_slab = "mcl_stairs:slab_bamboo_plank" + local node_groups = { + wood_slab = 1, + building_block = 1, + slab = 1, + axey = 1, + handy = 1, + stair = 1, + flammable = 1, + fire_encouragement = 5, + fire_flammability = 20 + } - minetest.override_item(bamboo_plank_slab, {groups = node_groups}) - end + minetest.override_item(bamboo_plank_slab, {groups = node_groups}) end end @@ -502,6 +508,8 @@ local function create_nodes() tiles = {"mcl_bamboo_scaffolding_top.png", "mcl_bamboo_scaffolding_top.png", "mcl_bamboo_scaffolding_bottom.png"}, drawtype = "nodebox", paramtype = "light", + paramtype2 = "4dir", + param2 = 0, use_texture_alpha = "clip", node_box = { type = "fixed", @@ -552,9 +560,7 @@ local function create_nodes() end local node = minetest.get_node(ptd.under) local pos = ptd.under - local pname = placer:get_player_name() - if minetest.is_protected(pos, pname) then - minetest.record_protection_violation(pos, pname) + if mcl_bamboo.is_protected(pos, placer) then return end if DEBUG then @@ -715,37 +721,41 @@ local function register_craftings() 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, - }) + if minetest.get_modpath("mcl_stairs") then + if mcl_stairs ~= nil then + 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, + }) - minetest.register_craft({ - type = "fuel", - recipe = "mcl_stairs:stair_bamboo_plank", - burntime = 15, - }) - minetest.register_craft({ - type = "fuel", - recipe = "mcl_stairs:stair_bamboo_block", - burntime = 15, - }) - minetest.register_craft({ - type = "fuel", - recipe = "mcl_stairs:stair_bamboo_stripped", - burntime = 15, - }) + minetest.register_craft({ + type = "fuel", + recipe = "mcl_stairs:stair_bamboo_plank", + burntime = 15, + }) + minetest.register_craft({ + type = "fuel", + recipe = "mcl_stairs:stair_bamboo_block", + burntime = 15, + }) + minetest.register_craft({ + type = "fuel", + recipe = "mcl_stairs:stair_bamboo_stripped", + burntime = 15, + }) + end + end minetest.register_craft({ type = "fuel", From 76669e1f3c3f20fbd29bddd8190f350d71a12f69 Mon Sep 17 00:00:00 2001 From: Michieal Date: Wed, 28 Dec 2022 14:34:14 -0500 Subject: [PATCH 012/105] Moved bamboo grow code to its own function, and made that function global so that it can be called outside of mcl_bamboo. --- mods/ITEMS/mcl_bamboo/init.lua | 89 ++++++++++++++++++---------------- 1 file changed, 46 insertions(+), 43 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/init.lua b/mods/ITEMS/mcl_bamboo/init.lua index 6a5b0b025..2557a2b3e 100644 --- a/mods/ITEMS/mcl_bamboo/init.lua +++ b/mods/ITEMS/mcl_bamboo/init.lua @@ -772,7 +772,7 @@ register_craftings() dofile(minetest.get_modpath(modname) .. "/bambootoo.lua") local BAMBOO_SOIL_DIST = -16 -local BAM_MAX_HEIGHT_STCHK = 11 +local BAM_MAX_HEIGHT_STPCHK = 11 local BAM_MAX_HEIGHT_TOP = 15 --ABMs @@ -780,50 +780,53 @@ minetest.register_abm({ nodenames = {bamboo}, interval = 40, chance = 40, - action = function(pos, _) - local soil_pos - if minetest.get_node_light(pos) < 8 then - return - end - local found_soil = false - for py = -1, BAMBOO_SOIL_DIST, -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 - found_soil = true - soil_pos = chk_pos - break - elseif name ~= "mcl_bamboo:bamboo" then - break - end - end - if not found_soil then - return - end - for py = 1, 15 do - local npos = vector.offset(pos, 0, py, 0) - local name = minetest.get_node(npos).name - local dist = vector.distance(soil_pos, npos) - if dist >= BAM_MAX_HEIGHT_STCHK then - -- stop growing check. - if name == "air" then - local height = math.random(BAM_MAX_HEIGHT_STCHK, BAM_MAX_HEIGHT_TOP) - if height == dist then - minetest.set_node(npos, {name = "mcl_bamboo:bamboo_endcap"}) - end - end - break - end - if name == "air" then - minetest.set_node(npos, {name = "mcl_bamboo:bamboo"}) - break - elseif name ~= bamboo then - break - end - end - end, + action = mcl_bamboo.grow_bamboo(pos,_), }) +function mcl_bamboo.grow_bamboo(pos, _, force) + local soil_pos + if minetest.get_node_light(pos) < 8 then + return + end + local found_soil = false + for py = -1, BAMBOO_SOIL_DIST, -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 + found_soil = true + soil_pos = chk_pos + break + elseif name ~= bamboo then + break + end + end + if not found_soil then + return + end + for py = 1, 15 do + local npos = vector.offset(pos, 0, py, 0) + local name = minetest.get_node(npos).name + local dist = vector.distance(soil_pos, npos) + if dist >= BAM_MAX_HEIGHT_STPCHK then + -- stop growing check. + if name == "air" then + local height = math.random(BAM_MAX_HEIGHT_STPCHK, BAM_MAX_HEIGHT_TOP) + if height == dist then + minetest.set_node(npos, {name = "mcl_bamboo:bamboo_endcap"}) + end + end + break + end + if name == "air" then + minetest.set_node(npos, {name = bamboo}) + break + elseif name ~= bamboo then + break + end + end + +end + -- Base Aliases. minetest.register_alias("bamboo_block", "mcl_bamboo:bamboo_block") minetest.register_alias("bamboo_strippedblock", "mcl_bamboo:bamboo_block_stripped") From ff7693937a63c1fdf29885d1f8ce940f1b67d423 Mon Sep 17 00:00:00 2001 From: Michieal Date: Wed, 28 Dec 2022 15:29:06 -0500 Subject: [PATCH 013/105] Did a bit of code restructuring. Removed another magic number. Add in todo for fishing. Added in the possibility for bamboo to grow two nodes in one success. Added in a "force" param to use with bonemealing. --- mods/ITEMS/mcl_bamboo/init.lua | 142 ++++++++++++++++++--------------- 1 file changed, 79 insertions(+), 63 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/init.lua b/mods/ITEMS/mcl_bamboo/init.lua index 2557a2b3e..5b1891474 100644 --- a/mods/ITEMS/mcl_bamboo/init.lua +++ b/mods/ITEMS/mcl_bamboo/init.lua @@ -10,6 +10,8 @@ local modname = minetest.get_current_modname() local S = minetest.get_translator(modname) local bamboo = "mcl_bamboo:bamboo" +mcl_bamboo = {} + local node_sound = mcl_sounds.node_sound_wood_defaults() -- CONSTS @@ -17,18 +19,12 @@ local SIDE_SCAFFOLDING = false local DEBUG = false local DOUBLE_DROP_CHANCE = 8 -mcl_bamboo ={} +local BAMBOO_SOIL_DIST = -16 +local BAM_MAX_HEIGHT_STPCHK = 11 +local BAM_MAX_HEIGHT_TOP = 15 ---- pos: node position; placer: ObjectRef that is placing the item ---- returns: true if protected, otherwise false. -function mcl_bamboo.is_protected(pos, placer) - local name = placer:get_player_name() - if minetest.is_protected(pos, name) then - minetest.record_protection_violation(pos, name) - return true - end - return false -end +-- Due to door fix #2736, doors are displayed backwards. When this is fixed, set this variable to false. +local BROKEN_DOORS = true --Bamboo can be planted on moss blocks, grass blocks, dirt, coarse dirt, rooted dirt, gravel, mycelium, podzol, sand, red sand, or mud local bamboo_dirt_nodes = { @@ -44,10 +40,75 @@ local bamboo_dirt_nodes = { "mcl_mud:mud", } --- Due to door fix #2736, doors are displayed backwards. When this is fixed, set this variable to false. -local BROKEN_DOORS = true +--- pos: node position; placer: ObjectRef that is placing the item +--- returns: true if protected, otherwise false. +function mcl_bamboo.is_protected(pos, placer) + local name = placer:get_player_name() + if minetest.is_protected(pos, name) then + minetest.record_protection_violation(pos, name) + return true + end + return false +end --- LOCAL FUNCTIONS +function mcl_bamboo.grow_bamboo(pos, _, force) + if not force or force == "" then + force = false + end + local chk_pos + local soil_pos + if minetest.get_node_light(pos) < 8 then + return + end + local found_soil = false + for py = -1, BAMBOO_SOIL_DIST, -1 do + 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 + found_soil = true + soil_pos = chk_pos + break + elseif name ~= bamboo then + break + end + end + -- requires knowing where the soil node is. + if not found_soil then + return + end + local grow_amount = math.random(1, 2) + -- Bonemeal: Grows the bamboo by 1-2 stems. (per the minecraft wiki.) + + for py = 1, BAM_MAX_HEIGHT_TOP do + chk_pos = vector.offset(pos, 0, py, 0) + local name = minetest.get_node(chk_pos).name + local dist = vector.distance(soil_pos, chk_pos) + if dist >= BAM_MAX_HEIGHT_STPCHK then + -- stop growing check. + if name == "air" then + local height = math.random(BAM_MAX_HEIGHT_STPCHK, BAM_MAX_HEIGHT_TOP) + if height == dist then + minetest.set_node(chk_pos, {name = "mcl_bamboo:bamboo_endcap"}) + end + end + break + end + if name == "air" then + minetest.set_node(chk_pos, {name = bamboo}) + -- handle growing a second node. + if grow_amount == 2 then + chk_pos = vector.offset(chk_pos, 0, 1, 0) + if minetest.get_node(chk_pos).name == "air" then + minetest.set_node(chk_pos, {name = bamboo}) + end + end + break + elseif name ~= bamboo and force == false then + break + end + end + +end -- Add Groups function, courtesy of Warr1024. function mcl_bamboo.addgroups(name, ...) @@ -67,6 +128,8 @@ function mcl_bamboo.addgroups(name, ...) return minetest.override_item(name, {groups = groups}) end +-- LOCAL FUNCTIONS + local function create_nodes() local bamboo_def = { @@ -771,62 +834,14 @@ register_craftings() -- BAMBOO_TOO (Bamboo two) dofile(minetest.get_modpath(modname) .. "/bambootoo.lua") -local BAMBOO_SOIL_DIST = -16 -local BAM_MAX_HEIGHT_STPCHK = 11 -local BAM_MAX_HEIGHT_TOP = 15 - --ABMs minetest.register_abm({ nodenames = {bamboo}, interval = 40, chance = 40, - action = mcl_bamboo.grow_bamboo(pos,_), + action = mcl_bamboo.grow_bamboo, }) -function mcl_bamboo.grow_bamboo(pos, _, force) - local soil_pos - if minetest.get_node_light(pos) < 8 then - return - end - local found_soil = false - for py = -1, BAMBOO_SOIL_DIST, -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 - found_soil = true - soil_pos = chk_pos - break - elseif name ~= bamboo then - break - end - end - if not found_soil then - return - end - for py = 1, 15 do - local npos = vector.offset(pos, 0, py, 0) - local name = minetest.get_node(npos).name - local dist = vector.distance(soil_pos, npos) - if dist >= BAM_MAX_HEIGHT_STPCHK then - -- stop growing check. - if name == "air" then - local height = math.random(BAM_MAX_HEIGHT_STPCHK, BAM_MAX_HEIGHT_TOP) - if height == dist then - minetest.set_node(npos, {name = "mcl_bamboo:bamboo_endcap"}) - end - end - break - end - if name == "air" then - minetest.set_node(npos, {name = bamboo}) - break - elseif name ~= bamboo then - break - end - end - -end - -- Base Aliases. minetest.register_alias("bamboo_block", "mcl_bamboo:bamboo_block") minetest.register_alias("bamboo_strippedblock", "mcl_bamboo:bamboo_block_stripped") @@ -849,6 +864,7 @@ todo -- Add in Extras. todo -- fix scaffolding placing, instead of using on_rightclick first. todo -- make graphic for top node of bamboo. +todo -- add bamboo to junk items in fishing. waiting on specific things: todo -- Raft -- need model From 731468cf5ad4a1502f1ee52001886b4ef58ee062 Mon Sep 17 00:00:00 2001 From: Michieal Date: Wed, 28 Dec 2022 18:10:12 -0500 Subject: [PATCH 014/105] Did a bit of code restructuring. Removed another magic number. Add in todo for fishing. Added in the possibility for bamboo to grow two nodes in one success. Added in a "force" param to use with bonemealing. --- mods/ITEMS/mcl_bamboo/init.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_bamboo/init.lua b/mods/ITEMS/mcl_bamboo/init.lua index 5b1891474..cc09e214c 100644 --- a/mods/ITEMS/mcl_bamboo/init.lua +++ b/mods/ITEMS/mcl_bamboo/init.lua @@ -839,7 +839,9 @@ minetest.register_abm({ nodenames = {bamboo}, interval = 40, chance = 40, - action = mcl_bamboo.grow_bamboo, + action = function(pos, node) + mcl_bamboo.grow_bamboo(pos, node) + end, }) -- Base Aliases. From 26c1be372203bfdb4db0c13afa0201dd551a3e07 Mon Sep 17 00:00:00 2001 From: Michieal Date: Thu, 29 Dec 2022 01:03:25 -0500 Subject: [PATCH 015/105] Fix bamboo node to be Swordy. Added in secondary bamboo node types. Changed the grow_bamboo function to make use of new alt nodes, and removed unneccessary "force" parameter. --- mods/ITEMS/mcl_bamboo/bambootoo.lua | 30 ++++++++- mods/ITEMS/mcl_bamboo/init.lua | 98 ++++++++++++++++++++++------- 2 files changed, 103 insertions(+), 25 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/bambootoo.lua b/mods/ITEMS/mcl_bamboo/bambootoo.lua index e75f3af8f..17607d0f9 100644 --- a/mods/ITEMS/mcl_bamboo/bambootoo.lua +++ b/mods/ITEMS/mcl_bamboo/bambootoo.lua @@ -16,6 +16,33 @@ local adj_nodes = { } local function bambootoo_create_nodes() + -- Bamboo alternative node types. + local def = minetest.registered_nodes [bamboo] + def.node_box = { + type = "fixed", + fixed = { + {-0.05, -0.5, 0.285, -0.275, 0.5, 0.06}, + } + } + minetest.register_node(bamboo.."_1", def) + + def.node_box = { + type = "fixed", + fixed = { + {0.25, -0.5, 0.325, 0.025, 0.5, 0.100}, + } + } + minetest.register_node(bamboo.."_2", def) + + + def.node_box = { + type = "fixed", + fixed = { + {-0.125, -0.5, 0.125, -0.3125, 0.5, 0.3125}, + } + } + minetest.register_node(bamboo.."_3", def) + local bamboo_mosaic = minetest.registered_nodes[bamboo .. "_plank"] bamboo_mosaic.tiles = {"mcl_bamboo_bamboo_plank.png"} bamboo_mosaic.groups = {handy = 1, axey = 1, flammable = 3, fire_encouragement = 5, fire_flammability = 20} @@ -35,6 +62,7 @@ local function bambootoo_create_nodes() end end + minetest.register_node("mcl_bamboo:scaffolding_horizontal", { description = S("Scaffolding (horizontal)"), doc_items_longdesc = S("Scaffolding block used to climb up or out across areas."), @@ -84,7 +112,7 @@ local function bambootoo_create_nodes() if mcl_bamboo.is_protected(pos, placer) then return end - + -- todo: finish this section. end diff --git a/mods/ITEMS/mcl_bamboo/init.lua b/mods/ITEMS/mcl_bamboo/init.lua index cc09e214c..c6cb87152 100644 --- a/mods/ITEMS/mcl_bamboo/init.lua +++ b/mods/ITEMS/mcl_bamboo/init.lua @@ -40,6 +40,10 @@ local bamboo_dirt_nodes = { "mcl_mud:mud", } +local strlen = string.len() +local substr = string.sub() +local rand = math.random() + --- pos: node position; placer: ObjectRef that is placing the item --- returns: true if protected, otherwise false. function mcl_bamboo.is_protected(pos, placer) @@ -51,7 +55,7 @@ function mcl_bamboo.is_protected(pos, placer) return false end -function mcl_bamboo.grow_bamboo(pos, _, force) +function mcl_bamboo.grow_bamboo(pos, _) if not force or force == "" then force = false end @@ -60,50 +64,64 @@ function mcl_bamboo.grow_bamboo(pos, _, force) if minetest.get_node_light(pos) < 8 then return end - local found_soil = false + local found = false -- used for the soil check + local mboo = "" for py = -1, BAMBOO_SOIL_DIST, -1 do 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 - found_soil = true - soil_pos = chk_pos - break - elseif name ~= bamboo then + for i = 1, #bamboo_dirt_nodes do + if name == bamboo_dirt_nodes[i] then + found = true + soil_pos = chk_pos + break + end + end + if found then break + else + mboo = substr(name, strlen(name) - 3, strlen(name)) + if mboo ~= "mboo" and mboo ~= "oo_1" and mboo ~= "oo_2" and mboo ~= "oo_3" then + break + end end end -- requires knowing where the soil node is. - if not found_soil then + if not found then return end - local grow_amount = math.random(1, 2) + local grow_amount = rand(1, 32) + grow_amount = rand(1, 32) + grow_amount = rand(1, 32) + grow_amount = rand(1, 32) -- because yeah, not truly random, or even a good prng. -- Bonemeal: Grows the bamboo by 1-2 stems. (per the minecraft wiki.) for py = 1, BAM_MAX_HEIGHT_TOP do chk_pos = vector.offset(pos, 0, py, 0) + local node_below = minetest.get_node(pos).name local name = minetest.get_node(chk_pos).name local dist = vector.distance(soil_pos, chk_pos) if dist >= BAM_MAX_HEIGHT_STPCHK then -- stop growing check. if name == "air" then - local height = math.random(BAM_MAX_HEIGHT_STPCHK, BAM_MAX_HEIGHT_TOP) + local height = rand(BAM_MAX_HEIGHT_STPCHK, BAM_MAX_HEIGHT_TOP) if height == dist then minetest.set_node(chk_pos, {name = "mcl_bamboo:bamboo_endcap"}) end end break end + mboo = substr(name, strlen(name) - 3, strlen(name)) if name == "air" then - minetest.set_node(chk_pos, {name = bamboo}) + minetest.set_node(chk_pos, {name = node_below}) -- handle growing a second node. if grow_amount == 2 then chk_pos = vector.offset(chk_pos, 0, 1, 0) if minetest.get_node(chk_pos).name == "air" then - minetest.set_node(chk_pos, {name = bamboo}) + minetest.set_node(chk_pos, {name = node_below}) end end break - elseif name ~= bamboo and force == false then + elseif mboo ~= "mboo" and mboo ~= "oo_1" and mboo ~= "oo_2" and mboo ~= "oo_3" then break end end @@ -137,7 +155,7 @@ local function create_nodes() tiles = {"mcl_bamboo_bamboo_bottom.png", "mcl_bamboo_bamboo_bottom.png", "mcl_bamboo_bamboo.png"}, drawtype = "nodebox", paramtype = "light", - groups = {handy = 1, axey = 1, choppy = 1, flammable = 3}, + groups = {handy = 1, swordy = 1, choppy = 1, flammable = 3}, sounds = node_sound, drop = { @@ -177,13 +195,6 @@ local function create_nodes() } }, - --[[ - Node Box definitions for alternative styles. - {-0.05, -0.5, 0.285, -0.275, 0.5, 0.06}, - {0.25, -0.5, 0.325, 0.025, 0.5, 0.100}, - {-0.125, -0.5, 0.125, -0.3125, 0.5, 0.3125}, - --]] - on_place = function(itemstack, placer, pointed_thing) if pointed_thing.type ~= "node" then return itemstack @@ -216,7 +227,10 @@ local function create_nodes() end end - if node.name ~= "mcl_bamboo:bamboo" then + local mboo = substr(node.name, strlen(node.name) - 3, strlen(node.name)) + + if mboo ~= "mboo" and mboo ~= "oo_1" and mboo ~= "oo_2" and mboo ~= "oo_3" then + -- not bamboo... if node.name ~= "mcl_flowerpots:flower_pot" then local found = false for i = 1, #bamboo_dirt_nodes do @@ -234,8 +248,44 @@ local function create_nodes() if DEBUG then minetest.log("mcl_bamboo::placing bamboo directly.") end - return minetest.item_place(itemstack, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under))) + local place_item = table.copy(itemstack) -- make a copy so that we don't indirectly mess with the original. + + if mboo == "mboo" then + return minetest.item_place(itemstack, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under))) + elseif mboo ~= "oo_1" then + place_item:set_name(bamboo .. "_1") + itemstack:set_count(itemstack:get_count() - 1) + minetest.item_place(place_item, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under))) + return itemstack, pointed_thing.under + elseif mboo ~= "oo_2" then + place_item:set_name(bamboo .. "_2") + itemstack:set_count(itemstack:get_count() - 1) + minetest.item_place(place_item, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under))) + return itemstack, pointed_thing.under + elseif mboo ~= "oo_3" then + place_item:set_name(bamboo .. "_3") + itemstack:set_count(itemstack:get_count() - 1) + minetest.item_place(place_item, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under))) + return itemstack, pointed_thing.under + else + local placed_type = rand(0, 3) -- randomly choose which one to place. + placed_type = rand(0, 3) + placed_type = rand(0, 3) + placed_type = rand(0, 3) -- Get the lua juices flowing. (Really, this is just to get it to give a real random number.) + if placed_type == 1 then + place_item:set_name(bamboo .. "_1") + end + if placed_type == 2 then + place_item:set_name(bamboo .. "_2") + end + if placed_type == 3 then + place_item:set_name(bamboo .. "_3") + end + itemstack:set_count(itemstack:get_count() - 1) + minetest.item_place(place_item, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under))) + return itemstack, pointed_thing.under + end end, on_destruct = function(pos) @@ -836,7 +886,7 @@ dofile(minetest.get_modpath(modname) .. "/bambootoo.lua") --ABMs minetest.register_abm({ - nodenames = {bamboo}, + nodenames = {bamboo, bamboo .. "_1", bamboo .. "_2", bamboo .. "_3"}, interval = 40, chance = 40, action = function(pos, node) From 0f9d263e021acdb23c3b4b04637d7fa60b00aa8e Mon Sep 17 00:00:00 2001 From: Michieal Date: Thu, 29 Dec 2022 01:29:25 -0500 Subject: [PATCH 016/105] Add Bamboo to the Fishing Junk table. Update the mod.conf to be aware of mcl_bamboo. --- mods/ITEMS/mcl_fishing/init.lua | 1 + mods/ITEMS/mcl_fishing/mod.conf | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_fishing/init.lua b/mods/ITEMS/mcl_fishing/init.lua index 546ad7eea..6e0eb1d8e 100644 --- a/mods/ITEMS/mcl_fishing/init.lua +++ b/mods/ITEMS/mcl_fishing/init.lua @@ -91,6 +91,7 @@ local fish = function(itemstack, player, pointed_thing) { itemstring = "mcl_mobitems:bone", weight = 10 }, { itemstring = "mcl_dye:black", weight = 1, amount_min = 10, amount_max = 10 }, { itemstring = "mcl_mobitems:string", weight = 10 }, -- TODO: Tripwire Hook + { itemstring = "mcl_bamboo:bamboo", weight = 10 }, }, stacks_min = 1, stacks_max = 1, diff --git a/mods/ITEMS/mcl_fishing/mod.conf b/mods/ITEMS/mcl_fishing/mod.conf index 71bde6146..5291bbe73 100644 --- a/mods/ITEMS/mcl_fishing/mod.conf +++ b/mods/ITEMS/mcl_fishing/mod.conf @@ -1,3 +1,3 @@ name = mcl_fishing description = Adds fish and fishing poles to go fishing. -depends = mcl_core, mcl_sounds, mcl_loot, mcl_mobs, mcl_enchanting, mcl_throwing, mcl_colors, mcl_buckets +depends = mcl_core, mcl_sounds, mcl_loot, mcl_mobs, mcl_enchanting, mcl_throwing, mcl_colors, mcl_buckets. mcl_bamboo From 1d0968f4f534cc788aa7437640692b553f58b566 Mon Sep 17 00:00:00 2001 From: Michieal Date: Thu, 29 Dec 2022 01:38:10 -0500 Subject: [PATCH 017/105] Fix bamboo nodes on_destruct to handle the alt nodes too. clean up ToDos --- mods/ITEMS/mcl_bamboo/init.lua | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/init.lua b/mods/ITEMS/mcl_bamboo/init.lua index c6cb87152..34b4ebb8f 100644 --- a/mods/ITEMS/mcl_bamboo/init.lua +++ b/mods/ITEMS/mcl_bamboo/init.lua @@ -292,7 +292,9 @@ local function create_nodes() -- Node destructor; called before removing node. local new_pos = vector.offset(pos, 0, 1, 0) local node_above = minetest.get_node(new_pos) - if node_above and node_above.name == bamboo then + local mboo = substr(node_above.name, strlen(node_above.name) - 3, strlen(node_above.name)) + + if node_above and (mboo == "mboo" or mboo == "oo_1" or mboo == "oo_2" or mboo == "oo_3") then local sound_params = { pos = new_pos, gain = 1.0, -- default @@ -301,7 +303,7 @@ local function create_nodes() minetest.remove_node(new_pos) minetest.sound_play(node_sound.dug, sound_params, true) local istack = ItemStack(bamboo) - if math.random(1, DOUBLE_DROP_CHANCE) == 1 then + if rand(1, DOUBLE_DROP_CHANCE) == 1 then minetest.add_item(new_pos, istack) end minetest.add_item(new_pos, istack) @@ -310,13 +312,14 @@ local function create_nodes() minetest.sound_play(node_sound.dug, sound_params, true) local istack = ItemStack(bamboo) minetest.add_item(new_pos, istack) - if math.random(1, DOUBLE_DROP_CHANCE) == 1 then + if rand(1, DOUBLE_DROP_CHANCE) == 1 then minetest.add_item(new_pos, istack) end end end, } minetest.register_node(bamboo, bamboo_def) + local bamboo_top = table.copy(bamboo_def) bamboo_top.groups = {not_in_creative_inventory = 1, handy = 1, axey = 1, choppy = 1, flammable = 3} bamboo_top.tiles = {"mcl_bamboo_endcap.png"} @@ -909,20 +912,18 @@ minetest.register_alias("mcl_scaffolding:scaffolding_horizontal", "mcl_bamboo:sc --[[ todo -- make scaffolds do side scaffold blocks, so that they jut out. todo -- Also, make those blocks collapse (break) when a nearby connected scaffold breaks. -todo -- add in alternative bamboo styles to simulate random placement. (see commented out node box definitions. -todo -- Add Flourish to the endcap node for bamboo. -todo -- mash all of that together so that it drops as one item, and chooses what version to be, in on_place. -todo -- Add in Extras. +todo -- Add Flourish to the endcap node for bamboo. Fix the flourish to not look odd or plain. +todo -- mash all of that together so that it drops as one item. todo -- fix scaffolding placing, instead of using on_rightclick first. -todo -- make graphic for top node of bamboo. -todo -- add bamboo to junk items in fishing. - waiting on specific things: todo -- Raft -- need model todo -- Raft with Chest. same. todo -- handle bonemeal... +----------------------------------------------------------- +todo -- Add in Extras. -- Moved to Official Mod Pack. + Notes: When bone meal is used on it, it grows by 1–2 blocks. Bamboo can grow up to 12–16 blocks tall. The top of a bamboo plant requires a light level of 9 or above to grow. From 38c6969292e1fb03e8dc14ca56107134d36e8955 Mon Sep 17 00:00:00 2001 From: Michieal Date: Thu, 29 Dec 2022 11:31:13 -0500 Subject: [PATCH 018/105] Fix mod.conf in mcl_fishing Fix bamboo nodes on_destruct to handle the alt nodes too. clean up ToDos --- mods/ITEMS/mcl_bamboo/init.lua | 2 +- mods/ITEMS/mcl_fishing/mod.conf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/init.lua b/mods/ITEMS/mcl_bamboo/init.lua index 34b4ebb8f..5c867e194 100644 --- a/mods/ITEMS/mcl_bamboo/init.lua +++ b/mods/ITEMS/mcl_bamboo/init.lua @@ -321,7 +321,7 @@ local function create_nodes() minetest.register_node(bamboo, bamboo_def) local bamboo_top = table.copy(bamboo_def) - bamboo_top.groups = {not_in_creative_inventory = 1, handy = 1, axey = 1, choppy = 1, flammable = 3} + bamboo_top.groups = {not_in_creative_inventory = 1, handy = 1, swordy = 1, choppy = 1, flammable = 3} bamboo_top.tiles = {"mcl_bamboo_endcap.png"} bamboo_top.drawtype = "plantlike" bamboo_top.paramtype2 = "meshoptions" diff --git a/mods/ITEMS/mcl_fishing/mod.conf b/mods/ITEMS/mcl_fishing/mod.conf index 5291bbe73..dbdd30c4c 100644 --- a/mods/ITEMS/mcl_fishing/mod.conf +++ b/mods/ITEMS/mcl_fishing/mod.conf @@ -1,3 +1,3 @@ name = mcl_fishing description = Adds fish and fishing poles to go fishing. -depends = mcl_core, mcl_sounds, mcl_loot, mcl_mobs, mcl_enchanting, mcl_throwing, mcl_colors, mcl_buckets. mcl_bamboo +depends = mcl_core, mcl_sounds, mcl_loot, mcl_mobs, mcl_enchanting, mcl_throwing, mcl_colors, mcl_buckets, mcl_bamboo From 34263c2ef385126d7ced0f94dfcd918aaa6a8819 Mon Sep 17 00:00:00 2001 From: Michieal Date: Thu, 29 Dec 2022 12:28:42 -0500 Subject: [PATCH 019/105] Change bamboo back to Axey, instead of swordy. --- mods/ITEMS/mcl_bamboo/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/init.lua b/mods/ITEMS/mcl_bamboo/init.lua index 5c867e194..c856cbf01 100644 --- a/mods/ITEMS/mcl_bamboo/init.lua +++ b/mods/ITEMS/mcl_bamboo/init.lua @@ -155,7 +155,7 @@ local function create_nodes() tiles = {"mcl_bamboo_bamboo_bottom.png", "mcl_bamboo_bamboo_bottom.png", "mcl_bamboo_bamboo.png"}, drawtype = "nodebox", paramtype = "light", - groups = {handy = 1, swordy = 1, choppy = 1, flammable = 3}, + groups = {handy = 1, axey = 1, choppy = 1, flammable = 3}, sounds = node_sound, drop = { @@ -321,7 +321,7 @@ local function create_nodes() minetest.register_node(bamboo, bamboo_def) local bamboo_top = table.copy(bamboo_def) - bamboo_top.groups = {not_in_creative_inventory = 1, handy = 1, swordy = 1, choppy = 1, flammable = 3} + bamboo_top.groups = {not_in_creative_inventory = 1, handy = 1, axey = 1, choppy = 1, flammable = 3} bamboo_top.tiles = {"mcl_bamboo_endcap.png"} bamboo_top.drawtype = "plantlike" bamboo_top.paramtype2 = "meshoptions" From 87327abfb9daf611674d0560cb3a3832e3b8c250 Mon Sep 17 00:00:00 2001 From: Michieal Date: Thu, 29 Dec 2022 13:16:48 -0500 Subject: [PATCH 020/105] Restructure Commit. Recipes are in recipes.lua Bamboo Basic nodes are in bamboo_base.lua Bamboo items are in bamboo_items.lua Bamboo api / globals are in globals.lua. --- mods/ITEMS/mcl_bamboo/bamboo_base.lua | 293 ++++++++ mods/ITEMS/mcl_bamboo/bamboo_items.lua | 437 ++++++++++++ mods/ITEMS/mcl_bamboo/bambootoo.lua | 157 ----- mods/ITEMS/mcl_bamboo/globals.lua | 131 ++++ mods/ITEMS/mcl_bamboo/init.lua | 884 +------------------------ mods/ITEMS/mcl_bamboo/recipes.lua | 183 +++++ 6 files changed, 1054 insertions(+), 1031 deletions(-) create mode 100644 mods/ITEMS/mcl_bamboo/bamboo_base.lua create mode 100644 mods/ITEMS/mcl_bamboo/bamboo_items.lua delete mode 100644 mods/ITEMS/mcl_bamboo/bambootoo.lua create mode 100644 mods/ITEMS/mcl_bamboo/globals.lua create mode 100644 mods/ITEMS/mcl_bamboo/recipes.lua diff --git a/mods/ITEMS/mcl_bamboo/bamboo_base.lua b/mods/ITEMS/mcl_bamboo/bamboo_base.lua new file mode 100644 index 000000000..7d54ef684 --- /dev/null +++ b/mods/ITEMS/mcl_bamboo/bamboo_base.lua @@ -0,0 +1,293 @@ +--- +--- Generated by EmmyLua(https://github.com/EmmyLua) +--- Created by michieal. +--- DateTime: 12/29/22 12:33 PM -- Restructure Date +--- + +-- LOCALS +local modname = minetest.get_current_modname() +local S = minetest.get_translator(modname) +local bamboo = "mcl_bamboo:bamboo" +local node_sound = mcl_sounds.node_sound_wood_defaults() + +-- CONSTS +local DOUBLE_DROP_CHANCE = 8 +local DEBUG = false + +local strlen = string.len() +local substr = string.sub() +local rand = math.random() + +-- basic bamboo nodes. +local bamboo_def = { + description = "Bamboo", + tiles = {"mcl_bamboo_bamboo_bottom.png", "mcl_bamboo_bamboo_bottom.png", "mcl_bamboo_bamboo.png"}, + drawtype = "nodebox", + paramtype = "light", + groups = {handy = 1, axey = 1, choppy = 1, flammable = 3}, + sounds = node_sound, + + drop = { + max_items = 1, + -- Maximum number of item lists to drop. + -- The entries in 'items' are processed in order. For each: + -- Item filtering is applied, chance of drop is applied, if both are + -- successful the entire item list is dropped. + -- Entry processing continues until the number of dropped item lists + -- equals 'max_items'. + -- Therefore, entries should progress from low to high drop chance. + items = { + -- Examples: + { + -- 1 in 100 chance of dropping. + -- Default rarity is '1'. + rarity = DOUBLE_DROP_CHANCE, + items = {bamboo .. " 2"}, + }, + { + -- 1 in 2 chance of dropping. + -- Default rarity is '1'. + rarity = 1, + items = {bamboo}, + }, + }, + }, + + inventory_image = "mcl_bamboo_bamboo_shoot.png", + wield_image = "mcl_bamboo_bamboo_shoot.png", + _mcl_blast_resistance = 1, + _mcl_hardness = 1.5, + node_box = { + type = "fixed", + fixed = { + {-0.175, -0.5, -0.195, 0.05, 0.5, 0.030}, + } + }, + + on_place = function(itemstack, placer, pointed_thing) + if pointed_thing.type ~= "node" then + return itemstack + end + local node = minetest.get_node(pointed_thing.under) + local pos = pointed_thing.under + if DEBUG then + minetest.log("mcl_bamboo::Node placement data:") + minetest.log(dump(pointed_thing)) + minetest.log(dump(node)) + end + + if DEBUG then + minetest.log("mcl_bamboo::Checking for protected placement of bamboo.") + end + if mcl_bamboo.is_protected(pos, placer) then + return + end + if DEBUG then + minetest.log("mcl_bamboo::placement of bamboo is not protected.") + end + + -- Use pointed node's on_rightclick function first, if present + if placer and not placer:get_player_control().sneak then + if minetest.registered_nodes[node.name] and minetest.registered_nodes[node.name].on_rightclick then + if DEBUG then + minetest.log("mcl_bamboo::attempting placement of bamboo via targeted node's on_rightclick.") + end + return minetest.registered_nodes[node.name].on_rightclick(pointed_thing.under, node, placer, itemstack) or itemstack + end + end + + local mboo = substr(node.name, strlen(node.name) - 3, strlen(node.name)) + + if mboo ~= "mboo" and mboo ~= "oo_1" and mboo ~= "oo_2" and mboo ~= "oo_3" then + -- not bamboo... + if node.name ~= "mcl_flowerpots:flower_pot" then + local found = false + for i = 1, #mcl_bamboo.bamboo_dirt_nodes do + if node.name == mcl_bamboo.bamboo_dirt_nodes[i] then + found = true + break + end + end + if not found then + return itemstack + end + end + end + + if DEBUG then + minetest.log("mcl_bamboo::placing bamboo directly.") + end + + local place_item = table.copy(itemstack) -- make a copy so that we don't indirectly mess with the original. + + if mboo == "mboo" then + return minetest.item_place(itemstack, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under))) + elseif mboo ~= "oo_1" then + place_item:set_name(bamboo .. "_1") + itemstack:set_count(itemstack:get_count() - 1) + minetest.item_place(place_item, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under))) + return itemstack, pointed_thing.under + elseif mboo ~= "oo_2" then + place_item:set_name(bamboo .. "_2") + itemstack:set_count(itemstack:get_count() - 1) + minetest.item_place(place_item, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under))) + return itemstack, pointed_thing.under + elseif mboo ~= "oo_3" then + place_item:set_name(bamboo .. "_3") + itemstack:set_count(itemstack:get_count() - 1) + minetest.item_place(place_item, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under))) + return itemstack, pointed_thing.under + else + local placed_type = rand(0, 3) -- randomly choose which one to place. + placed_type = rand(0, 3) + placed_type = rand(0, 3) + placed_type = rand(0, 3) -- Get the lua juices flowing. (Really, this is just to get it to give a real random number.) + if placed_type == 1 then + place_item:set_name(bamboo .. "_1") + end + if placed_type == 2 then + place_item:set_name(bamboo .. "_2") + end + if placed_type == 3 then + place_item:set_name(bamboo .. "_3") + end + itemstack:set_count(itemstack:get_count() - 1) + minetest.item_place(place_item, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under))) + return itemstack, pointed_thing.under + end + end, + + on_destruct = function(pos) + -- Node destructor; called before removing node. + local new_pos = vector.offset(pos, 0, 1, 0) + local node_above = minetest.get_node(new_pos) + local mboo = substr(node_above.name, strlen(node_above.name) - 3, strlen(node_above.name)) + + if node_above and (mboo == "mboo" or mboo == "oo_1" or mboo == "oo_2" or mboo == "oo_3") then + 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(bamboo) + if rand(1, DOUBLE_DROP_CHANCE) == 1 then + minetest.add_item(new_pos, istack) + end + minetest.add_item(new_pos, istack) + elseif node_above and node_above.name == "mcl_bamboo:bamboo_endcap" then + minetest.remove_node(new_pos) + minetest.sound_play(node_sound.dug, sound_params, true) + local istack = ItemStack(bamboo) + minetest.add_item(new_pos, istack) + if rand(1, DOUBLE_DROP_CHANCE) == 1 then + minetest.add_item(new_pos, istack) + end + end + end, +} +minetest.register_node(bamboo, bamboo_def) + +local bamboo_top = table.copy(bamboo_def) +bamboo_top.groups = {not_in_creative_inventory = 1, handy = 1, axey = 1, choppy = 1, flammable = 3} +bamboo_top.tiles = {"mcl_bamboo_endcap.png"} +bamboo_top.drawtype = "plantlike" +bamboo_top.paramtype2 = "meshoptions" +bamboo_top.param2 = 34 +bamboo_top.nodebox = nil + +bamboo_top.on_place = function(itemstack, _, _) + -- Should never occur... but, if it does, then nix it. + itemstack:set_name(bamboo) + return itemstack +end + +minetest.register_node("mcl_bamboo:bamboo_endcap", bamboo_top) + +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, bamboo_block = 1, fire_encouragement = 5, fire_flammability = 5}, + sounds = node_sound, + paramtype2 = "facedir", + drops = "mcl_bamboo:bamboo_block", + _mcl_blast_resistance = 3, + _mcl_hardness = 2, + _mcl_stripped_variant = "mcl_bamboo:bamboo_block_stripped", -- this allows us to use the built in Axe's strip block. + on_place = function(itemstack, placer, pointed_thing) + + local pos = pointed_thing.under + + if mcl_bamboo.is_protected(pos, placer) then + return + end + + -- Use pointed node's on_rightclick function first, if present + local node = minetest.get_node(pointed_thing.under) + if placer and not placer:get_player_control().sneak then + if minetest.registered_nodes[node.name] and minetest.registered_nodes[node.name].on_rightclick then + return minetest.registered_nodes[node.name].on_rightclick(pointed_thing.under, node, placer, itemstack) or itemstack + end + end + + return minetest.item_place(itemstack, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under))) + end, + +} + +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 = 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", { + description = S("Bamboo Plank"), + _doc_items_longdesc = S("Bamboo Plank"), + _doc_items_hidden = false, + tiles = {"mcl_bamboo_bamboo_plank.png"}, + stack_max = 64, + is_ground_content = false, + groups = {handy = 1, axey = 1, flammable = 3, wood = 1, building_block = 1, material_wood = 1, fire_encouragement = 5, fire_flammability = 20}, + sounds = mcl_sounds.node_sound_wood_defaults(), + _mcl_blast_resistance = 3, + _mcl_hardness = 2, +}) + +-- Bamboo Part 2 Base nodes. +-- Bamboo alternative node types. +local def = minetest.registered_nodes [bamboo] +def.node_box = { + type = "fixed", + fixed = { + {-0.05, -0.5, 0.285, -0.275, 0.5, 0.06}, + } +} +minetest.register_node(bamboo.."_1", def) + +def.node_box = { + type = "fixed", + fixed = { + {0.25, -0.5, 0.325, 0.025, 0.5, 0.100}, + } +} +minetest.register_node(bamboo.."_2", def) + +def.node_box = { + type = "fixed", + fixed = { + {-0.125, -0.5, 0.125, -0.3125, 0.5, 0.3125}, + } +} +minetest.register_node(bamboo.."_3", def) + +-- Bamboo Mosaic +local bamboo_mosaic = minetest.registered_nodes[bamboo .. "_plank"] +bamboo_mosaic.tiles = {"mcl_bamboo_bamboo_plank.png"} +bamboo_mosaic.groups = {handy = 1, axey = 1, flammable = 3, fire_encouragement = 5, fire_flammability = 20} +bamboo_mosaic.description = S("Bamboo Mosaic Plank") +bamboo_mosaic._doc_items_longdesc = S("Bamboo Mosaic Plank") +minetest.register_node("mcl_bamboo:bamboo_mosaic", bamboo_mosaic) + diff --git a/mods/ITEMS/mcl_bamboo/bamboo_items.lua b/mods/ITEMS/mcl_bamboo/bamboo_items.lua new file mode 100644 index 000000000..fe966eeb7 --- /dev/null +++ b/mods/ITEMS/mcl_bamboo/bamboo_items.lua @@ -0,0 +1,437 @@ +--- +--- Generated by EmmyLua(https://github.com/EmmyLua) +--- Created by michieal. +--- DateTime: 12/29/22 12:38 PM -- Restructure Date +--- +-- LOCALS +local modname = minetest.get_current_modname() +local S = minetest.get_translator(modname) +local bamboo = "mcl_bamboo:bamboo" +local adj_nodes = { + vector.new(0, 0, 1), + vector.new(0, 0, -1), + vector.new(1, 0, 0), + vector.new(-1, 0, 0), +} + +-- CONSTS +-- Due to door fix #2736, doors are displayed backwards. When this is fixed, set this variable to false. +local BROKEN_DOORS = true +local SIDE_SCAFFOLDING = false +local DEBUG = false + +local node_sound = mcl_sounds.node_sound_wood_defaults() + +-- specific bamboo nodes (Items)... Pt. 1 +if minetest.get_modpath("mcl_flowerpots") then + if DEBUG then + minetest.log("mcl_bamboo::FlowerPot Section Entrance. Modpath exists.") + end + if mcl_flowerpots ~= nil then + -- Flower-potted Bamboo... + local flwr_name = "mcl_bamboo:bamboo" + local flwr_def = {name = "bamboo_plant", + desc = S("Bamboo"), + image = "mcl_bamboo_bamboo_fpm.png", -- use with "register_potted_cube" + -- "mcl_bamboo_flower_pot.png", -- use with "register_potted_flower" + } + + mcl_flowerpots.register_potted_cube(flwr_name, flwr_def) + -- mcl_flowerpots.register_potted_flower(flwr_name, flwr_def) + minetest.register_alias("bamboo_flower_pot", "mcl_flowerpots:flower_pot_bamboo_plant") + end +end + +if minetest.get_modpath("mcl_doors") then + if mcl_doors then + local top_door_tiles = {} + local bot_door_tiles = {} + + if BROKEN_DOORS then + top_door_tiles = {"mcl_bamboo_door_top_alt.png", "mcl_bamboo_door_top.png"} + bot_door_tiles = {"mcl_bamboo_door_bottom_alt.png", "mcl_bamboo_door_bottom.png"} + else + top_door_tiles = {"mcl_bamboo_door_top.png", "mcl_bamboo_door_top.png"} + bot_door_tiles = {"mcl_bamboo_door_bottom.png", "mcl_bamboo_door_bottom.png"} + end + + local name = "mcl_bamboo:bamboo_door" + local def = { + description = S("Bamboo Door."), + inventory_image = "mcl_bamboo_door_wield.png", + wield_image = "mcl_bamboo_door_wield.png", + groups = {handy = 1, axey = 1, material_wood = 1, flammable = -1}, + _mcl_hardness = 3, + _mcl_blast_resistance = 3, + tiles_bottom = bot_door_tiles, + tiles_top = top_door_tiles, + sounds = mcl_sounds.node_sound_wood_defaults(), + } + + mcl_doors:register_door(name, def) + + name = "mcl_bamboo:bamboo_trapdoor" + local trap_def = { + description = S("Bamboo Trapdoor."), + inventory_image = "mcl_bamboo_door_complete.png", + groups = {}, + tile_front = "mcl_bamboo_trapdoor_top.png", + tile_side = "mcl_bamboo_trapdoor_side.png", + _doc_items_longdesc = S("Wooden trapdoors are horizontal barriers which can be opened and closed by hand or a redstone signal. They occupy the upper or lower part of a block, depending on how they have been placed. When open, they can be climbed like a ladder."), + _doc_items_usagehelp = S("To open or close the trapdoor, rightclick it or send a redstone signal to it."), + wield_image = "mcl_bamboo_trapdoor_wield.png", + inventory_image = "mcl_bamboo_trapdoor_wield.png", + groups = {handy = 1, axey = 1, mesecon_effector_on = 1, material_wood = 1, flammable = -1}, + _mcl_hardness = 3, + _mcl_blast_resistance = 3, + sounds = mcl_sounds.node_sound_wood_defaults(), + } + + mcl_doors:register_trapdoor(name, trap_def) + + minetest.register_alias("bamboo_door", "mcl_bamboo:bamboo_door") + minetest.register_alias("bamboo_trapdoor", "mcl_bamboo:bamboo_trapdoor") + end +end + +if minetest.get_modpath("mcl_stairs") then + if mcl_stairs ~= nil then + mcl_stairs.register_stair_and_slab_simple( + "bamboo_block", + "mcl_bamboo:bamboo_block", + S("Bamboo Stair"), + S("Bamboo Slab"), + S("Double Bamboo Slab") + ) + mcl_stairs.register_stair_and_slab_simple( + "bamboo_stripped", + "mcl_bamboo:bamboo_block_stripped", + S("Stripped Bamboo Stair"), + S("Stripped Bamboo Slab"), + S("Double Stripped Bamboo Slab") + ) + mcl_stairs.register_stair_and_slab_simple( + "bamboo_plank", + "mcl_bamboo:bamboo_plank", + S("Bamboo Plank Stair"), + 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_groups = { + wood_slab = 1, + building_block = 1, + slab = 1, + axey = 1, + handy = 1, + stair = 1, + flammable = 1, + fire_encouragement = 5, + fire_flammability = 20 + } + + minetest.override_item(bamboo_plank_slab, {groups = node_groups}) + end +end + +if minetest.get_modpath("mesecons_pressureplates") then + + if mesecon ~= nil and mesecon.register_pressure_plate ~= nil then + -- make sure that pressure plates are installed. + + -- Bamboo Pressure Plate... + + -- Register a Pressure Plate (api command doc.) + -- basename: base name of the pressure plate + -- description: description displayed in the player's inventory + -- textures_off:textures of the pressure plate when inactive + -- textures_on: textures of the pressure plate when active + -- image_w: wield image of the pressure plate + -- image_i: inventory image of the pressure plate + -- recipe: crafting recipe of the pressure plate + -- sounds: sound table (like in minetest.register_node) + -- plusgroups: group memberships (attached_node=1 and not_in_creative_inventory=1 are already used) + -- activated_by: optimal table with elements denoting by which entities this pressure plate is triggered + -- Possible table fields: + -- * player=true: Player + -- * mob=true: Mob + -- By default, is triggered by all entities + -- longdesc: Customized long description for the in-game help (if omitted, a dummy text is used) + + mesecon.register_pressure_plate( + "mcl_bamboo:pressure_plate_bamboo_wood", + S("Bamboo Pressure Plate"), + {"mcl_bamboo_bamboo_plank.png"}, + {"mcl_bamboo_bamboo_plank.png"}, + "mcl_bamboo_bamboo_plank.png", + nil, + {{"mcl_bamboo:bamboo_plank", "mcl_bamboo:bamboo_plank"}}, + mcl_sounds.node_sound_wood_defaults(), + {axey = 1, material_wood = 1}, + nil, + S("A wooden pressure plate is a redstone component which supplies its surrounding blocks with redstone power while any movable object (including dropped items, players and mobs) rests on top of it.")) + + minetest.register_craft({ + type = "fuel", + recipe = "mcl_bamboo:pressure_plate_bamboo_wood_off", + burntime = 15 + }) + minetest.register_alias("bamboo_pressure_plate", "mcl_bamboo:pressure_plate_bamboo_wood") + + end +end + +if minetest.get_modpath("mcl_signs") then + if DEBUG then + minetest.log("mcl_bamboo::Signs Section Entrance. Modpath exists.") + end + if mcl_signs ~= nil then + -- Bamboo Signs... + mcl_signs.register_sign_custom("mcl_bamboo", "_bamboo", "mcl_signs_sign_greyscale.png", + "#f6dc91", "default_sign_greyscale.png", "default_sign_greyscale.png", + "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 +end + +if minetest.get_modpath("mcl_fences") then + if DEBUG then + minetest.log("mcl_bamboo::Fences Section Entrance. Modpath exists.") + end + local id = "bamboo_fence" + local id_gate = "bamboo_fence_gate" + local wood_groups = {handy = 1, axey = 1, flammable = 2, fence_wood = 1, fire_encouragement = 5, fire_flammability = 20} + local wood_connect = {"group:fence_wood"} + + local fence_id = mcl_fences.register_fence(id, S("Bamboo Fence"), "mcl_bamboo_fence_bamboo.png", wood_groups, + 2, 15, wood_connect, node_sound) + local gate_id = mcl_fences.register_fence_gate(id, S("Bamboo Fence Gate"), "mcl_bamboo_fence_gate_bamboo.png", + wood_groups, 2, 15, node_sound) -- note: about missing params.. will use defaults. + + if DEBUG then + minetest.log(dump(fence_id)) + minetest.log(dump(gate_id)) + end + + local craft_wood = "mcl_bamboo:bamboo_plank" + minetest.register_craft({ + output = "mcl_bamboo:" .. id .. " 3", + recipe = { + {craft_wood, "mcl_core:stick", craft_wood}, + {craft_wood, "mcl_core:stick", craft_wood}, + } + }) + minetest.register_craft({ + output = "mcl_bamboo:" .. id_gate, + recipe = { + {"mcl_core:stick", craft_wood, "mcl_core:stick"}, + {"mcl_core:stick", craft_wood, "mcl_core:stick"}, + } + }) + -- mcl_fences.register_fence("nether_brick_fence", S("Nether Brick Fence"), "mcl_fences_fence_nether_brick.png", {pickaxey=1, deco_block=1, fence_nether_brick=1}, 2, 30, {"group:fence_nether_brick"}, mcl_sounds.node_sound_stone_defaults()) + minetest.register_alias("bamboo_fence", "mcl_fences:" .. id) + minetest.register_alias("bamboo_fence_gate", "mcl_fences:" .. id_gate) +end + +if minetest.get_modpath("mesecons_button") then + if mesecon ~= nil then + mesecon.register_button( + "bamboo", + S("Bamboo Button"), + "mcl_bamboo_bamboo_plank.png", + "mcl_bamboo:bamboo_plank", + node_sound, + {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."), + "mesecons_button_push") + end +end + +if minetest.get_modpath("mcl_stairs") then + if mcl_stairs ~= nil then + mcl_stairs.register_stair_and_slab_simple( + "bamboo_mosaic", + "mcl_bamboo:bamboo_mosaic", + S("Bamboo Mosaic Stair"), + S("Bamboo Mosaic Slab"), + S("Double Bamboo Mosaic Slab") + ) + end +end + +minetest.register_node("mcl_bamboo:scaffolding", { + description = S("Scaffolding"), + doc_items_longdesc = S("Scaffolding block used to climb up or out across areas."), + doc_items_hidden = false, + tiles = {"mcl_bamboo_scaffolding_top.png", "mcl_bamboo_scaffolding_top.png", "mcl_bamboo_scaffolding_bottom.png"}, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "4dir", + param2 = 0, + use_texture_alpha = "clip", + node_box = { + type = "fixed", + fixed = { + {-0.5, 0.375, -0.5, 0.5, 0.5, 0.5}, + {-0.5, -0.5, -0.5, -0.375, 0.5, -0.375}, + {0.375, -0.5, -0.5, 0.5, 0.5, -0.375}, + {0.375, -0.5, 0.375, 0.5, 0.5, 0.5}, + {-0.5, -0.5, 0.375, -0.375, 0.5, 0.5}, + } + }, + selection_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, + }, + }, + buildable_to = false, + is_ground_content = false, + walkable = false, + climbable = true, + physical = true, + node_placement_prediction = "", + groups = {handy = 1, axey = 1, flammable = 3, building_block = 1, material_wood = 1, fire_encouragement = 5, fire_flammability = 20, falling_node = 1, stack_falling = 1}, + sounds = mcl_sounds.node_sound_wood_defaults(), + _mcl_blast_resistance = 0, + _mcl_hardness = 0, + on_place = function(itemstack, placer, ptd) + local scaff_node_name = "mcl_bamboo:scaffolding" + if SIDE_SCAFFOLDING then + -- count param2 up when placing to the sides. Fall when > 6 + local ctrl = placer:get_player_control() + if ctrl and ctrl.sneak then + local pp2 = minetest.get_node(ptd.under).param2 + local np2 = pp2 + 1 + if minetest.get_node(vector.offset(ptd.above, 0, -1, 0)).name == "air" then + minetest.set_node(ptd.above, {name = "mcl_bamboo:scaffolding_horizontal", param2 = np2}) + itemstack:take_item(1) + end + if np2 > 6 then + minetest.check_single_for_falling(ptd.above) + end + return itemstack + end + end + if DEBUG then + minetest.log("mcl_bamboo::Checking for protected placement of scaffolding.") + end + local node = minetest.get_node(ptd.under) + local pos = ptd.under + if mcl_bamboo.is_protected(pos, placer) then + return + end + if DEBUG then + minetest.log("mcl_bamboo::placement of scaffolding is not protected.") + end + + --place on solid nodes + if itemstack:get_name() ~= node.name then + minetest.set_node(ptd.above, {name = scaff_node_name, param2 = 0}) + if not minetest.is_creative_enabled(placer:get_player_name()) then + itemstack:take_item(1) + end + return itemstack + end + + --build up when placing on existing scaffold + local h = 0 + repeat + pos.y = pos.y + 1 + local cn = minetest.get_node(pos) + local cnb = minetest.get_node(ptd.under) + local bn = minetest.get_node(vector.offset(ptd.under, 0, -1, 0)) + if cn.name == "air" then + -- first step to making scaffolding work like Minecraft scaffolding. + if cnb.name == scaff_node_name and bn == scaff_node_name and SIDE_SCAFFOLDING == false then + return itemstack + end + + minetest.set_node(pos, node) + if not minetest.is_creative_enabled(placer:get_player_name()) then + itemstack:take_item(1) + end + placer:set_wielded_item(itemstack) + return itemstack + end + h = h + 1 + until cn.name ~= node.name or itemstack:get_count() == 0 or h >= 128 + end, + on_destruct = function(pos) + -- Node destructor; called before removing node. + 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 + 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 + end, +}) + +minetest.register_node("mcl_bamboo:scaffolding_horizontal", { + description = S("Scaffolding (horizontal)"), + doc_items_longdesc = S("Scaffolding block used to climb up or out across areas."), + doc_items_hidden = false, + tiles = {"mcl_bamboo_scaffolding_top.png", "mcl_bamboo_scaffolding_top.png", "mcl_bamboo_scaffolding_bottom.png"}, + drop = "mcl_bamboo:scaffolding", + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "4dir", + param2 = 0, + use_texture_alpha = "clip", + node_box = { + type = "fixed", + fixed = { + {-0.5, 0.375, -0.5, 0.5, 0.5, 0.5}, + {-0.5, -0.5, -0.5, -0.375, 0.5, -0.375}, + {0.375, -0.5, -0.5, 0.5, 0.5, -0.375}, + {0.375, -0.5, 0.375, 0.5, 0.5, 0.5}, + {-0.5, -0.5, 0.375, -0.375, 0.5, 0.5}, + {-0.5, -0.5, -0.5, 0.5, -0.375, 0.5}, + } + }, + selection_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, + }, + }, + groups = {handy = 1, axey = 1, flammable = 3, building_block = 1, material_wood = 1, fire_encouragement = 5, fire_flammability = 20, not_in_creative_inventory = 1, falling_node = 1}, + _mcl_after_falling = function(pos) + if minetest.get_node(pos).name == "mcl_bamboo:scaffolding_horizontal" then + if minetest.get_node(vector.offset(pos, 0, 0, 0)).name ~= "mcl_bamboo:scaffolding" then + minetest.remove_node(pos) + minetest.add_item(pos, "mcl_bamboo:scaffolding") + else + minetest.set_node(vector.offset(pos, 0, 1, 0), {name = "mcl_bamboo:scaffolding"}) + end + end + end, + + on_place = function(itemstack, placer, pointed_thing) + if pointed_thing.type ~= "node" then + return itemstack + end + local node = minetest.get_node(pointed_thing.under) + local pos = pointed_thing.under + if mcl_bamboo.is_protected(pos, placer) then + return + end + -- todo: finish this section. + end + + +}) diff --git a/mods/ITEMS/mcl_bamboo/bambootoo.lua b/mods/ITEMS/mcl_bamboo/bambootoo.lua deleted file mode 100644 index 17607d0f9..000000000 --- a/mods/ITEMS/mcl_bamboo/bambootoo.lua +++ /dev/null @@ -1,157 +0,0 @@ ---- ---- Generated by EmmyLua(https://github.com/EmmyLua) ---- Created by michieal. ---- DateTime: 12/14/22 10:11 PM ---- - --- LOCALS -local modname = minetest.get_current_modname() -local S = minetest.get_translator(modname) -local bamboo = "mcl_bamboo:bamboo" -local adj_nodes = { - vector.new(0, 0, 1), - vector.new(0, 0, -1), - vector.new(1, 0, 0), - vector.new(-1, 0, 0), -} - -local function bambootoo_create_nodes() - -- Bamboo alternative node types. - local def = minetest.registered_nodes [bamboo] - def.node_box = { - type = "fixed", - fixed = { - {-0.05, -0.5, 0.285, -0.275, 0.5, 0.06}, - } - } - minetest.register_node(bamboo.."_1", def) - - def.node_box = { - type = "fixed", - fixed = { - {0.25, -0.5, 0.325, 0.025, 0.5, 0.100}, - } - } - minetest.register_node(bamboo.."_2", def) - - - def.node_box = { - type = "fixed", - fixed = { - {-0.125, -0.5, 0.125, -0.3125, 0.5, 0.3125}, - } - } - minetest.register_node(bamboo.."_3", def) - - local bamboo_mosaic = minetest.registered_nodes[bamboo .. "_plank"] - bamboo_mosaic.tiles = {"mcl_bamboo_bamboo_plank.png"} - bamboo_mosaic.groups = {handy = 1, axey = 1, flammable = 3, fire_encouragement = 5, fire_flammability = 20} - bamboo_mosaic.description = S("Bamboo Mosaic Plank") - bamboo_mosaic._doc_items_longdesc = S("Bamboo Mosaic Plank") - minetest.register_node("mcl_bamboo:bamboo_mosaic", bamboo_mosaic) - - if minetest.get_modpath("mcl_stairs") then - if mcl_stairs ~= nil then - mcl_stairs.register_stair_and_slab_simple( - "bamboo_mosaic", - "mcl_bamboo:bamboo_mosaic", - S("Bamboo Mosaic Stair"), - S("Bamboo Mosaic Slab"), - S("Double Bamboo Mosaic Slab") - ) - end - end - - - minetest.register_node("mcl_bamboo:scaffolding_horizontal", { - description = S("Scaffolding (horizontal)"), - doc_items_longdesc = S("Scaffolding block used to climb up or out across areas."), - doc_items_hidden = false, - tiles = {"mcl_bamboo_scaffolding_top.png", "mcl_bamboo_scaffolding_top.png", "mcl_bamboo_scaffolding_bottom.png"}, - drop = "mcl_bamboo:scaffolding", - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "4dir", - param2 = 0, - use_texture_alpha = "clip", - node_box = { - type = "fixed", - fixed = { - {-0.5, 0.375, -0.5, 0.5, 0.5, 0.5}, - {-0.5, -0.5, -0.5, -0.375, 0.5, -0.375}, - {0.375, -0.5, -0.5, 0.5, 0.5, -0.375}, - {0.375, -0.5, 0.375, 0.5, 0.5, 0.5}, - {-0.5, -0.5, 0.375, -0.375, 0.5, 0.5}, - {-0.5, -0.5, -0.5, 0.5, -0.375, 0.5}, - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, - }, - }, - groups = {handy = 1, axey = 1, flammable = 3, building_block = 1, material_wood = 1, fire_encouragement = 5, fire_flammability = 20, not_in_creative_inventory = 1, falling_node = 1}, - _mcl_after_falling = function(pos) - if minetest.get_node(pos).name == "mcl_bamboo:scaffolding_horizontal" then - if minetest.get_node(vector.offset(pos, 0, 0, 0)).name ~= "mcl_bamboo:scaffolding" then - minetest.remove_node(pos) - minetest.add_item(pos, "mcl_bamboo:scaffolding") - else - minetest.set_node(vector.offset(pos, 0, 1, 0), {name = "mcl_bamboo:scaffolding"}) - end - end - end, - - on_place = function(itemstack, placer, pointed_thing) - if pointed_thing.type ~= "node" then - return itemstack - end - local node = minetest.get_node(pointed_thing.under) - local pos = pointed_thing.under - if mcl_bamboo.is_protected(pos, placer) then - return - end - -- todo: finish this section. - end - - - }) - -end - -local function bambootoo_register_craftings() - - minetest.register_craft({ - output = bamboo .. "_mosaic", - recipe = { - {"mcl_stair:slab_bamboo_plank"}, - {"mcl_stair:slab_bamboo_plank"}, - } - }) - - -- Fuels... - - minetest.register_craft({ - type = "fuel", - recipe = bamboo .. "_mosaic", - burntime = 7.5, - }) - if minetest.get_modpath("mcl_stairs") then - if mcl_stairs ~= nil then - minetest.register_craft({ - type = "fuel", - recipe = "mcl_stairs:slab_bamboo_mosaic", - burntime = 7.5, - }) - minetest.register_craft({ - type = "fuel", - recipe = "mcl_stairs:stair_bamboo_mosaic", - burntime = 15, - }) - end - end -end - -bambootoo_create_nodes() -bambootoo_register_craftings() diff --git a/mods/ITEMS/mcl_bamboo/globals.lua b/mods/ITEMS/mcl_bamboo/globals.lua new file mode 100644 index 000000000..077c26f9e --- /dev/null +++ b/mods/ITEMS/mcl_bamboo/globals.lua @@ -0,0 +1,131 @@ +--- +--- Generated by EmmyLua(https://github.com/EmmyLua) +--- Created by michieal. +--- DateTime: 12/29/22 12:34 PM -- Restructure Date +--- + +local modname = minetest.get_current_modname() +local S = minetest.get_translator(modname) +local bamboo = "mcl_bamboo:bamboo" +local DEBUG = false + +local strlen = string.len() +local substr = string.sub() +local rand = math.random() + +--Bamboo can be planted on moss blocks, grass blocks, dirt, coarse dirt, rooted dirt, gravel, mycelium, podzol, sand, red sand, or mud +mcl_bamboo.bamboo_dirt_nodes = { + "mcl_core:redsand", + "mcl_core:sand", + "mcl_core:dirt", + "mcl_core:coarse_dirt", + "mcl_core:dirt_with_grass", + "mcl_core:podzol", + "mcl_core:mycelium", + "mcl_lush_caves:rooted_dirt", + "mcl_lush_caves:moss", + "mcl_mud:mud", +} + +--- pos: node position; placer: ObjectRef that is placing the item +--- returns: true if protected, otherwise false. +function mcl_bamboo.is_protected(pos, placer) + local name = placer:get_player_name() + if minetest.is_protected(pos, name) then + minetest.record_protection_violation(pos, name) + return true + end + return false +end + +function mcl_bamboo.grow_bamboo(pos, _) + local BAMBOO_SOIL_DIST = -16 + local BAM_MAX_HEIGHT_STPCHK = 11 + local BAM_MAX_HEIGHT_TOP = 15 + + local chk_pos + local soil_pos + if minetest.get_node_light(pos) < 8 then + return + end + local found = false -- used for the soil check + local mboo = "" + for py = -1, BAMBOO_SOIL_DIST, -1 do + chk_pos = vector.offset(pos, 0, py, 0) + local name = minetest.get_node(chk_pos).name + for i = 1, #mcl_bamboo.bamboo_dirt_nodes do + if name == mcl_bamboo.bamboo_dirt_nodes[i] then + found = true + soil_pos = chk_pos + break + end + end + if found then + break + else + mboo = substr(name, strlen(name) - 3, strlen(name)) + if mboo ~= "mboo" and mboo ~= "oo_1" and mboo ~= "oo_2" and mboo ~= "oo_3" then + break + end + end + end + -- requires knowing where the soil node is. + if not found then + return + end + local grow_amount = rand(1, 32) + grow_amount = rand(1, 32) + grow_amount = rand(1, 32) + grow_amount = rand(1, 32) -- because yeah, not truly random, or even a good prng. + -- Bonemeal: Grows the bamboo by 1-2 stems. (per the minecraft wiki.) + + for py = 1, BAM_MAX_HEIGHT_TOP do + chk_pos = vector.offset(pos, 0, py, 0) + local node_below = minetest.get_node(pos).name + local name = minetest.get_node(chk_pos).name + local dist = vector.distance(soil_pos, chk_pos) + if dist >= BAM_MAX_HEIGHT_STPCHK then + -- stop growing check. + if name == "air" then + local height = rand(BAM_MAX_HEIGHT_STPCHK, BAM_MAX_HEIGHT_TOP) + if height == dist then + minetest.set_node(chk_pos, {name = "mcl_bamboo:bamboo_endcap"}) + end + end + break + end + mboo = substr(name, strlen(name) - 3, strlen(name)) + if name == "air" then + minetest.set_node(chk_pos, {name = node_below}) + -- handle growing a second node. + if grow_amount == 2 then + chk_pos = vector.offset(chk_pos, 0, 1, 0) + if minetest.get_node(chk_pos).name == "air" then + minetest.set_node(chk_pos, {name = node_below}) + end + end + break + elseif mboo ~= "mboo" and mboo ~= "oo_1" and mboo ~= "oo_2" and mboo ~= "oo_3" then + break + end + end + +end + +-- Add Groups function, courtesy of Warr1024. +function mcl_bamboo.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 diff --git a/mods/ITEMS/mcl_bamboo/init.lua b/mods/ITEMS/mcl_bamboo/init.lua index c856cbf01..af782340e 100644 --- a/mods/ITEMS/mcl_bamboo/init.lua +++ b/mods/ITEMS/mcl_bamboo/init.lua @@ -12,880 +12,16 @@ local bamboo = "mcl_bamboo:bamboo" mcl_bamboo = {} -local node_sound = mcl_sounds.node_sound_wood_defaults() - --- CONSTS -local SIDE_SCAFFOLDING = false -local DEBUG = false -local DOUBLE_DROP_CHANCE = 8 - -local BAMBOO_SOIL_DIST = -16 -local BAM_MAX_HEIGHT_STPCHK = 11 -local BAM_MAX_HEIGHT_TOP = 15 - --- Due to door fix #2736, doors are displayed backwards. When this is fixed, set this variable to false. -local BROKEN_DOORS = true - ---Bamboo can be planted on moss blocks, grass blocks, dirt, coarse dirt, rooted dirt, gravel, mycelium, podzol, sand, red sand, or mud -local bamboo_dirt_nodes = { - "mcl_core:redsand", - "mcl_core:sand", - "mcl_core:dirt", - "mcl_core:coarse_dirt", - "mcl_core:dirt_with_grass", - "mcl_core:podzol", - "mcl_core:mycelium", - "mcl_lush_caves:rooted_dirt", - "mcl_lush_caves:moss", - "mcl_mud:mud", -} - -local strlen = string.len() -local substr = string.sub() -local rand = math.random() - ---- pos: node position; placer: ObjectRef that is placing the item ---- returns: true if protected, otherwise false. -function mcl_bamboo.is_protected(pos, placer) - local name = placer:get_player_name() - if minetest.is_protected(pos, name) then - minetest.record_protection_violation(pos, name) - return true - end - return false -end - -function mcl_bamboo.grow_bamboo(pos, _) - if not force or force == "" then - force = false - end - local chk_pos - local soil_pos - if minetest.get_node_light(pos) < 8 then - return - end - local found = false -- used for the soil check - local mboo = "" - for py = -1, BAMBOO_SOIL_DIST, -1 do - chk_pos = vector.offset(pos, 0, py, 0) - local name = minetest.get_node(chk_pos).name - for i = 1, #bamboo_dirt_nodes do - if name == bamboo_dirt_nodes[i] then - found = true - soil_pos = chk_pos - break - end - end - if found then - break - else - mboo = substr(name, strlen(name) - 3, strlen(name)) - if mboo ~= "mboo" and mboo ~= "oo_1" and mboo ~= "oo_2" and mboo ~= "oo_3" then - break - end - end - end - -- requires knowing where the soil node is. - if not found then - return - end - local grow_amount = rand(1, 32) - grow_amount = rand(1, 32) - grow_amount = rand(1, 32) - grow_amount = rand(1, 32) -- because yeah, not truly random, or even a good prng. - -- Bonemeal: Grows the bamboo by 1-2 stems. (per the minecraft wiki.) - - for py = 1, BAM_MAX_HEIGHT_TOP do - chk_pos = vector.offset(pos, 0, py, 0) - local node_below = minetest.get_node(pos).name - local name = minetest.get_node(chk_pos).name - local dist = vector.distance(soil_pos, chk_pos) - if dist >= BAM_MAX_HEIGHT_STPCHK then - -- stop growing check. - if name == "air" then - local height = rand(BAM_MAX_HEIGHT_STPCHK, BAM_MAX_HEIGHT_TOP) - if height == dist then - minetest.set_node(chk_pos, {name = "mcl_bamboo:bamboo_endcap"}) - end - end - break - end - mboo = substr(name, strlen(name) - 3, strlen(name)) - if name == "air" then - minetest.set_node(chk_pos, {name = node_below}) - -- handle growing a second node. - if grow_amount == 2 then - chk_pos = vector.offset(chk_pos, 0, 1, 0) - if minetest.get_node(chk_pos).name == "air" then - minetest.set_node(chk_pos, {name = node_below}) - end - end - break - elseif mboo ~= "mboo" and mboo ~= "oo_1" and mboo ~= "oo_2" and mboo ~= "oo_3" then - break - end - end - -end - --- Add Groups function, courtesy of Warr1024. -function mcl_bamboo.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 FUNCTIONS - -local function create_nodes() - - local bamboo_def = { - description = "Bamboo", - tiles = {"mcl_bamboo_bamboo_bottom.png", "mcl_bamboo_bamboo_bottom.png", "mcl_bamboo_bamboo.png"}, - drawtype = "nodebox", - paramtype = "light", - groups = {handy = 1, axey = 1, choppy = 1, flammable = 3}, - sounds = node_sound, - - drop = { - max_items = 1, - -- Maximum number of item lists to drop. - -- The entries in 'items' are processed in order. For each: - -- Item filtering is applied, chance of drop is applied, if both are - -- successful the entire item list is dropped. - -- Entry processing continues until the number of dropped item lists - -- equals 'max_items'. - -- Therefore, entries should progress from low to high drop chance. - items = { - -- Examples: - { - -- 1 in 100 chance of dropping. - -- Default rarity is '1'. - rarity = DOUBLE_DROP_CHANCE, - items = {bamboo .. " 2"}, - }, - { - -- 1 in 2 chance of dropping. - -- Default rarity is '1'. - rarity = 1, - items = {bamboo}, - }, - }, - }, - - inventory_image = "mcl_bamboo_bamboo_shoot.png", - wield_image = "mcl_bamboo_bamboo_shoot.png", - _mcl_blast_resistance = 1, - _mcl_hardness = 1.5, - node_box = { - type = "fixed", - fixed = { - {-0.175, -0.5, -0.195, 0.05, 0.5, 0.030}, - } - }, - - on_place = function(itemstack, placer, pointed_thing) - if pointed_thing.type ~= "node" then - return itemstack - end - local node = minetest.get_node(pointed_thing.under) - local pos = pointed_thing.under - if DEBUG then - minetest.log("mcl_bamboo::Node placement data:") - minetest.log(dump(pointed_thing)) - minetest.log(dump(node)) - end - - if DEBUG then - minetest.log("mcl_bamboo::Checking for protected placement of bamboo.") - end - if mcl_bamboo.is_protected(pos, placer) then - return - end - if DEBUG then - minetest.log("mcl_bamboo::placement of bamboo is not protected.") - end - - -- Use pointed node's on_rightclick function first, if present - if placer and not placer:get_player_control().sneak then - if minetest.registered_nodes[node.name] and minetest.registered_nodes[node.name].on_rightclick then - if DEBUG then - minetest.log("mcl_bamboo::attempting placement of bamboo via targeted node's on_rightclick.") - end - return minetest.registered_nodes[node.name].on_rightclick(pointed_thing.under, node, placer, itemstack) or itemstack - end - end - - local mboo = substr(node.name, strlen(node.name) - 3, strlen(node.name)) - - if mboo ~= "mboo" and mboo ~= "oo_1" and mboo ~= "oo_2" and mboo ~= "oo_3" then - -- not bamboo... - if node.name ~= "mcl_flowerpots:flower_pot" then - local found = false - for i = 1, #bamboo_dirt_nodes do - if node.name == bamboo_dirt_nodes[i] then - found = true - break - end - end - if not found then - return itemstack - end - end - end - - if DEBUG then - minetest.log("mcl_bamboo::placing bamboo directly.") - end - - local place_item = table.copy(itemstack) -- make a copy so that we don't indirectly mess with the original. - - if mboo == "mboo" then - return minetest.item_place(itemstack, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under))) - elseif mboo ~= "oo_1" then - place_item:set_name(bamboo .. "_1") - itemstack:set_count(itemstack:get_count() - 1) - minetest.item_place(place_item, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under))) - return itemstack, pointed_thing.under - elseif mboo ~= "oo_2" then - place_item:set_name(bamboo .. "_2") - itemstack:set_count(itemstack:get_count() - 1) - minetest.item_place(place_item, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under))) - return itemstack, pointed_thing.under - elseif mboo ~= "oo_3" then - place_item:set_name(bamboo .. "_3") - itemstack:set_count(itemstack:get_count() - 1) - minetest.item_place(place_item, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under))) - return itemstack, pointed_thing.under - else - local placed_type = rand(0, 3) -- randomly choose which one to place. - placed_type = rand(0, 3) - placed_type = rand(0, 3) - placed_type = rand(0, 3) -- Get the lua juices flowing. (Really, this is just to get it to give a real random number.) - if placed_type == 1 then - place_item:set_name(bamboo .. "_1") - end - if placed_type == 2 then - place_item:set_name(bamboo .. "_2") - end - if placed_type == 3 then - place_item:set_name(bamboo .. "_3") - end - itemstack:set_count(itemstack:get_count() - 1) - minetest.item_place(place_item, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under))) - return itemstack, pointed_thing.under - end - end, - - on_destruct = function(pos) - -- Node destructor; called before removing node. - local new_pos = vector.offset(pos, 0, 1, 0) - local node_above = minetest.get_node(new_pos) - local mboo = substr(node_above.name, strlen(node_above.name) - 3, strlen(node_above.name)) - - if node_above and (mboo == "mboo" or mboo == "oo_1" or mboo == "oo_2" or mboo == "oo_3") then - 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(bamboo) - if rand(1, DOUBLE_DROP_CHANCE) == 1 then - minetest.add_item(new_pos, istack) - end - minetest.add_item(new_pos, istack) - elseif node_above and node_above.name == "mcl_bamboo:bamboo_endcap" then - minetest.remove_node(new_pos) - minetest.sound_play(node_sound.dug, sound_params, true) - local istack = ItemStack(bamboo) - minetest.add_item(new_pos, istack) - if rand(1, DOUBLE_DROP_CHANCE) == 1 then - minetest.add_item(new_pos, istack) - end - end - end, - } - minetest.register_node(bamboo, bamboo_def) - - local bamboo_top = table.copy(bamboo_def) - bamboo_top.groups = {not_in_creative_inventory = 1, handy = 1, axey = 1, choppy = 1, flammable = 3} - bamboo_top.tiles = {"mcl_bamboo_endcap.png"} - bamboo_top.drawtype = "plantlike" - bamboo_top.paramtype2 = "meshoptions" - bamboo_top.param2 = 34 - bamboo_top.nodebox = nil - - bamboo_top.on_place = function(itemstack, _, _) - -- Should never occur... but, if it does, then nix it. - itemstack:set_name(bamboo) - return itemstack - end - - minetest.register_node("mcl_bamboo:bamboo_endcap", bamboo_top) - - 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, bamboo_block = 1, fire_encouragement = 5, fire_flammability = 5}, - sounds = node_sound, - paramtype2 = "facedir", - drops = "mcl_bamboo:bamboo_block", - _mcl_blast_resistance = 3, - _mcl_hardness = 2, - _mcl_stripped_variant = "mcl_bamboo:bamboo_block_stripped", -- this allows us to use the built in Axe's strip block. - on_place = function(itemstack, placer, pointed_thing) - - local pos = pointed_thing.under - - if mcl_bamboo.is_protected(pos, placer) then - return - end - - -- Use pointed node's on_rightclick function first, if present - local node = minetest.get_node(pointed_thing.under) - if placer and not placer:get_player_control().sneak then - if minetest.registered_nodes[node.name] and minetest.registered_nodes[node.name].on_rightclick then - return minetest.registered_nodes[node.name].on_rightclick(pointed_thing.under, node, placer, itemstack) or itemstack - end - end - - return minetest.item_place(itemstack, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under))) - end, - - } - - -- basic bamboo 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 = 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", { - description = S("Bamboo Plank"), - _doc_items_longdesc = S("Bamboo Plank"), - _doc_items_hidden = false, - tiles = {"mcl_bamboo_bamboo_plank.png"}, - stack_max = 64, - is_ground_content = false, - groups = {handy = 1, axey = 1, flammable = 3, wood = 1, building_block = 1, material_wood = 1, fire_encouragement = 5, fire_flammability = 20}, - sounds = mcl_sounds.node_sound_wood_defaults(), - _mcl_blast_resistance = 3, - _mcl_hardness = 2, - }) - - -- specific bamboo nodes... - if minetest.get_modpath("mcl_flowerpots") then - if DEBUG then - minetest.log("mcl_bamboo::FlowerPot Section Entrance. Modpath exists.") - end - if mcl_flowerpots ~= nil then - -- Flower-potted Bamboo... - local flwr_name = "mcl_bamboo:bamboo" - local flwr_def = {name = "bamboo_plant", - desc = S("Bamboo"), - image = "mcl_bamboo_bamboo_fpm.png", -- use with "register_potted_cube" - -- "mcl_bamboo_flower_pot.png", -- use with "register_potted_flower" - } - - mcl_flowerpots.register_potted_cube(flwr_name, flwr_def) - -- mcl_flowerpots.register_potted_flower(flwr_name, flwr_def) - minetest.register_alias("bamboo_flower_pot", "mcl_flowerpots:flower_pot_bamboo_plant") - end - end - - if minetest.get_modpath("mcl_doors") then - if mcl_doors then - local top_door_tiles = {} - local bot_door_tiles = {} - - if BROKEN_DOORS then - top_door_tiles = {"mcl_bamboo_door_top_alt.png", "mcl_bamboo_door_top.png"} - bot_door_tiles = {"mcl_bamboo_door_bottom_alt.png", "mcl_bamboo_door_bottom.png"} - else - top_door_tiles = {"mcl_bamboo_door_top.png", "mcl_bamboo_door_top.png"} - bot_door_tiles = {"mcl_bamboo_door_bottom.png", "mcl_bamboo_door_bottom.png"} - end - - local name = "mcl_bamboo:bamboo_door" - local def = { - description = S("Bamboo Door."), - inventory_image = "mcl_bamboo_door_wield.png", - wield_image = "mcl_bamboo_door_wield.png", - groups = {handy = 1, axey = 1, material_wood = 1, flammable = -1}, - _mcl_hardness = 3, - _mcl_blast_resistance = 3, - tiles_bottom = bot_door_tiles, - tiles_top = top_door_tiles, - sounds = mcl_sounds.node_sound_wood_defaults(), - } - - mcl_doors:register_door(name, def) - - name = "mcl_bamboo:bamboo_trapdoor" - local trap_def = { - description = S("Bamboo Trapdoor."), - inventory_image = "mcl_bamboo_door_complete.png", - groups = {}, - tile_front = "mcl_bamboo_trapdoor_top.png", - tile_side = "mcl_bamboo_trapdoor_side.png", - _doc_items_longdesc = S("Wooden trapdoors are horizontal barriers which can be opened and closed by hand or a redstone signal. They occupy the upper or lower part of a block, depending on how they have been placed. When open, they can be climbed like a ladder."), - _doc_items_usagehelp = S("To open or close the trapdoor, rightclick it or send a redstone signal to it."), - wield_image = "mcl_bamboo_trapdoor_wield.png", - inventory_image = "mcl_bamboo_trapdoor_wield.png", - groups = {handy = 1, axey = 1, mesecon_effector_on = 1, material_wood = 1, flammable = -1}, - _mcl_hardness = 3, - _mcl_blast_resistance = 3, - sounds = mcl_sounds.node_sound_wood_defaults(), - } - - mcl_doors:register_trapdoor(name, trap_def) - - minetest.register_alias("bamboo_door", "mcl_bamboo:bamboo_door") - minetest.register_alias("bamboo_trapdoor", "mcl_bamboo:bamboo_trapdoor") - end - end - - if minetest.get_modpath("mcl_stairs") then - if mcl_stairs ~= nil then - mcl_stairs.register_stair_and_slab_simple( - "bamboo_block", - "mcl_bamboo:bamboo_block", - S("Bamboo Stair"), - S("Bamboo Slab"), - S("Double Bamboo Slab") - ) - mcl_stairs.register_stair_and_slab_simple( - "bamboo_stripped", - "mcl_bamboo:bamboo_block_stripped", - S("Stripped Bamboo Stair"), - S("Stripped Bamboo Slab"), - S("Double Stripped Bamboo Slab") - ) - mcl_stairs.register_stair_and_slab_simple( - "bamboo_plank", - "mcl_bamboo:bamboo_plank", - S("Bamboo Plank Stair"), - 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_groups = { - wood_slab = 1, - building_block = 1, - slab = 1, - axey = 1, - handy = 1, - stair = 1, - flammable = 1, - fire_encouragement = 5, - fire_flammability = 20 - } - - minetest.override_item(bamboo_plank_slab, {groups = node_groups}) - end - end - - if minetest.get_modpath("mesecons_pressureplates") then - - if mesecon ~= nil and mesecon.register_pressure_plate ~= nil then - -- make sure that pressure plates are installed. - - -- Bamboo Pressure Plate... - - -- Register a Pressure Plate (api command doc.) - -- basename: base name of the pressure plate - -- description: description displayed in the player's inventory - -- textures_off:textures of the pressure plate when inactive - -- textures_on: textures of the pressure plate when active - -- image_w: wield image of the pressure plate - -- image_i: inventory image of the pressure plate - -- recipe: crafting recipe of the pressure plate - -- sounds: sound table (like in minetest.register_node) - -- plusgroups: group memberships (attached_node=1 and not_in_creative_inventory=1 are already used) - -- activated_by: optimal table with elements denoting by which entities this pressure plate is triggered - -- Possible table fields: - -- * player=true: Player - -- * mob=true: Mob - -- By default, is triggered by all entities - -- longdesc: Customized long description for the in-game help (if omitted, a dummy text is used) - - mesecon.register_pressure_plate( - "mcl_bamboo:pressure_plate_bamboo_wood", - S("Bamboo Pressure Plate"), - {"mcl_bamboo_bamboo_plank.png"}, - {"mcl_bamboo_bamboo_plank.png"}, - "mcl_bamboo_bamboo_plank.png", - nil, - {{"mcl_bamboo:bamboo_plank", "mcl_bamboo:bamboo_plank"}}, - mcl_sounds.node_sound_wood_defaults(), - {axey = 1, material_wood = 1}, - nil, - S("A wooden pressure plate is a redstone component which supplies its surrounding blocks with redstone power while any movable object (including dropped items, players and mobs) rests on top of it.")) - - minetest.register_craft({ - type = "fuel", - recipe = "mcl_bamboo:pressure_plate_bamboo_wood_off", - burntime = 15 - }) - minetest.register_alias("bamboo_pressure_plate", "mcl_bamboo:pressure_plate_bamboo_wood") - - end - end - - if minetest.get_modpath("mcl_signs") then - if DEBUG then - minetest.log("mcl_bamboo::Signs Section Entrance. Modpath exists.") - end - if mcl_signs ~= nil then - -- Bamboo Signs... - mcl_signs.register_sign_custom("mcl_bamboo", "_bamboo", "mcl_signs_sign_greyscale.png", - "#f6dc91", "default_sign_greyscale.png", "default_sign_greyscale.png", - "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 - end - - if minetest.get_modpath("mcl_fences") then - if DEBUG then - minetest.log("mcl_bamboo::Fences Section Entrance. Modpath exists.") - end - local id = "bamboo_fence" - local id_gate = "bamboo_fence_gate" - local wood_groups = {handy = 1, axey = 1, flammable = 2, fence_wood = 1, fire_encouragement = 5, fire_flammability = 20} - local wood_connect = {"group:fence_wood"} - - local fence_id = mcl_fences.register_fence(id, S("Bamboo Fence"), "mcl_bamboo_fence_bamboo.png", wood_groups, - 2, 15, wood_connect, node_sound) - local gate_id = mcl_fences.register_fence_gate(id, S("Bamboo Fence Gate"), "mcl_bamboo_fence_gate_bamboo.png", - wood_groups, 2, 15, node_sound) -- note: about missing params.. will use defaults. - - if DEBUG then - minetest.log(dump(fence_id)) - minetest.log(dump(gate_id)) - end - - local craft_wood = "mcl_bamboo:bamboo_plank" - minetest.register_craft({ - output = "mcl_bamboo:" .. id .. " 3", - recipe = { - {craft_wood, "mcl_core:stick", craft_wood}, - {craft_wood, "mcl_core:stick", craft_wood}, - } - }) - minetest.register_craft({ - output = "mcl_bamboo:" .. id_gate, - recipe = { - {"mcl_core:stick", craft_wood, "mcl_core:stick"}, - {"mcl_core:stick", craft_wood, "mcl_core:stick"}, - } - }) - -- mcl_fences.register_fence("nether_brick_fence", S("Nether Brick Fence"), "mcl_fences_fence_nether_brick.png", {pickaxey=1, deco_block=1, fence_nether_brick=1}, 2, 30, {"group:fence_nether_brick"}, mcl_sounds.node_sound_stone_defaults()) - minetest.register_alias("bamboo_fence", "mcl_fences:" .. id) - minetest.register_alias("bamboo_fence_gate", "mcl_fences:" .. id_gate) - end - - if minetest.get_modpath("mesecons_button") then - if mesecon ~= nil then - mesecon.register_button( - "bamboo", - S("Bamboo Button"), - "mcl_bamboo_bamboo_plank.png", - "mcl_bamboo:bamboo_plank", - node_sound, - {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."), - "mesecons_button_push") - end - end - - minetest.register_node("mcl_bamboo:scaffolding", { - description = S("Scaffolding"), - doc_items_longdesc = S("Scaffolding block used to climb up or out across areas."), - doc_items_hidden = false, - tiles = {"mcl_bamboo_scaffolding_top.png", "mcl_bamboo_scaffolding_top.png", "mcl_bamboo_scaffolding_bottom.png"}, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "4dir", - param2 = 0, - use_texture_alpha = "clip", - node_box = { - type = "fixed", - fixed = { - {-0.5, 0.375, -0.5, 0.5, 0.5, 0.5}, - {-0.5, -0.5, -0.5, -0.375, 0.5, -0.375}, - {0.375, -0.5, -0.5, 0.5, 0.5, -0.375}, - {0.375, -0.5, 0.375, 0.5, 0.5, 0.5}, - {-0.5, -0.5, 0.375, -0.375, 0.5, 0.5}, - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, - }, - }, - buildable_to = false, - is_ground_content = false, - walkable = false, - climbable = true, - physical = true, - node_placement_prediction = "", - groups = {handy = 1, axey = 1, flammable = 3, building_block = 1, material_wood = 1, fire_encouragement = 5, fire_flammability = 20, falling_node = 1, stack_falling = 1}, - sounds = mcl_sounds.node_sound_wood_defaults(), - _mcl_blast_resistance = 0, - _mcl_hardness = 0, - on_place = function(itemstack, placer, ptd) - local scaff_node_name = "mcl_bamboo:scaffolding" - if SIDE_SCAFFOLDING then - -- count param2 up when placing to the sides. Fall when > 6 - local ctrl = placer:get_player_control() - if ctrl and ctrl.sneak then - local pp2 = minetest.get_node(ptd.under).param2 - local np2 = pp2 + 1 - if minetest.get_node(vector.offset(ptd.above, 0, -1, 0)).name == "air" then - minetest.set_node(ptd.above, {name = "mcl_bamboo:scaffolding_horizontal", param2 = np2}) - itemstack:take_item(1) - end - if np2 > 6 then - minetest.check_single_for_falling(ptd.above) - end - return itemstack - end - end - if DEBUG then - minetest.log("mcl_bamboo::Checking for protected placement of scaffolding.") - end - local node = minetest.get_node(ptd.under) - local pos = ptd.under - if mcl_bamboo.is_protected(pos, placer) then - return - end - if DEBUG then - minetest.log("mcl_bamboo::placement of scaffolding is not protected.") - end - - --place on solid nodes - if itemstack:get_name() ~= node.name then - minetest.set_node(ptd.above, {name = scaff_node_name, param2 = 0}) - if not minetest.is_creative_enabled(placer:get_player_name()) then - itemstack:take_item(1) - end - return itemstack - end - - --build up when placing on existing scaffold - local h = 0 - repeat - pos.y = pos.y + 1 - local cn = minetest.get_node(pos) - local cnb = minetest.get_node(ptd.under) - local bn = minetest.get_node(vector.offset(ptd.under, 0, -1, 0)) - if cn.name == "air" then - -- first step to making scaffolding work like Minecraft scaffolding. - if cnb.name == scaff_node_name and bn == scaff_node_name and SIDE_SCAFFOLDING == false then - return itemstack - end - - minetest.set_node(pos, node) - if not minetest.is_creative_enabled(placer:get_player_name()) then - itemstack:take_item(1) - end - placer:set_wielded_item(itemstack) - return itemstack - end - h = h + 1 - until cn.name ~= node.name or itemstack:get_count() == 0 or h >= 128 - end, - on_destruct = function(pos) - -- Node destructor; called before removing node. - 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 - 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 - end, - }) - -end - -local function register_craftings() - -- Craftings - - minetest.register_craft({ - output = bamboo .. "_block", - recipe = { - {bamboo, bamboo, bamboo}, - {bamboo, bamboo, bamboo}, - {bamboo, bamboo, bamboo}, - } - }) - - minetest.register_craft({ - output = bamboo .. "_plank 2", - recipe = { - {bamboo .. "_block"}, - } - }) - - minetest.register_craft({ - output = bamboo .. "_plank 2", - recipe = { - {bamboo .. "_block_stripped"}, - } - }) - - minetest.register_craft({ - output = "mcl_core:stick", - recipe = { - {bamboo}, - {bamboo}, - } - }) - - minetest.register_craft({ - output = "mcl_bamboo:scaffolding 6", - recipe = {{bamboo, "mcl_mobitems:string", bamboo}, - {bamboo, "", bamboo}, - {bamboo, "", bamboo}} - }) - - minetest.register_craft({ - output = "mcl_bamboo:bamboo_door 3", - recipe = { - {bamboo .. "_plank", bamboo .. "_plank"}, - {bamboo .. "_plank", bamboo .. "_plank"}, - {bamboo .. "_plank", bamboo .. "_plank"} - } - }) - - minetest.register_craft({ - output = "mcl_bamboo:bamboo_trapdoor 2", - recipe = { - {bamboo .. "_plank", bamboo .. "_plank", bamboo .. "_plank"}, - {bamboo .. "_plank", bamboo .. "_plank", bamboo .. "_plank"}, - } - }) - - -- Fuels - minetest.register_craft({ - type = "fuel", - recipe = "mcl_bamboo:bamboo_door", - burntime = 10, - }) - - minetest.register_craft({ - type = "fuel", - recipe = "mcl_bamboo:bamboo_trapdoor", - burntime = 15, - }) - - minetest.register_craft({ - type = "fuel", - recipe = bamboo, - burntime = 2.5, -- supposed to be 1/2 that of a stick, per minecraft wiki as of JE 1.19.3 - }) - - minetest.register_craft({ - type = "fuel", - recipe = bamboo .. "_block", - burntime = 15, - }) - - minetest.register_craft({ - type = "fuel", - recipe = bamboo .. "_block_stripped", - burntime = 15, - }) - - minetest.register_craft({ - type = "fuel", - recipe = bamboo .. "_plank", - burntime = 7.5, - }) - - minetest.register_craft({ - type = "fuel", - recipe = "mcl_bamboo:scaffolding", - burntime = 20 - }) - - if minetest.get_modpath("mcl_stairs") then - if mcl_stairs ~= nil then - 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, - }) - - minetest.register_craft({ - type = "fuel", - recipe = "mcl_stairs:stair_bamboo_plank", - burntime = 15, - }) - minetest.register_craft({ - type = "fuel", - recipe = "mcl_stairs:stair_bamboo_block", - burntime = 15, - }) - minetest.register_craft({ - type = "fuel", - recipe = "mcl_stairs:stair_bamboo_stripped", - burntime = 15, - }) - end - end - - minetest.register_craft({ - type = "fuel", - recipe = "mesecons_button:button_bamboo_off", - burntime = 5, - }) - -end - -create_nodes() -register_craftings() - --- BAMBOO_TOO (Bamboo two) -dofile(minetest.get_modpath(modname) .. "/bambootoo.lua") +-- BAMBOO GLOBALS +dofile(minetest.get_modpath(modname) .. "/globals.lua") +-- BAMBOO Base Nodes +dofile(minetest.get_modpath(modname) .. "/bamboo_base.lua") +-- BAMBOO ITEMS +dofile(minetest.get_modpath(modname) .. "/bamboo_items.lua") +-- BAMBOO RECIPES +dofile(minetest.get_modpath(modname) .. "/recipes.lua") + +-- ------------------------------------------------------------ --ABMs minetest.register_abm({ diff --git a/mods/ITEMS/mcl_bamboo/recipes.lua b/mods/ITEMS/mcl_bamboo/recipes.lua new file mode 100644 index 000000000..78f5c9c87 --- /dev/null +++ b/mods/ITEMS/mcl_bamboo/recipes.lua @@ -0,0 +1,183 @@ +--- +--- Generated by EmmyLua(https://github.com/EmmyLua) +--- Created by michieal. +--- DateTime: 12/29/22 12:46 PM -- Restructure Date +--- These are all of the fuel recipes and all of the crafting recipes, consolidated into one place. + +local bamboo = "mcl_bamboo:bamboo" + + -- Craftings + -- Basic Bamboo craftings + minetest.register_craft({ + output = "mcl_core:stick", + recipe = { + {bamboo}, + {bamboo}, + } + }) + + minetest.register_craft({ + output = bamboo .. "_block", + recipe = { + {bamboo, bamboo, bamboo}, + {bamboo, bamboo, bamboo}, + {bamboo, bamboo, bamboo}, + } + }) + + minetest.register_craft({ + output = bamboo .. "_plank 2", + recipe = { + {bamboo .. "_block"}, + } + }) + + minetest.register_craft({ + output = bamboo .. "_plank 2", + recipe = { + {bamboo .. "_block_stripped"}, + } + }) + + minetest.register_craft({ + output = bamboo .. "_mosaic", + recipe = { + {"mcl_stair:slab_bamboo_plank"}, + {"mcl_stair:slab_bamboo_plank"}, + } + }) + + -- Bamboo specific items + + if minetest.get_modpath("mcl_doors") then + if mcl_doors then + minetest.register_craft({ + output = "mcl_bamboo:bamboo_door 3", + recipe = { + {bamboo .. "_plank", bamboo .. "_plank"}, + {bamboo .. "_plank", bamboo .. "_plank"}, + {bamboo .. "_plank", bamboo .. "_plank"} + } + }) + minetest.register_craft({ + output = "mcl_bamboo:bamboo_trapdoor 2", + recipe = { + {bamboo .. "_plank", bamboo .. "_plank", bamboo .. "_plank"}, + {bamboo .. "_plank", bamboo .. "_plank", bamboo .. "_plank"}, + } + }) + end + end + + minetest.register_craft({ + output = "mcl_bamboo:scaffolding 6", + recipe = {{bamboo, "mcl_mobitems:string", bamboo}, + {bamboo, "", bamboo}, + {bamboo, "", bamboo}} + }) + + -- Fuels + -- Basic Bamboo nodes + minetest.register_craft({ + type = "fuel", + recipe = bamboo, + burntime = 2.5, -- supposed to be 1/2 that of a stick, per minecraft wiki as of JE 1.19.3 + }) + + minetest.register_craft({ + type = "fuel", + recipe = bamboo .. "_block", + burntime = 15, + }) + + minetest.register_craft({ + type = "fuel", + recipe = bamboo .. "_block_stripped", + burntime = 15, + }) + + minetest.register_craft({ + type = "fuel", + recipe = bamboo .. "_plank", + burntime = 7.5, + }) + + minetest.register_craft({ + type = "fuel", + recipe = bamboo .. "_mosaic", + burntime = 7.5, + }) + + -- Bamboo Items + if minetest.get_modpath("mcl_doors") then + if mcl_doors then + minetest.register_craft({ + type = "fuel", + recipe = "mcl_bamboo:bamboo_door", + burntime = 10, + }) + + minetest.register_craft({ + type = "fuel", + recipe = "mcl_bamboo:bamboo_trapdoor", + burntime = 15, + }) + end + end + + if minetest.get_modpath("mcl_stairs") then + if mcl_stairs ~= nil then + 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, + }) + minetest.register_craft({ + type = "fuel", + recipe = "mcl_stairs:stair_bamboo_plank", + burntime = 15, + }) + minetest.register_craft({ + type = "fuel", + recipe = "mcl_stairs:stair_bamboo_block", + burntime = 15, + }) + minetest.register_craft({ + type = "fuel", + recipe = "mcl_stairs:stair_bamboo_stripped", + burntime = 15, + }) + minetest.register_craft({ + type = "fuel", + recipe = "mcl_stairs:slab_bamboo_mosaic", + burntime = 7.5, + }) + minetest.register_craft({ + type = "fuel", + recipe = "mcl_stairs:stair_bamboo_mosaic", + burntime = 15, + }) + end + end + + minetest.register_craft({ + type = "fuel", + recipe = "mesecons_button:button_bamboo_off", + burntime = 5, + }) + + minetest.register_craft({ + type = "fuel", + recipe = "mcl_bamboo:scaffolding", + burntime = 20 + }) From 23b62c296a94bab99a92bc89bb18ff44f2c39dd7 Mon Sep 17 00:00:00 2001 From: Michieal Date: Sun, 1 Jan 2023 23:07:20 -0500 Subject: [PATCH 021/105] Fix code caching errors, and remove unused variables from init. --- mods/ITEMS/mcl_bamboo/bamboo_base.lua | 6 +++--- mods/ITEMS/mcl_bamboo/globals.lua | 6 +++--- mods/ITEMS/mcl_bamboo/init.lua | 1 - 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/bamboo_base.lua b/mods/ITEMS/mcl_bamboo/bamboo_base.lua index 7d54ef684..c23836c9b 100644 --- a/mods/ITEMS/mcl_bamboo/bamboo_base.lua +++ b/mods/ITEMS/mcl_bamboo/bamboo_base.lua @@ -14,9 +14,9 @@ local node_sound = mcl_sounds.node_sound_wood_defaults() local DOUBLE_DROP_CHANCE = 8 local DEBUG = false -local strlen = string.len() -local substr = string.sub() -local rand = math.random() +local strlen = string.len +local substr = string.sub +local rand = math.random -- basic bamboo nodes. local bamboo_def = { diff --git a/mods/ITEMS/mcl_bamboo/globals.lua b/mods/ITEMS/mcl_bamboo/globals.lua index 077c26f9e..a2bfacb15 100644 --- a/mods/ITEMS/mcl_bamboo/globals.lua +++ b/mods/ITEMS/mcl_bamboo/globals.lua @@ -9,9 +9,9 @@ local S = minetest.get_translator(modname) local bamboo = "mcl_bamboo:bamboo" local DEBUG = false -local strlen = string.len() -local substr = string.sub() -local rand = math.random() +local strlen = string.len +local substr = string.sub +local rand = math.random --Bamboo can be planted on moss blocks, grass blocks, dirt, coarse dirt, rooted dirt, gravel, mycelium, podzol, sand, red sand, or mud mcl_bamboo.bamboo_dirt_nodes = { diff --git a/mods/ITEMS/mcl_bamboo/init.lua b/mods/ITEMS/mcl_bamboo/init.lua index af782340e..93191f49c 100644 --- a/mods/ITEMS/mcl_bamboo/init.lua +++ b/mods/ITEMS/mcl_bamboo/init.lua @@ -7,7 +7,6 @@ -- LOCALS local modname = minetest.get_current_modname() -local S = minetest.get_translator(modname) local bamboo = "mcl_bamboo:bamboo" mcl_bamboo = {} From a7a0c4791a15ab423aa5dda2ce4f890a8635a412 Mon Sep 17 00:00:00 2001 From: Michieal Date: Mon, 2 Jan 2023 02:19:33 -0500 Subject: [PATCH 022/105] Many bug fixes, Adjusted randomizing code. And, Now with Lime-Cherry Kool-aid!! Yum! --- mods/ITEMS/mcl_bamboo/bamboo_base.lua | 127 ++++++++++++++++++++------ 1 file changed, 98 insertions(+), 29 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/bamboo_base.lua b/mods/ITEMS/mcl_bamboo/bamboo_base.lua index c23836c9b..95db3cf1f 100644 --- a/mods/ITEMS/mcl_bamboo/bamboo_base.lua +++ b/mods/ITEMS/mcl_bamboo/bamboo_base.lua @@ -16,7 +16,7 @@ local DEBUG = false local strlen = string.len local substr = string.sub -local rand = math.random +local pr = PseudoRandom(os.time() * 12 + 15766) -- switched from math.random() to PseudoRandom because the random wasn't very random. -- basic bamboo nodes. local bamboo_def = { @@ -63,6 +63,18 @@ local bamboo_def = { {-0.175, -0.5, -0.195, 0.05, 0.5, 0.030}, } }, + collision_box = { + type = "fixed", + fixed = { + {-0.175, -0.5, -0.195, 0.05, 0.5, 0.030}, + } + }, + selection_box = { + type = "fixed", + fixed = { + {-0.175, -0.5, -0.195, 0.05, 0.5, 0.030}, + } + }, on_place = function(itemstack, placer, pointed_thing) if pointed_thing.type ~= "node" then @@ -73,7 +85,7 @@ local bamboo_def = { if DEBUG then minetest.log("mcl_bamboo::Node placement data:") minetest.log(dump(pointed_thing)) - minetest.log(dump(node)) + minetest.log(node.name) end if DEBUG then @@ -118,38 +130,57 @@ local bamboo_def = { minetest.log("mcl_bamboo::placing bamboo directly.") end - local place_item = table.copy(itemstack) -- make a copy so that we don't indirectly mess with the original. + local place_item = ItemStack(itemstack) -- make a copy so that we don't indirectly mess with the original. + + node = minetest.get_node(pointed_thing.under) + mboo = substr(node.name, strlen(node.name) - 3, strlen(node.name)) + if DEBUG then + minetest.log("mboo:\n" .. mboo) + end if mboo == "mboo" then return minetest.item_place(itemstack, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under))) - elseif mboo ~= "oo_1" then + elseif mboo == "oo_1" then place_item:set_name(bamboo .. "_1") itemstack:set_count(itemstack:get_count() - 1) minetest.item_place(place_item, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under))) + if DEBUG then + minetest.log("Bamboo placeitem definition (current):\n" .. dump(place_item:to_table())) + end return itemstack, pointed_thing.under - elseif mboo ~= "oo_2" then + elseif mboo == "oo_2" then place_item:set_name(bamboo .. "_2") itemstack:set_count(itemstack:get_count() - 1) minetest.item_place(place_item, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under))) + if DEBUG then + minetest.log("Bamboo placeitem definition (current):\n" .. dump(place_item:to_table())) + end return itemstack, pointed_thing.under - elseif mboo ~= "oo_3" then + elseif mboo == "oo_3" then place_item:set_name(bamboo .. "_3") itemstack:set_count(itemstack:get_count() - 1) minetest.item_place(place_item, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under))) + if DEBUG then + minetest.log("Bamboo placeitem definition (current):\n" .. dump(place_item:to_table())) + end return itemstack, pointed_thing.under else - local placed_type = rand(0, 3) -- randomly choose which one to place. - placed_type = rand(0, 3) - placed_type = rand(0, 3) - placed_type = rand(0, 3) -- Get the lua juices flowing. (Really, this is just to get it to give a real random number.) - if placed_type == 1 then - place_item:set_name(bamboo .. "_1") + local placed_type = pr:next(0, 3) -- randomly choose which one to place. + placed_type = pr:next(0, 3) -- Get the lua juices flowing. (Really, this is just to get it to give a real random number.) + if DEBUG then + minetest.log("MCL_BAMBOO::Place_Bamboo_Shoot--Type: " .. placed_type) end - if placed_type == 2 then - place_item:set_name(bamboo .. "_2") + if placed_type == 0 then + place_item=ItemStack(bamboo) + elseif placed_type == 1 then + place_item=ItemStack(bamboo .. "_1") + elseif placed_type == 2 then + place_item=ItemStack(bamboo .. "_2") + elseif placed_type == 3 then + place_item=ItemStack(bamboo .. "_3") end - if placed_type == 3 then - place_item:set_name(bamboo .. "_3") + if DEBUG then + minetest.log("Bamboo place_item definition (current):\n" .. dump(place_item:to_table())) end itemstack:set_count(itemstack:get_count() - 1) minetest.item_place(place_item, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under))) @@ -162,26 +193,25 @@ local bamboo_def = { local new_pos = vector.offset(pos, 0, 1, 0) local node_above = minetest.get_node(new_pos) local mboo = substr(node_above.name, strlen(node_above.name) - 3, strlen(node_above.name)) + local istack = ItemStack(bamboo) + local sound_params = { + pos = new_pos, + gain = 1.0, -- default + max_hear_distance = 10, -- default, uses a Euclidean metric + } if node_above and (mboo == "mboo" or mboo == "oo_1" or mboo == "oo_2" or mboo == "oo_3") then - 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(bamboo) - if rand(1, DOUBLE_DROP_CHANCE) == 1 then + if pr:next(1, DOUBLE_DROP_CHANCE) == 1 then minetest.add_item(new_pos, istack) end minetest.add_item(new_pos, istack) elseif node_above and node_above.name == "mcl_bamboo:bamboo_endcap" then minetest.remove_node(new_pos) minetest.sound_play(node_sound.dug, sound_params, true) - local istack = ItemStack(bamboo) minetest.add_item(new_pos, istack) - if rand(1, DOUBLE_DROP_CHANCE) == 1 then + if pr:next(1, DOUBLE_DROP_CHANCE) == 1 then minetest.add_item(new_pos, istack) end end @@ -258,14 +288,27 @@ minetest.register_node("mcl_bamboo:bamboo_plank", { -- Bamboo Part 2 Base nodes. -- Bamboo alternative node types. -local def = minetest.registered_nodes [bamboo] +local def = table.copy(bamboo_def) def.node_box = { type = "fixed", fixed = { {-0.05, -0.5, 0.285, -0.275, 0.5, 0.06}, } } -minetest.register_node(bamboo.."_1", def) +def.collision_box = { + -- see [Node boxes] for possibilities + type = "fixed", + fixed = { + {-0.05, -0.5, 0.285, -0.275, 0.5, 0.06}, + } +} +def.selection_box = { + type = "fixed", + fixed = { + {-0.05, -0.5, 0.285, -0.275, 0.5, 0.06}, + } +} +minetest.register_node(bamboo .. "_1", def) def.node_box = { type = "fixed", @@ -273,7 +316,20 @@ def.node_box = { {0.25, -0.5, 0.325, 0.025, 0.5, 0.100}, } } -minetest.register_node(bamboo.."_2", def) +def.collision_box = { + -- see [Node boxes] for possibilities + type = "fixed", + fixed = { + {0.25, -0.5, 0.325, 0.025, 0.5, 0.100}, + } +} +def.selection_box = { + type = "fixed", + fixed = { + {0.25, -0.5, 0.325, 0.025, 0.5, 0.100}, + } +} +minetest.register_node(bamboo .. "_2", def) def.node_box = { type = "fixed", @@ -281,7 +337,20 @@ def.node_box = { {-0.125, -0.5, 0.125, -0.3125, 0.5, 0.3125}, } } -minetest.register_node(bamboo.."_3", def) +def.collision_box = { + -- see [Node boxes] for possibilities + type = "fixed", + fixed = { + {-0.125, -0.5, 0.125, -0.3125, 0.5, 0.3125}, + } +} +def.selection_box = { + type = "fixed", + fixed = { + {-0.125, -0.5, 0.125, -0.3125, 0.5, 0.3125}, + } +} +minetest.register_node(bamboo .. "_3", def) -- Bamboo Mosaic local bamboo_mosaic = minetest.registered_nodes[bamboo .. "_plank"] From d586b3fecc12955ea4785995ac96e761d41e1488 Mon Sep 17 00:00:00 2001 From: Michieal Date: Mon, 2 Jan 2023 03:54:26 -0500 Subject: [PATCH 023/105] Tracked down missing node type placement issues, and fixed them. Now with Chicken Cherry Cola! --- mods/ITEMS/mcl_bamboo/bamboo_base.lua | 101 ++++++++++++++++---------- 1 file changed, 62 insertions(+), 39 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/bamboo_base.lua b/mods/ITEMS/mcl_bamboo/bamboo_base.lua index 95db3cf1f..3d607ce09 100644 --- a/mods/ITEMS/mcl_bamboo/bamboo_base.lua +++ b/mods/ITEMS/mcl_bamboo/bamboo_base.lua @@ -8,6 +8,9 @@ local modname = minetest.get_current_modname() local S = minetest.get_translator(modname) local bamboo = "mcl_bamboo:bamboo" +local bamboo_one = bamboo .."_1" +local bamboo_two = bamboo.."_2" +local bamboo_three = bamboo.."_3" local node_sound = mcl_sounds.node_sound_wood_defaults() -- CONSTS @@ -18,6 +21,11 @@ local strlen = string.len local substr = string.sub local pr = PseudoRandom(os.time() * 12 + 15766) -- switched from math.random() to PseudoRandom because the random wasn't very random. +local on_rotate +if minetest.get_modpath("screwdriver") then + on_rotate = screwdriver.disallow +end + -- basic bamboo nodes. local bamboo_def = { description = "Bamboo", @@ -76,12 +84,16 @@ local bamboo_def = { } }, + on_rotate = on_rotate, + on_place = function(itemstack, placer, pointed_thing) if pointed_thing.type ~= "node" then return itemstack end local node = minetest.get_node(pointed_thing.under) local pos = pointed_thing.under + local nodename = node.name + if DEBUG then minetest.log("mcl_bamboo::Node placement data:") minetest.log(dump(pointed_thing)) @@ -108,14 +120,12 @@ local bamboo_def = { end end - local mboo = substr(node.name, strlen(node.name) - 3, strlen(node.name)) - - if mboo ~= "mboo" and mboo ~= "oo_1" and mboo ~= "oo_2" and mboo ~= "oo_3" then + if nodename ~= bamboo and nodename ~= bamboo_one and nodename ~= bamboo_two and nodename ~= bamboo_three then -- not bamboo... - if node.name ~= "mcl_flowerpots:flower_pot" then + if nodename ~= "mcl_flowerpots:flower_pot" then local found = false for i = 1, #mcl_bamboo.bamboo_dirt_nodes do - if node.name == mcl_bamboo.bamboo_dirt_nodes[i] then + if nodename == mcl_bamboo.bamboo_dirt_nodes[i] then found = true break end @@ -132,32 +142,26 @@ local bamboo_def = { local place_item = ItemStack(itemstack) -- make a copy so that we don't indirectly mess with the original. - node = minetest.get_node(pointed_thing.under) - mboo = substr(node.name, strlen(node.name) - 3, strlen(node.name)) - if DEBUG then - minetest.log("mboo:\n" .. mboo) - end - - if mboo == "mboo" then + if nodename == bamboo then return minetest.item_place(itemstack, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under))) - elseif mboo == "oo_1" then - place_item:set_name(bamboo .. "_1") + elseif nodename == bamboo_one then + place_item:set_name(bamboo_one) itemstack:set_count(itemstack:get_count() - 1) minetest.item_place(place_item, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under))) if DEBUG then minetest.log("Bamboo placeitem definition (current):\n" .. dump(place_item:to_table())) end return itemstack, pointed_thing.under - elseif mboo == "oo_2" then - place_item:set_name(bamboo .. "_2") + elseif nodename == bamboo_two then + place_item:set_name(bamboo_two) itemstack:set_count(itemstack:get_count() - 1) minetest.item_place(place_item, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under))) if DEBUG then minetest.log("Bamboo placeitem definition (current):\n" .. dump(place_item:to_table())) end return itemstack, pointed_thing.under - elseif mboo == "oo_3" then - place_item:set_name(bamboo .. "_3") + elseif nodename == bamboo_three then + place_item:set_name(bamboo_three) itemstack:set_count(itemstack:get_count() - 1) minetest.item_place(place_item, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under))) if DEBUG then @@ -165,26 +169,41 @@ local bamboo_def = { end return itemstack, pointed_thing.under else + itemstack:set_count(itemstack:get_count() - 1) local placed_type = pr:next(0, 3) -- randomly choose which one to place. - placed_type = pr:next(0, 3) -- Get the lua juices flowing. (Really, this is just to get it to give a real random number.) if DEBUG then minetest.log("MCL_BAMBOO::Place_Bamboo_Shoot--Type: " .. placed_type) end if placed_type == 0 then place_item=ItemStack(bamboo) + if DEBUG then + minetest.log("Bamboo place_item definition (current):\n" .. dump(place_item:to_table())) + end + minetest.item_place(place_item, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under))) + return itemstack, pointed_thing.under elseif placed_type == 1 then place_item=ItemStack(bamboo .. "_1") + if DEBUG then + minetest.log("Bamboo place_item definition (current):\n" .. dump(place_item:to_table())) + end + minetest.item_place(place_item, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under))) + return itemstack, pointed_thing.under elseif placed_type == 2 then place_item=ItemStack(bamboo .. "_2") + if DEBUG then + minetest.log("Bamboo place_item definition (current):\n" .. dump(place_item:to_table())) + end + minetest.item_place(place_item, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under))) + return itemstack, pointed_thing.under elseif placed_type == 3 then place_item=ItemStack(bamboo .. "_3") + if DEBUG then + minetest.log("Bamboo place_item definition (current):\n" .. dump(place_item:to_table())) + end + minetest.item_place(place_item, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under))) + return itemstack, pointed_thing.under end - if DEBUG then - minetest.log("Bamboo place_item definition (current):\n" .. dump(place_item:to_table())) - end - itemstack:set_count(itemstack:get_count() - 1) - minetest.item_place(place_item, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under))) - return itemstack, pointed_thing.under + return false end end, @@ -287,70 +306,74 @@ minetest.register_node("mcl_bamboo:bamboo_plank", { }) -- Bamboo Part 2 Base nodes. --- Bamboo alternative node types. -local def = table.copy(bamboo_def) -def.node_box = { +-- Bamboo alternative node types. Note that the table.copy's are very important! if you use a common node def and +-- make changes, even after registering them, the changes overwrite the previous node definitions, and in this case, +-- you will end up with 4 nodes all being type 3. +local bamboo_one_def = table.copy(bamboo_def) +bamboo_one_def.node_box = { type = "fixed", fixed = { {-0.05, -0.5, 0.285, -0.275, 0.5, 0.06}, } } -def.collision_box = { +bamboo_one_def.collision_box = { -- see [Node boxes] for possibilities type = "fixed", fixed = { {-0.05, -0.5, 0.285, -0.275, 0.5, 0.06}, } } -def.selection_box = { +bamboo_one_def.selection_box = { type = "fixed", fixed = { {-0.05, -0.5, 0.285, -0.275, 0.5, 0.06}, } } -minetest.register_node(bamboo .. "_1", def) +minetest.register_node(bamboo_one, bamboo_one_def) +local bamboo_two_def = table.copy(bamboo_def) -def.node_box = { +bamboo_two_def.node_box = { type = "fixed", fixed = { {0.25, -0.5, 0.325, 0.025, 0.5, 0.100}, } } -def.collision_box = { +bamboo_two_def.collision_box = { -- see [Node boxes] for possibilities type = "fixed", fixed = { {0.25, -0.5, 0.325, 0.025, 0.5, 0.100}, } } -def.selection_box = { +bamboo_two_def.selection_box = { type = "fixed", fixed = { {0.25, -0.5, 0.325, 0.025, 0.5, 0.100}, } } -minetest.register_node(bamboo .. "_2", def) +minetest.register_node(bamboo_two, bamboo_two_def) +local bamboo_three_def = table.copy(bamboo_def) -def.node_box = { +bamboo_three_def.node_box = { type = "fixed", fixed = { {-0.125, -0.5, 0.125, -0.3125, 0.5, 0.3125}, } } -def.collision_box = { +bamboo_three_def.collision_box = { -- see [Node boxes] for possibilities type = "fixed", fixed = { {-0.125, -0.5, 0.125, -0.3125, 0.5, 0.3125}, } } -def.selection_box = { +bamboo_three_def.selection_box = { type = "fixed", fixed = { {-0.125, -0.5, 0.125, -0.3125, 0.5, 0.3125}, } } -minetest.register_node(bamboo .. "_3", def) +minetest.register_node(bamboo_three, bamboo_three_def) -- Bamboo Mosaic local bamboo_mosaic = minetest.registered_nodes[bamboo .. "_plank"] From dd4a0a4172865296da8f400251b2a0056c6d2697 Mon Sep 17 00:00:00 2001 From: Michieal Date: Mon, 2 Jan 2023 19:24:56 -0500 Subject: [PATCH 024/105] Fixed mcl_fishing depending on mcl_bamboo. --- mods/ITEMS/mcl_fishing/mod.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_fishing/mod.conf b/mods/ITEMS/mcl_fishing/mod.conf index dbdd30c4c..71bde6146 100644 --- a/mods/ITEMS/mcl_fishing/mod.conf +++ b/mods/ITEMS/mcl_fishing/mod.conf @@ -1,3 +1,3 @@ name = mcl_fishing description = Adds fish and fishing poles to go fishing. -depends = mcl_core, mcl_sounds, mcl_loot, mcl_mobs, mcl_enchanting, mcl_throwing, mcl_colors, mcl_buckets, mcl_bamboo +depends = mcl_core, mcl_sounds, mcl_loot, mcl_mobs, mcl_enchanting, mcl_throwing, mcl_colors, mcl_buckets From 388632cd469bb97d81bf9e2f8465879354b555d4 Mon Sep 17 00:00:00 2001 From: Michieal Date: Mon, 2 Jan 2023 19:36:01 -0500 Subject: [PATCH 025/105] Fixed BROKEN skycolor --- mods/MAPGEN/mcl_biomes/init.lua | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/mods/MAPGEN/mcl_biomes/init.lua b/mods/MAPGEN/mcl_biomes/init.lua index 1ba61f9a5..8590a56a6 100644 --- a/mods/MAPGEN/mcl_biomes/init.lua +++ b/mods/MAPGEN/mcl_biomes/init.lua @@ -1682,6 +1682,8 @@ local end_skycolor = "#000000" heat_point = 95, _mcl_biome_type = "medium", _mcl_palette_index = 24, + _mcl_skycolor = "#77A8FF", + _mcl_fogcolor = overworld_fogcolor }) minetest.register_biome({ name = "BambooJungle_shore", @@ -1697,6 +1699,8 @@ local end_skycolor = "#000000" heat_point = 95, _mcl_biome_type = "medium", _mcl_palette_index = 24, + _mcl_skycolor = "#77A8FF", + _mcl_fogcolor = overworld_fogcolor }) minetest.register_biome({ name = "BambooJungle_ocean", @@ -1713,6 +1717,8 @@ local end_skycolor = "#000000" heat_point = 90, _mcl_biome_type = "medium", _mcl_palette_index = 24, + _mcl_skycolor = ocean_skycolor, + _mcl_fogcolor = overworld_fogcolor }) -- Bamboo Jungle M @@ -1731,6 +1737,8 @@ local end_skycolor = "#000000" heat_point = 95, _mcl_biome_type = "medium", _mcl_palette_index = 25, + _mcl_skycolor = "#77A8FF", + _mcl_fogcolor = overworld_fogcolor }) minetest.register_biome({ name = "BambooJungleM_shore", @@ -1746,6 +1754,8 @@ local end_skycolor = "#000000" heat_point = 90, _mcl_biome_type = "medium", _mcl_palette_index = 25, + _mcl_skycolor = "#77A8FF", + _mcl_fogcolor = overworld_fogcolor }) minetest.register_biome({ name = "BambooJungleM_ocean", @@ -1762,6 +1772,8 @@ local end_skycolor = "#000000" heat_point = 95, _mcl_biome_type = "medium", _mcl_palette_index = 25, + _mcl_skycolor = ocean_skycolor, + _mcl_fogcolor = overworld_fogcolor }) -- Bamboo Jungle Edge @@ -1779,6 +1791,8 @@ local end_skycolor = "#000000" heat_point = 90, _mcl_biome_type = "medium", _mcl_palette_index = 26, + _mcl_skycolor = "#77A8FF", + _mcl_fogcolor = overworld_fogcolor }) minetest.register_biome({ name = "BambooJungleEdge_ocean", @@ -1794,6 +1808,8 @@ local end_skycolor = "#000000" heat_point = 88, _mcl_biome_type = "medium", _mcl_palette_index = 26, + _mcl_skycolor = ocean_skycolor, + _mcl_fogcolor = overworld_fogcolor }) -- Jungle Edge M (very rare). @@ -1814,6 +1830,8 @@ local end_skycolor = "#000000" heat_point = 95, _mcl_biome_type = "medium", _mcl_palette_index = 27, + _mcl_skycolor = "#77A8FF", + _mcl_fogcolor = overworld_fogcolor }) minetest.register_biome({ name = "BambooJungleEdgeM_ocean", @@ -1829,10 +1847,10 @@ local end_skycolor = "#000000" heat_point = 90, _mcl_biome_type = "medium", _mcl_palette_index = 27, + _mcl_skycolor = ocean_skycolor, + _mcl_fogcolor = overworld_fogcolor }) - - -- Add deep ocean and underground biomes automatically. for i = 1, #overworld_biomes do local biome = overworld_biomes[i] From 5ef7d9f7a05801f6a46c29061b38a544e3aefb1f Mon Sep 17 00:00:00 2001 From: Michieal Date: Mon, 2 Jan 2023 22:36:09 -0500 Subject: [PATCH 026/105] Added in Bamboo_Plank variable. Dinked with the random number generator some. Moved Bamboo Mosaic from base to items. condensed some of the code duplication (WIP). started to add in checks to prevent bamboo from being placed against itself horizontally. Fixed a couple of naming issues. --- mods/ITEMS/mcl_bamboo/bamboo_base.lua | 41 ++-- mods/ITEMS/mcl_bamboo/bamboo_items.lua | 11 + mods/ITEMS/mcl_bamboo/globals.lua | 7 +- mods/ITEMS/mcl_bamboo/recipes.lua | 312 ++++++++++++------------- 4 files changed, 185 insertions(+), 186 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/bamboo_base.lua b/mods/ITEMS/mcl_bamboo/bamboo_base.lua index 3d607ce09..e30c377f7 100644 --- a/mods/ITEMS/mcl_bamboo/bamboo_base.lua +++ b/mods/ITEMS/mcl_bamboo/bamboo_base.lua @@ -139,37 +139,33 @@ local bamboo_def = { if DEBUG then minetest.log("mcl_bamboo::placing bamboo directly.") end - + local dir = vector.subtract(pointed_thing.under, pointed_thing.above) + local wdir = minetest.dir_to_wallmounted(dir) + local fdir = minetest.dir_to_facedir(dir) + if wdir ~= 1 then + return + end local place_item = ItemStack(itemstack) -- make a copy so that we don't indirectly mess with the original. + itemstack:set_count(itemstack:get_count() - 1) if nodename == bamboo then + -- return the missing item, so that we can lower the code + -- complexity and duplication. + itemstack:set_count(itemstack:get_count() + 1) return minetest.item_place(itemstack, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under))) elseif nodename == bamboo_one then place_item:set_name(bamboo_one) - itemstack:set_count(itemstack:get_count() - 1) minetest.item_place(place_item, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under))) - if DEBUG then - minetest.log("Bamboo placeitem definition (current):\n" .. dump(place_item:to_table())) - end return itemstack, pointed_thing.under elseif nodename == bamboo_two then place_item:set_name(bamboo_two) - itemstack:set_count(itemstack:get_count() - 1) minetest.item_place(place_item, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under))) - if DEBUG then - minetest.log("Bamboo placeitem definition (current):\n" .. dump(place_item:to_table())) - end return itemstack, pointed_thing.under elseif nodename == bamboo_three then place_item:set_name(bamboo_three) - itemstack:set_count(itemstack:get_count() - 1) minetest.item_place(place_item, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under))) - if DEBUG then - minetest.log("Bamboo placeitem definition (current):\n" .. dump(place_item:to_table())) - end return itemstack, pointed_thing.under else - itemstack:set_count(itemstack:get_count() - 1) local placed_type = pr:next(0, 3) -- randomly choose which one to place. if DEBUG then minetest.log("MCL_BAMBOO::Place_Bamboo_Shoot--Type: " .. placed_type) @@ -182,21 +178,21 @@ local bamboo_def = { minetest.item_place(place_item, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under))) return itemstack, pointed_thing.under elseif placed_type == 1 then - place_item=ItemStack(bamboo .. "_1") + place_item=ItemStack(bamboo_one) if DEBUG then minetest.log("Bamboo place_item definition (current):\n" .. dump(place_item:to_table())) end minetest.item_place(place_item, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under))) return itemstack, pointed_thing.under elseif placed_type == 2 then - place_item=ItemStack(bamboo .. "_2") + place_item=ItemStack(bamboo_two) if DEBUG then minetest.log("Bamboo place_item definition (current):\n" .. dump(place_item:to_table())) end minetest.item_place(place_item, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under))) return itemstack, pointed_thing.under elseif placed_type == 3 then - place_item=ItemStack(bamboo .. "_3") + place_item=ItemStack(bamboo_three) if DEBUG then minetest.log("Bamboo place_item definition (current):\n" .. dump(place_item:to_table())) end @@ -240,7 +236,7 @@ minetest.register_node(bamboo, bamboo_def) local bamboo_top = table.copy(bamboo_def) bamboo_top.groups = {not_in_creative_inventory = 1, handy = 1, axey = 1, choppy = 1, flammable = 3} -bamboo_top.tiles = {"mcl_bamboo_endcap.png"} +bamboo_top.tiles = {"mcl_bamboo_flower_pot.png"} bamboo_top.drawtype = "plantlike" bamboo_top.paramtype2 = "meshoptions" bamboo_top.param2 = 34 @@ -374,12 +370,3 @@ bamboo_three_def.selection_box = { } } minetest.register_node(bamboo_three, bamboo_three_def) - --- Bamboo Mosaic -local bamboo_mosaic = minetest.registered_nodes[bamboo .. "_plank"] -bamboo_mosaic.tiles = {"mcl_bamboo_bamboo_plank.png"} -bamboo_mosaic.groups = {handy = 1, axey = 1, flammable = 3, fire_encouragement = 5, fire_flammability = 20} -bamboo_mosaic.description = S("Bamboo Mosaic Plank") -bamboo_mosaic._doc_items_longdesc = S("Bamboo Mosaic Plank") -minetest.register_node("mcl_bamboo:bamboo_mosaic", bamboo_mosaic) - diff --git a/mods/ITEMS/mcl_bamboo/bamboo_items.lua b/mods/ITEMS/mcl_bamboo/bamboo_items.lua index fe966eeb7..bc91ba2d4 100644 --- a/mods/ITEMS/mcl_bamboo/bamboo_items.lua +++ b/mods/ITEMS/mcl_bamboo/bamboo_items.lua @@ -22,6 +22,17 @@ local DEBUG = false local node_sound = mcl_sounds.node_sound_wood_defaults() + +-- Bamboo Mosaic +local bamboo_mosaic = table.copy(minetest.registered_nodes[bamboo .. "_plank"]) +bamboo_mosaic.tiles = {"mcl_bamboo_bamboo_plank.png"} +bamboo_mosaic.groups = {handy = 1, axey = 1, flammable = 3, fire_encouragement = 5, fire_flammability = 20} +bamboo_mosaic.description = S("Bamboo Mosaic Plank") +bamboo_mosaic._doc_items_longdesc = S("Bamboo Mosaic Plank") +minetest.register_node("mcl_bamboo:bamboo_mosaic", bamboo_mosaic) + + + -- specific bamboo nodes (Items)... Pt. 1 if minetest.get_modpath("mcl_flowerpots") then if DEBUG then diff --git a/mods/ITEMS/mcl_bamboo/globals.lua b/mods/ITEMS/mcl_bamboo/globals.lua index a2bfacb15..d5db13fb3 100644 --- a/mods/ITEMS/mcl_bamboo/globals.lua +++ b/mods/ITEMS/mcl_bamboo/globals.lua @@ -12,6 +12,7 @@ local DEBUG = false local strlen = string.len local substr = string.sub local rand = math.random +math.randomseed((os.time() + 31) * 31415) -- try to make a valid seed --Bamboo can be planted on moss blocks, grass blocks, dirt, coarse dirt, rooted dirt, gravel, mycelium, podzol, sand, red sand, or mud mcl_bamboo.bamboo_dirt_nodes = { @@ -113,18 +114,18 @@ function mcl_bamboo.grow_bamboo(pos, _) end -- Add Groups function, courtesy of Warr1024. -function mcl_bamboo.addgroups(name, ...) +function mcl_bamboo.add_groups(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, ...) + local function add_all(x, ...) if not x then return end groups[x] = 1 - return addall(...) + return add_all(...) end addall(...) return minetest.override_item(name, {groups = groups}) diff --git a/mods/ITEMS/mcl_bamboo/recipes.lua b/mods/ITEMS/mcl_bamboo/recipes.lua index 78f5c9c87..9566fc9b8 100644 --- a/mods/ITEMS/mcl_bamboo/recipes.lua +++ b/mods/ITEMS/mcl_bamboo/recipes.lua @@ -5,179 +5,179 @@ --- These are all of the fuel recipes and all of the crafting recipes, consolidated into one place. local bamboo = "mcl_bamboo:bamboo" +local bamboo_plank = bamboo .. "_plank" +-- Craftings +-- Basic Bamboo craftings +minetest.register_craft({ + output = "mcl_core:stick", + recipe = { + {bamboo}, + {bamboo}, + } +}) - -- Craftings - -- Basic Bamboo craftings - minetest.register_craft({ - output = "mcl_core:stick", - recipe = { - {bamboo}, - {bamboo}, - } - }) +minetest.register_craft({ + output = bamboo .. "_block", + recipe = { + {bamboo, bamboo, bamboo}, + {bamboo, bamboo, bamboo}, + {bamboo, bamboo, bamboo}, + } +}) - minetest.register_craft({ - output = bamboo .. "_block", - recipe = { - {bamboo, bamboo, bamboo}, - {bamboo, bamboo, bamboo}, - {bamboo, bamboo, bamboo}, - } - }) +minetest.register_craft({ + output = bamboo_plank .. " 2", + recipe = { + {bamboo .. "_block"}, + } +}) - minetest.register_craft({ - output = bamboo .. "_plank 2", - recipe = { - {bamboo .. "_block"}, - } - }) +minetest.register_craft({ + output = bamboo_plank .. " 2", + recipe = { + {bamboo .. "_block_stripped"}, + } +}) - minetest.register_craft({ - output = bamboo .. "_plank 2", - recipe = { - {bamboo .. "_block_stripped"}, - } - }) +minetest.register_craft({ + output = bamboo .. "_mosaic", + recipe = { + {"mcl_stair:slab_bamboo_plank"}, + {"mcl_stair:slab_bamboo_plank"}, + } +}) - minetest.register_craft({ - output = bamboo .. "_mosaic", - recipe = { - {"mcl_stair:slab_bamboo_plank"}, - {"mcl_stair:slab_bamboo_plank"}, - } - }) +-- Bamboo specific items - -- Bamboo specific items - - if minetest.get_modpath("mcl_doors") then - if mcl_doors then - minetest.register_craft({ - output = "mcl_bamboo:bamboo_door 3", - recipe = { - {bamboo .. "_plank", bamboo .. "_plank"}, - {bamboo .. "_plank", bamboo .. "_plank"}, - {bamboo .. "_plank", bamboo .. "_plank"} - } - }) - minetest.register_craft({ - output = "mcl_bamboo:bamboo_trapdoor 2", - recipe = { - {bamboo .. "_plank", bamboo .. "_plank", bamboo .. "_plank"}, - {bamboo .. "_plank", bamboo .. "_plank", bamboo .. "_plank"}, - } - }) - end +if minetest.get_modpath("mcl_doors") then + if mcl_doors then + minetest.register_craft({ + output = "mcl_bamboo:bamboo_door 3", + recipe = { + {bamboo_plank, bamboo_plank}, + {bamboo_plank, bamboo_plank}, + {bamboo_plank, bamboo_plank} + } + }) + minetest.register_craft({ + output = "mcl_bamboo:bamboo_trapdoor 2", + recipe = { + {bamboo_plank, bamboo_plank, bamboo_plank}, + {bamboo_plank, bamboo_plank, bamboo_plank}, + } + }) end +end - minetest.register_craft({ - output = "mcl_bamboo:scaffolding 6", - recipe = {{bamboo, "mcl_mobitems:string", bamboo}, - {bamboo, "", bamboo}, - {bamboo, "", bamboo}} - }) +minetest.register_craft({ + output = "mcl_bamboo:scaffolding 6", + recipe = {{bamboo, "mcl_mobitems:string", bamboo}, + {bamboo, "", bamboo}, + {bamboo, "", bamboo}} +}) - -- Fuels - -- Basic Bamboo nodes - minetest.register_craft({ - type = "fuel", - recipe = bamboo, - burntime = 2.5, -- supposed to be 1/2 that of a stick, per minecraft wiki as of JE 1.19.3 - }) +-- Fuels +-- Basic Bamboo nodes +minetest.register_craft({ + type = "fuel", + recipe = bamboo, + burntime = 2.5, -- supposed to be 1/2 that of a stick, per minecraft wiki as of JE 1.19.3 +}) - minetest.register_craft({ - type = "fuel", - recipe = bamboo .. "_block", - burntime = 15, - }) +minetest.register_craft({ + type = "fuel", + recipe = bamboo .. "_block", + burntime = 15, +}) - minetest.register_craft({ - type = "fuel", - recipe = bamboo .. "_block_stripped", - burntime = 15, - }) +minetest.register_craft({ + type = "fuel", + recipe = bamboo .. "_block_stripped", + burntime = 15, +}) - minetest.register_craft({ - type = "fuel", - recipe = bamboo .. "_plank", - burntime = 7.5, - }) +minetest.register_craft({ + type = "fuel", + recipe = bamboo_plank, + burntime = 7.5, +}) - minetest.register_craft({ - type = "fuel", - recipe = bamboo .. "_mosaic", - burntime = 7.5, - }) +minetest.register_craft({ + type = "fuel", + recipe = bamboo .. "_mosaic", + burntime = 7.5, +}) - -- Bamboo Items - if minetest.get_modpath("mcl_doors") then - if mcl_doors then - minetest.register_craft({ - type = "fuel", - recipe = "mcl_bamboo:bamboo_door", - burntime = 10, - }) +-- Bamboo Items +if minetest.get_modpath("mcl_doors") then + if mcl_doors then + minetest.register_craft({ + type = "fuel", + recipe = "mcl_bamboo:bamboo_door", + burntime = 10, + }) - minetest.register_craft({ - type = "fuel", - recipe = "mcl_bamboo:bamboo_trapdoor", - burntime = 15, - }) - end + minetest.register_craft({ + type = "fuel", + recipe = "mcl_bamboo:bamboo_trapdoor", + burntime = 15, + }) end +end - if minetest.get_modpath("mcl_stairs") then - if mcl_stairs ~= nil then - 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, - }) - minetest.register_craft({ - type = "fuel", - recipe = "mcl_stairs:stair_bamboo_plank", - burntime = 15, - }) - minetest.register_craft({ - type = "fuel", - recipe = "mcl_stairs:stair_bamboo_block", - burntime = 15, - }) - minetest.register_craft({ - type = "fuel", - recipe = "mcl_stairs:stair_bamboo_stripped", - burntime = 15, - }) - minetest.register_craft({ - type = "fuel", - recipe = "mcl_stairs:slab_bamboo_mosaic", - burntime = 7.5, - }) - minetest.register_craft({ - type = "fuel", - recipe = "mcl_stairs:stair_bamboo_mosaic", - burntime = 15, - }) - end +if minetest.get_modpath("mcl_stairs") then + if mcl_stairs ~= nil then + 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, + }) + minetest.register_craft({ + type = "fuel", + recipe = "mcl_stairs:stair_bamboo_plank", + burntime = 15, + }) + minetest.register_craft({ + type = "fuel", + recipe = "mcl_stairs:stair_bamboo_block", + burntime = 15, + }) + minetest.register_craft({ + type = "fuel", + recipe = "mcl_stairs:stair_bamboo_stripped", + burntime = 15, + }) + minetest.register_craft({ + type = "fuel", + recipe = "mcl_stairs:slab_bamboo_mosaic", + burntime = 7.5, + }) + minetest.register_craft({ + type = "fuel", + recipe = "mcl_stairs:stair_bamboo_mosaic", + burntime = 15, + }) end +end - minetest.register_craft({ - type = "fuel", - recipe = "mesecons_button:button_bamboo_off", - burntime = 5, - }) +minetest.register_craft({ + type = "fuel", + recipe = "mesecons_button:button_bamboo_off", + burntime = 5, +}) - minetest.register_craft({ - type = "fuel", - recipe = "mcl_bamboo:scaffolding", - burntime = 20 - }) +minetest.register_craft({ + type = "fuel", + recipe = "mcl_bamboo:scaffolding", + burntime = 20 +}) From ef7fb0d2e3d33a2c9aa91e7428a487bfc304dd11 Mon Sep 17 00:00:00 2001 From: Michieal Date: Tue, 3 Jan 2023 01:38:12 -0500 Subject: [PATCH 027/105] Cleaned up the code. Fixed side placement of bamboo against bamboo. Dinked with the random number generator some more. Condensed some more of the code duplication (WIP). Added in MCL_Log function. Finally settled on a decent looking Bamboo top. --- mods/ITEMS/mcl_bamboo/bamboo_base.lua | 130 +++++++++--------- mods/ITEMS/mcl_bamboo/bamboo_items.lua | 40 ++---- mods/ITEMS/mcl_bamboo/globals.lua | 17 ++- mods/ITEMS/mcl_bamboo/init.lua | 3 +- .../mcl_bamboo/textures/mcl_bamboo_endcap.png | Bin 941 -> 257 bytes 5 files changed, 86 insertions(+), 104 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/bamboo_base.lua b/mods/ITEMS/mcl_bamboo/bamboo_base.lua index e30c377f7..11a4bab79 100644 --- a/mods/ITEMS/mcl_bamboo/bamboo_base.lua +++ b/mods/ITEMS/mcl_bamboo/bamboo_base.lua @@ -8,18 +8,17 @@ local modname = minetest.get_current_modname() local S = minetest.get_translator(modname) local bamboo = "mcl_bamboo:bamboo" -local bamboo_one = bamboo .."_1" -local bamboo_two = bamboo.."_2" -local bamboo_three = bamboo.."_3" +local bamboo_one = bamboo .. "_1" +local bamboo_two = bamboo .. "_2" +local bamboo_three = bamboo .. "_3" local node_sound = mcl_sounds.node_sound_wood_defaults() -- CONSTS local DOUBLE_DROP_CHANCE = 8 -local DEBUG = false local strlen = string.len local substr = string.sub -local pr = PseudoRandom(os.time() * 12 + 15766) -- switched from math.random() to PseudoRandom because the random wasn't very random. +local pr = PseudoRandom((os.time() + 15766) * 12) -- switched from math.random() to PseudoRandom because the random wasn't very random. local on_rotate if minetest.get_modpath("screwdriver") then @@ -93,34 +92,29 @@ local bamboo_def = { local node = minetest.get_node(pointed_thing.under) local pos = pointed_thing.under local nodename = node.name + -- check the nodename to see if it is one of the bamboo's + local bamboo_node = substr(nodename, 1, strlen(bamboo)) - if DEBUG then - minetest.log("mcl_bamboo::Node placement data:") - minetest.log(dump(pointed_thing)) - minetest.log(node.name) - end + mcl_bamboo.mcl_log("Node placement data:") + mcl_bamboo.mcl_log(dump(pointed_thing)) + mcl_bamboo.mcl_log(node.name) - if DEBUG then - minetest.log("mcl_bamboo::Checking for protected placement of bamboo.") - end + mcl_bamboo.mcl_log("Checking for protected placement of bamboo.") if mcl_bamboo.is_protected(pos, placer) then return end - if DEBUG then - minetest.log("mcl_bamboo::placement of bamboo is not protected.") - end + mcl_bamboo.mcl_log("placement of bamboo is not protected.") + -- Use pointed node's on_rightclick function first, if present if placer and not placer:get_player_control().sneak then if minetest.registered_nodes[node.name] and minetest.registered_nodes[node.name].on_rightclick then - if DEBUG then - minetest.log("mcl_bamboo::attempting placement of bamboo via targeted node's on_rightclick.") - end + mcl_bamboo.mcl_log("attempting placement of bamboo via targeted node's on_rightclick.") return minetest.registered_nodes[node.name].on_rightclick(pointed_thing.under, node, placer, itemstack) or itemstack end end - if nodename ~= bamboo and nodename ~= bamboo_one and nodename ~= bamboo_two and nodename ~= bamboo_three then + if bamboo_node ~= bamboo and nodename ~= "mcl_bamboo:bamboo_endcap" then -- not bamboo... if nodename ~= "mcl_flowerpots:flower_pot" then local found = false @@ -131,14 +125,13 @@ local bamboo_def = { end end if not found then - return itemstack + return end end end - if DEBUG then - minetest.log("mcl_bamboo::placing bamboo directly.") - end + mcl_bamboo.mcl_log("placing bamboo directly.") + local dir = vector.subtract(pointed_thing.under, pointed_thing.above) local wdir = minetest.dir_to_wallmounted(dir) local fdir = minetest.dir_to_facedir(dir) @@ -152,54 +145,33 @@ local bamboo_def = { -- return the missing item, so that we can lower the code -- complexity and duplication. itemstack:set_count(itemstack:get_count() + 1) - return minetest.item_place(itemstack, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under))) + return minetest.item_place(itemstack, placer, pointed_thing, fdir) elseif nodename == bamboo_one then place_item:set_name(bamboo_one) - minetest.item_place(place_item, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under))) + minetest.item_place(place_item, placer, pointed_thing, fdir) return itemstack, pointed_thing.under elseif nodename == bamboo_two then place_item:set_name(bamboo_two) - minetest.item_place(place_item, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under))) + minetest.item_place(place_item, placer, pointed_thing, fdir) return itemstack, pointed_thing.under elseif nodename == bamboo_three then place_item:set_name(bamboo_three) - minetest.item_place(place_item, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under))) + minetest.item_place(place_item, placer, pointed_thing, fdir) return itemstack, pointed_thing.under else local placed_type = pr:next(0, 3) -- randomly choose which one to place. - if DEBUG then - minetest.log("MCL_BAMBOO::Place_Bamboo_Shoot--Type: " .. placed_type) - end + mcl_bamboo.mcl_log("Place_Bamboo_Shoot--Type: " .. placed_type) if placed_type == 0 then - place_item=ItemStack(bamboo) - if DEBUG then - minetest.log("Bamboo place_item definition (current):\n" .. dump(place_item:to_table())) - end - minetest.item_place(place_item, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under))) - return itemstack, pointed_thing.under + place_item = ItemStack(bamboo) elseif placed_type == 1 then - place_item=ItemStack(bamboo_one) - if DEBUG then - minetest.log("Bamboo place_item definition (current):\n" .. dump(place_item:to_table())) - end - minetest.item_place(place_item, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under))) - return itemstack, pointed_thing.under + place_item = ItemStack(bamboo_one) elseif placed_type == 2 then - place_item=ItemStack(bamboo_two) - if DEBUG then - minetest.log("Bamboo place_item definition (current):\n" .. dump(place_item:to_table())) - end - minetest.item_place(place_item, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under))) - return itemstack, pointed_thing.under + place_item = ItemStack(bamboo_two) elseif placed_type == 3 then - place_item=ItemStack(bamboo_three) - if DEBUG then - minetest.log("Bamboo place_item definition (current):\n" .. dump(place_item:to_table())) - end - minetest.item_place(place_item, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under))) - return itemstack, pointed_thing.under + place_item = ItemStack(bamboo_three) end - return false + minetest.item_place(place_item, placer, pointed_thing, fdir) + return itemstack, pointed_thing.under end end, @@ -207,7 +179,7 @@ local bamboo_def = { -- Node destructor; called before removing node. local new_pos = vector.offset(pos, 0, 1, 0) local node_above = minetest.get_node(new_pos) - local mboo = substr(node_above.name, strlen(node_above.name) - 3, strlen(node_above.name)) + local bamboo_node = substr(node_above.name, 1, strlen(bamboo)) local istack = ItemStack(bamboo) local sound_params = { pos = new_pos, @@ -215,7 +187,7 @@ local bamboo_def = { max_hear_distance = 10, -- default, uses a Euclidean metric } - if node_above and (mboo == "mboo" or mboo == "oo_1" or mboo == "oo_2" or mboo == "oo_3") then + if node_above and (bamboo_node == bamboo and node_above.name ~= "mcl_bamboo:bamboo_endcap") then minetest.remove_node(new_pos) minetest.sound_play(node_sound.dug, sound_params, true) if pr:next(1, DOUBLE_DROP_CHANCE) == 1 then @@ -236,11 +208,25 @@ minetest.register_node(bamboo, bamboo_def) local bamboo_top = table.copy(bamboo_def) bamboo_top.groups = {not_in_creative_inventory = 1, handy = 1, axey = 1, choppy = 1, flammable = 3} -bamboo_top.tiles = {"mcl_bamboo_flower_pot.png"} -bamboo_top.drawtype = "plantlike" -bamboo_top.paramtype2 = "meshoptions" -bamboo_top.param2 = 34 +bamboo_top.tiles = {"mcl_bamboo_endcap.png"} +bamboo_top.drawtype = "plantlike_rooted" --"plantlike" +--bamboo_top.paramtype2 = "meshoptions" +--bamboo_top.param2 = 2 + +bamboo_top.special_tiles = {{name = "mcl_bamboo_endcap.png"}} bamboo_top.nodebox = nil +bamboo_top.selection_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.05, 0.5, 0.5}, + } +} +bamboo_top.collision_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.05, 0.5, 0.5}, + } +} bamboo_top.on_place = function(itemstack, _, _) -- Should never occur... but, if it does, then nix it. @@ -286,7 +272,8 @@ 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 = S("Stripped Bamboo Block") -bamboo_stripped_block.tiles = {"mcl_bamboo_bamboo_bottom.png", "mcl_bamboo_bamboo_bottom.png", "mcl_bamboo_bamboo_block_stripped.png"} +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", { description = S("Bamboo Plank"), @@ -301,10 +288,19 @@ minetest.register_node("mcl_bamboo:bamboo_plank", { _mcl_hardness = 2, }) --- Bamboo Part 2 Base nodes. --- Bamboo alternative node types. Note that the table.copy's are very important! if you use a common node def and --- make changes, even after registering them, the changes overwrite the previous node definitions, and in this case, --- you will end up with 4 nodes all being type 3. +-- Bamboo Part 2 Base nodes. +-- Bamboo Mosaic +local bamboo_mosaic = table.copy(minetest.registered_nodes[bamboo .. "_plank"]) +bamboo_mosaic.tiles = {"mcl_bamboo_bamboo_plank.png"} +bamboo_mosaic.groups = {handy = 1, axey = 1, flammable = 3, fire_encouragement = 5, fire_flammability = 20} +bamboo_mosaic.description = S("Bamboo Mosaic Plank") +bamboo_mosaic._doc_items_longdesc = S("Bamboo Mosaic Plank") +minetest.register_node("mcl_bamboo:bamboo_mosaic", bamboo_mosaic) + +--[[ Bamboo alternative node types. Note that the table.copy's are very important! if you use a common node def and +make changes, even after registering them, the changes overwrite the previous node definitions, and in this case, +you will end up with 4 nodes all being type 3. --]] + local bamboo_one_def = table.copy(bamboo_def) bamboo_one_def.node_box = { type = "fixed", diff --git a/mods/ITEMS/mcl_bamboo/bamboo_items.lua b/mods/ITEMS/mcl_bamboo/bamboo_items.lua index bc91ba2d4..6c8707df3 100644 --- a/mods/ITEMS/mcl_bamboo/bamboo_items.lua +++ b/mods/ITEMS/mcl_bamboo/bamboo_items.lua @@ -18,26 +18,12 @@ local adj_nodes = { -- Due to door fix #2736, doors are displayed backwards. When this is fixed, set this variable to false. local BROKEN_DOORS = true local SIDE_SCAFFOLDING = false -local DEBUG = false local node_sound = mcl_sounds.node_sound_wood_defaults() - --- Bamboo Mosaic -local bamboo_mosaic = table.copy(minetest.registered_nodes[bamboo .. "_plank"]) -bamboo_mosaic.tiles = {"mcl_bamboo_bamboo_plank.png"} -bamboo_mosaic.groups = {handy = 1, axey = 1, flammable = 3, fire_encouragement = 5, fire_flammability = 20} -bamboo_mosaic.description = S("Bamboo Mosaic Plank") -bamboo_mosaic._doc_items_longdesc = S("Bamboo Mosaic Plank") -minetest.register_node("mcl_bamboo:bamboo_mosaic", bamboo_mosaic) - - - -- specific bamboo nodes (Items)... Pt. 1 if minetest.get_modpath("mcl_flowerpots") then - if DEBUG then - minetest.log("mcl_bamboo::FlowerPot Section Entrance. Modpath exists.") - end + mcl_bamboo.mcl_log("FlowerPot Section Entrance. Modpath exists.") if mcl_flowerpots ~= nil then -- Flower-potted Bamboo... local flwr_name = "mcl_bamboo:bamboo" @@ -195,9 +181,7 @@ if minetest.get_modpath("mesecons_pressureplates") then end if minetest.get_modpath("mcl_signs") then - if DEBUG then - minetest.log("mcl_bamboo::Signs Section Entrance. Modpath exists.") - end + mcl_bamboo.mcl_log("Signs Section Entrance. Modpath exists.") if mcl_signs ~= nil then -- Bamboo Signs... mcl_signs.register_sign_custom("mcl_bamboo", "_bamboo", "mcl_signs_sign_greyscale.png", @@ -209,9 +193,8 @@ if minetest.get_modpath("mcl_signs") then end if minetest.get_modpath("mcl_fences") then - if DEBUG then - minetest.log("mcl_bamboo::Fences Section Entrance. Modpath exists.") - end + mcl_bamboo.mcl_log("Fences Section Entrance. Modpath exists.") + local id = "bamboo_fence" local id_gate = "bamboo_fence_gate" local wood_groups = {handy = 1, axey = 1, flammable = 2, fence_wood = 1, fire_encouragement = 5, fire_flammability = 20} @@ -222,10 +205,8 @@ if minetest.get_modpath("mcl_fences") then local gate_id = mcl_fences.register_fence_gate(id, S("Bamboo Fence Gate"), "mcl_bamboo_fence_gate_bamboo.png", wood_groups, 2, 15, node_sound) -- note: about missing params.. will use defaults. - if DEBUG then - minetest.log(dump(fence_id)) - minetest.log(dump(gate_id)) - end + mcl_bamboo.mcl_log(dump(fence_id)) + mcl_bamboo.mcl_log(dump(gate_id)) local craft_wood = "mcl_bamboo:bamboo_plank" minetest.register_craft({ @@ -329,18 +310,13 @@ minetest.register_node("mcl_bamboo:scaffolding", { return itemstack end end - if DEBUG then - minetest.log("mcl_bamboo::Checking for protected placement of scaffolding.") - end + mcl_bamboo.mcl_log("Checking for protected placement of scaffolding.") local node = minetest.get_node(ptd.under) local pos = ptd.under if mcl_bamboo.is_protected(pos, placer) then return end - if DEBUG then - minetest.log("mcl_bamboo::placement of scaffolding is not protected.") - end - + mcl_bamboo.mcl_log("placement of scaffolding is not protected.") --place on solid nodes if itemstack:get_name() ~= node.name then minetest.set_node(ptd.above, {name = scaff_node_name, param2 = 0}) diff --git a/mods/ITEMS/mcl_bamboo/globals.lua b/mods/ITEMS/mcl_bamboo/globals.lua index d5db13fb3..cace016a9 100644 --- a/mods/ITEMS/mcl_bamboo/globals.lua +++ b/mods/ITEMS/mcl_bamboo/globals.lua @@ -13,6 +13,11 @@ local strlen = string.len local substr = string.sub local rand = math.random math.randomseed((os.time() + 31) * 31415) -- try to make a valid seed +local BAMBOO_MAX_HEIGHT = 16 -- base height check. + +local BAMBOO_SOIL_DIST = BAMBOO_MAX_HEIGHT * -1 +local BAM_MAX_HEIGHT_STPCHK = BAMBOO_MAX_HEIGHT - 5 +local BAM_MAX_HEIGHT_TOP = BAMBOO_MAX_HEIGHT - 1 --Bamboo can be planted on moss blocks, grass blocks, dirt, coarse dirt, rooted dirt, gravel, mycelium, podzol, sand, red sand, or mud mcl_bamboo.bamboo_dirt_nodes = { @@ -40,9 +45,6 @@ function mcl_bamboo.is_protected(pos, placer) end function mcl_bamboo.grow_bamboo(pos, _) - local BAMBOO_SOIL_DIST = -16 - local BAM_MAX_HEIGHT_STPCHK = 11 - local BAM_MAX_HEIGHT_TOP = 15 local chk_pos local soil_pos @@ -130,3 +132,12 @@ function mcl_bamboo.add_groups(name, ...) addall(...) return minetest.override_item(name, {groups = groups}) end + +function mcl_bamboo.mcl_log(m, l) + if DEBUG then + if not l then + minetest.log("[mcl_bamboo]: " .. m) + end + minetest.log(l, "[mcl_bamboo]: " .. m) + end +end diff --git a/mods/ITEMS/mcl_bamboo/init.lua b/mods/ITEMS/mcl_bamboo/init.lua index 93191f49c..20ef64ecf 100644 --- a/mods/ITEMS/mcl_bamboo/init.lua +++ b/mods/ITEMS/mcl_bamboo/init.lua @@ -47,8 +47,7 @@ minetest.register_alias("mcl_scaffolding:scaffolding_horizontal", "mcl_bamboo:sc --[[ todo -- make scaffolds do side scaffold blocks, so that they jut out. todo -- Also, make those blocks collapse (break) when a nearby connected scaffold breaks. -todo -- Add Flourish to the endcap node for bamboo. Fix the flourish to not look odd or plain. -todo -- mash all of that together so that it drops as one item. +todo -- fix the random height for bamboo. Use metadata for storing the height, on_place. todo -- fix scaffolding placing, instead of using on_rightclick first. waiting on specific things: diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_endcap.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_endcap.png index dea7059b4d94cc7b814f071c45d021469288d7c1..c278fc62f41d953730be652ac76543991691e7a4 100644 GIT binary patch delta 140 zcmV;70CWGX2Y~{RBMAUtP)t-s0004zDP4H`@8iY*0004WQchCSe*e_p8;5(2Uws2T$mPInHOE7 z3|^xPV3`_Voe^W68fBprW~dHmq9kjmE^(+rajhzGt`c#v8g;T1b+Z?EupW4Svm1J} z6neB7dbAsQv@m;w9ec7Zd$S;Wv>SW1AAGhMeVj*qus(gVIDNAw={paBY(Ihf4U}ss#JitCxNq7g1R+>vQLA$F@&{3h_^|Ix0*QzfO|AWs<;uT9Uy;lEF@syZMVrKGoWf+B#!#HbSe(a7oX1O?%1xfETAs&Yp2<*up3GXG$w#2X zW1z`Zpv+pK#b%+(W1_}%qR48Z%U`0)V57)pqs(5U%Vng?YoyFzq|9rjuVAIjW2Vnx zr?Y0K%4(;~ai`5>r_N!g&TOa8YpAecsI_LOwq~ieXsOL(s^}UHXO#wd_lerp@v_uam3P7PSnP^O+(g7|V zWEV7z5`dK6@X-Ye?(RL2N@|G+w%b%C;$Ke07*qo IM6N<$f?hY9jsO4v From 9351f72c15d9b4e687fd2f9c675f3fae07db9773 Mon Sep 17 00:00:00 2001 From: Michieal Date: Tue, 3 Jan 2023 15:38:34 -0500 Subject: [PATCH 028/105] Updated Bamboo translations template.txt --- mods/ITEMS/mcl_bamboo/locale/template.txt | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/locale/template.txt b/mods/ITEMS/mcl_bamboo/locale/template.txt index 1701a4a05..e099419d7 100644 --- a/mods/ITEMS/mcl_bamboo/locale/template.txt +++ b/mods/ITEMS/mcl_bamboo/locale/template.txt @@ -1,7 +1,12 @@ # textdomain: mcl_bamboo +### bamboo_base.lua ### -### init.lua ### +Bamboo Mosaic Plank= +Bamboo Plank= +Stripped Bamboo Block= + +### bamboo_items.lua ### 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.= @@ -12,18 +17,18 @@ Bamboo Button= Bamboo Door.= Bamboo Fence= Bamboo Fence Gate= -Bamboo Plank= +Bamboo Mosaic Slab= +Bamboo Mosaic Stair= Bamboo Plank Slab= Bamboo Plank Stair= Bamboo Pressure Plate= -Bamboo Sign= Bamboo Slab= Bamboo Stair= Bamboo Trapdoor.= +Double Bamboo Mosaic Slab= Double Bamboo Plank Slab= Double Bamboo Slab= Double Stripped Bamboo Slab= -Nether Brick Fence= Scaffolding= Scaffolding (horizontal)= Scaffolding block used to climb up or out across areas.= @@ -33,4 +38,3 @@ Stripped Bamboo Stair= To open or close the trapdoor, rightclick it or send a redstone signal to it.= Wooden trapdoors are horizontal barriers which can be opened and closed by hand or a redstone signal. They occupy the upper or lower part of a block, depending on how they have been placed. When open, they can be climbed like a ladder.= - From 966c914a8ed6e7054fe9a3f31d00f1d4e089be54 Mon Sep 17 00:00:00 2001 From: Michieal Date: Tue, 3 Jan 2023 15:39:23 -0500 Subject: [PATCH 029/105] Updated .gitignore to exclude *.xcf (gimp) files. --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 574521980..42eb1d846 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ *.blend2 *.blend3 /.idea/ +*.xcf \ No newline at end of file From 50e50e29049f0e1caeba04b672fa2e9ca138678b Mon Sep 17 00:00:00 2001 From: Michieal Date: Tue, 3 Jan 2023 15:57:58 -0500 Subject: [PATCH 030/105] Continued some optimizations of code in bamboo.on_place. Begun work on scaffolding. --- mods/ITEMS/mcl_bamboo/bamboo_base.lua | 19 ++--- mods/ITEMS/mcl_bamboo/bamboo_items.lua | 108 ++++++++++++++----------- 2 files changed, 66 insertions(+), 61 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/bamboo_base.lua b/mods/ITEMS/mcl_bamboo/bamboo_base.lua index 11a4bab79..e9b228f20 100644 --- a/mods/ITEMS/mcl_bamboo/bamboo_base.lua +++ b/mods/ITEMS/mcl_bamboo/bamboo_base.lua @@ -105,7 +105,6 @@ local bamboo_def = { end mcl_bamboo.mcl_log("placement of bamboo is not protected.") - -- Use pointed node's on_rightclick function first, if present if placer and not placer:get_player_control().sneak then if minetest.registered_nodes[node.name] and minetest.registered_nodes[node.name].on_rightclick then @@ -138,8 +137,8 @@ local bamboo_def = { if wdir ~= 1 then return end - local place_item = ItemStack(itemstack) -- make a copy so that we don't indirectly mess with the original. + local place_item = ItemStack(itemstack) -- make a copy so that we don't indirectly mess with the original. itemstack:set_count(itemstack:get_count() - 1) if nodename == bamboo then -- return the missing item, so that we can lower the code @@ -147,17 +146,11 @@ local bamboo_def = { itemstack:set_count(itemstack:get_count() + 1) return minetest.item_place(itemstack, placer, pointed_thing, fdir) elseif nodename == bamboo_one then - place_item:set_name(bamboo_one) - minetest.item_place(place_item, placer, pointed_thing, fdir) - return itemstack, pointed_thing.under + place_item = ItemStack(bamboo_one) elseif nodename == bamboo_two then - place_item:set_name(bamboo_two) - minetest.item_place(place_item, placer, pointed_thing, fdir) - return itemstack, pointed_thing.under + place_item = ItemStack(bamboo_two) elseif nodename == bamboo_three then - place_item:set_name(bamboo_three) - minetest.item_place(place_item, placer, pointed_thing, fdir) - return itemstack, pointed_thing.under + place_item = ItemStack(bamboo_three) else local placed_type = pr:next(0, 3) -- randomly choose which one to place. mcl_bamboo.mcl_log("Place_Bamboo_Shoot--Type: " .. placed_type) @@ -170,9 +163,9 @@ local bamboo_def = { elseif placed_type == 3 then place_item = ItemStack(bamboo_three) end - minetest.item_place(place_item, placer, pointed_thing, fdir) - return itemstack, pointed_thing.under end + minetest.item_place(place_item, placer, pointed_thing, fdir) + return itemstack, pointed_thing.under end, on_destruct = function(pos) diff --git a/mods/ITEMS/mcl_bamboo/bamboo_items.lua b/mods/ITEMS/mcl_bamboo/bamboo_items.lua index 6c8707df3..5054dd40a 100644 --- a/mods/ITEMS/mcl_bamboo/bamboo_items.lua +++ b/mods/ITEMS/mcl_bamboo/bamboo_items.lua @@ -223,7 +223,6 @@ if minetest.get_modpath("mcl_fences") then {"mcl_core:stick", craft_wood, "mcl_core:stick"}, } }) - -- mcl_fences.register_fence("nether_brick_fence", S("Nether Brick Fence"), "mcl_fences_fence_nether_brick.png", {pickaxey=1, deco_block=1, fence_nether_brick=1}, 2, 30, {"group:fence_nether_brick"}, mcl_sounds.node_sound_stone_defaults()) minetest.register_alias("bamboo_fence", "mcl_fences:" .. id) minetest.register_alias("bamboo_fence_gate", "mcl_fences:" .. id_gate) end @@ -294,60 +293,73 @@ minetest.register_node("mcl_bamboo:scaffolding", { _mcl_hardness = 0, on_place = function(itemstack, placer, ptd) local scaff_node_name = "mcl_bamboo:scaffolding" - if SIDE_SCAFFOLDING then - -- count param2 up when placing to the sides. Fall when > 6 - local ctrl = placer:get_player_control() - if ctrl and ctrl.sneak then - local pp2 = minetest.get_node(ptd.under).param2 - local np2 = pp2 + 1 - if minetest.get_node(vector.offset(ptd.above, 0, -1, 0)).name == "air" then - minetest.set_node(ptd.above, {name = "mcl_bamboo:scaffolding_horizontal", param2 = np2}) - itemstack:take_item(1) - end - if np2 > 6 then - minetest.check_single_for_falling(ptd.above) - end - return itemstack - end - end - mcl_bamboo.mcl_log("Checking for protected placement of scaffolding.") + mcl_bamboo.mcl_log("Checking for protected placement of scaffolding.") local node = minetest.get_node(ptd.under) local pos = ptd.under - if mcl_bamboo.is_protected(pos, placer) then - return - end - mcl_bamboo.mcl_log("placement of scaffolding is not protected.") - --place on solid nodes - if itemstack:get_name() ~= node.name then - minetest.set_node(ptd.above, {name = scaff_node_name, param2 = 0}) - if not minetest.is_creative_enabled(placer:get_player_name()) then - itemstack:take_item(1) + local dir = vector.subtract(pointed_thing.under, pointed_thing.above) + local wdir = minetest.dir_to_wallmounted(dir) + local fdir = minetest.dir_to_facedir(dir) + if wdir == 1 then + -- top placement. Prevents placing scaffolding along the sides of other nodes. + + if mcl_bamboo.is_protected(pos, placer) then + return end - return itemstack - end - - --build up when placing on existing scaffold - local h = 0 - repeat - pos.y = pos.y + 1 - local cn = minetest.get_node(pos) - local cnb = minetest.get_node(ptd.under) - local bn = minetest.get_node(vector.offset(ptd.under, 0, -1, 0)) - if cn.name == "air" then - -- first step to making scaffolding work like Minecraft scaffolding. - if cnb.name == scaff_node_name and bn == scaff_node_name and SIDE_SCAFFOLDING == false then - return itemstack - end - - minetest.set_node(pos, node) + mcl_bamboo.mcl_log("placement of scaffolding is not protected.") + -- place on solid nodes + if node.name ~= scaff_node_name then + minetest.set_node(ptd.above, {name = scaff_node_name, param2 = 0}) if not minetest.is_creative_enabled(placer:get_player_name()) then itemstack:take_item(1) end - placer:set_wielded_item(itemstack) return itemstack end - h = h + 1 - until cn.name ~= node.name or itemstack:get_count() == 0 or h >= 128 + --build up when placing on existing scaffold + local h = 0 + repeat + pos.y = pos.y + 1 + local cn = minetest.get_node(pos) + local cnb = minetest.get_node(ptd.under) + local bn = minetest.get_node(vector.offset(ptd.under, 0, -1, 0)) + if cn.name == "air" then + -- first step to making scaffolding work like Minecraft scaffolding. + if cnb.name == scaff_node_name and bn == scaff_node_name and SIDE_SCAFFOLDING == false then + return itemstack + end + + if mcl_bamboo.is_protected(pos, placer) then + return + end + + minetest.set_node(pos, node) + if not minetest.is_creative_enabled(placer:get_player_name()) then + itemstack:take_item(1) + end + placer:set_wielded_item(itemstack) + return itemstack + end + h = h + 1 + until cn.name ~= node.name or itemstack:get_count() == 0 or h >= 128 + else + -- Don't use. From cora, who failed to make something awesome. + if SIDE_SCAFFOLDING then + -- count param2 up when placing to the sides. Fall when > 6 + local ctrl = placer:get_player_control() + if ctrl and ctrl.sneak then + local pp2 = minetest.get_node(ptd.under).param2 + local np2 = pp2 + 1 + if minetest.get_node(vector.offset(ptd.above, 0, -1, 0)).name == "air" then + minetest.set_node(ptd.above, {name = "mcl_bamboo:scaffolding_horizontal", param2 = np2}) + itemstack:take_item(1) + end + if np2 > 6 then + minetest.check_single_for_falling(ptd.above) + end + return itemstack + end + end + + end end, on_destruct = function(pos) -- Node destructor; called before removing node. @@ -369,7 +381,7 @@ minetest.register_node("mcl_bamboo:scaffolding", { }) minetest.register_node("mcl_bamboo:scaffolding_horizontal", { - description = S("Scaffolding (horizontal)"), + description = S("Scaffolding"), doc_items_longdesc = S("Scaffolding block used to climb up or out across areas."), doc_items_hidden = false, tiles = {"mcl_bamboo_scaffolding_top.png", "mcl_bamboo_scaffolding_top.png", "mcl_bamboo_scaffolding_bottom.png"}, From d1a017f6b24ce484d6864e3c7e24d7939a1ab89c Mon Sep 17 00:00:00 2001 From: Michieal Date: Tue, 3 Jan 2023 18:40:40 -0500 Subject: [PATCH 031/105] optimized out some for loops, cleaned up code for bamboo placement. tested the changes. --- mods/ITEMS/mcl_bamboo/bamboo_base.lua | 33 +++++++++++---------------- mods/ITEMS/mcl_bamboo/globals.lua | 31 +++++++++++++++++++------ 2 files changed, 37 insertions(+), 27 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/bamboo_base.lua b/mods/ITEMS/mcl_bamboo/bamboo_base.lua index e9b228f20..022a26efd 100644 --- a/mods/ITEMS/mcl_bamboo/bamboo_base.lua +++ b/mods/ITEMS/mcl_bamboo/bamboo_base.lua @@ -25,6 +25,7 @@ if minetest.get_modpath("screwdriver") then on_rotate = screwdriver.disallow end + -- basic bamboo nodes. local bamboo_def = { description = "Bamboo", @@ -92,6 +93,7 @@ local bamboo_def = { local node = minetest.get_node(pointed_thing.under) local pos = pointed_thing.under local nodename = node.name + mcl_bamboo.mcl_log("node name: " .. nodename) -- check the nodename to see if it is one of the bamboo's local bamboo_node = substr(nodename, 1, strlen(bamboo)) @@ -116,14 +118,8 @@ local bamboo_def = { if bamboo_node ~= bamboo and nodename ~= "mcl_bamboo:bamboo_endcap" then -- not bamboo... if nodename ~= "mcl_flowerpots:flower_pot" then - local found = false - for i = 1, #mcl_bamboo.bamboo_dirt_nodes do - if nodename == mcl_bamboo.bamboo_dirt_nodes[i] then - found = true - break - end - end - if not found then + if mcl_bamboo.is_dirt(nodename) == false then + mcl_bamboo.mcl_log("bamboo dirt node not found; node name: " .. nodename) return end end @@ -139,18 +135,14 @@ local bamboo_def = { end local place_item = ItemStack(itemstack) -- make a copy so that we don't indirectly mess with the original. - itemstack:set_count(itemstack:get_count() - 1) - if nodename == bamboo then - -- return the missing item, so that we can lower the code - -- complexity and duplication. - itemstack:set_count(itemstack:get_count() + 1) - return minetest.item_place(itemstack, placer, pointed_thing, fdir) - elseif nodename == bamboo_one then - place_item = ItemStack(bamboo_one) - elseif nodename == bamboo_two then - place_item = ItemStack(bamboo_two) - elseif nodename == bamboo_three then - place_item = ItemStack(bamboo_three) + + mcl_bamboo.mcl_log("node name: " .. nodename) + + local bamboo_node = mcl_bamboo.is_bamboo(nodename) + mcl_bamboo.mcl_log("bamboo_node: " .. bamboo_node) + + if bamboo_node ~= -1 then + place_item = ItemStack(mcl_bamboo.bamboo_index[bamboo_node]) else local placed_type = pr:next(0, 3) -- randomly choose which one to place. mcl_bamboo.mcl_log("Place_Bamboo_Shoot--Type: " .. placed_type) @@ -165,6 +157,7 @@ local bamboo_def = { end end minetest.item_place(place_item, placer, pointed_thing, fdir) + itemstack:set_count(itemstack:get_count() - 1) return itemstack, pointed_thing.under end, diff --git a/mods/ITEMS/mcl_bamboo/globals.lua b/mods/ITEMS/mcl_bamboo/globals.lua index cace016a9..e64e223a7 100644 --- a/mods/ITEMS/mcl_bamboo/globals.lua +++ b/mods/ITEMS/mcl_bamboo/globals.lua @@ -33,6 +33,21 @@ mcl_bamboo.bamboo_dirt_nodes = { "mcl_mud:mud", } +function mcl_bamboo.is_dirt(node_name) + return table.indexof(mcl_bamboo.bamboo_dirt_nodes, node_name) ~= -1 +end + +mcl_bamboo.bamboo_index = { + "mcl_bamboo:bamboo", + "mcl_bamboo:bamboo_1", + "mcl_bamboo:bamboo_2", + "mcl_bamboo:bamboo_3", +} + +function mcl_bamboo.is_bamboo(node_name) + return table.indexof(mcl_bamboo.bamboo_index, node_name) +end + --- pos: node position; placer: ObjectRef that is placing the item --- returns: true if protected, otherwise false. function mcl_bamboo.is_protected(pos, placer) @@ -56,12 +71,9 @@ function mcl_bamboo.grow_bamboo(pos, _) for py = -1, BAMBOO_SOIL_DIST, -1 do chk_pos = vector.offset(pos, 0, py, 0) local name = minetest.get_node(chk_pos).name - for i = 1, #mcl_bamboo.bamboo_dirt_nodes do - if name == mcl_bamboo.bamboo_dirt_nodes[i] then - found = true - soil_pos = chk_pos - break - end + if mcl_bamboo.is_dirt(name) then + found = true + soil_pos = chk_pos end if found then break @@ -134,10 +146,15 @@ function mcl_bamboo.add_groups(name, ...) end function mcl_bamboo.mcl_log(m, l) + if not m then + minetest.log("error", "expected string, received: " .. m) + return + end if DEBUG then if not l then minetest.log("[mcl_bamboo]: " .. m) + else + minetest.log(l, "[mcl_bamboo]: " .. m) end - minetest.log(l, "[mcl_bamboo]: " .. m) end end From f86ee99abffb7d8f49a1077889c84e83c5a7c36a Mon Sep 17 00:00:00 2001 From: Michieal Date: Wed, 4 Jan 2023 11:28:09 -0500 Subject: [PATCH 032/105] Further cleaned up bamboo base code. Fixed some errors in Scaffolding, Commented out the in progress section. --- mods/ITEMS/mcl_bamboo/bamboo_base.lua | 22 ++-- mods/ITEMS/mcl_bamboo/bamboo_items.lua | 133 +++++++++++++++++-------- 2 files changed, 100 insertions(+), 55 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/bamboo_base.lua b/mods/ITEMS/mcl_bamboo/bamboo_base.lua index 022a26efd..0e25d4ebe 100644 --- a/mods/ITEMS/mcl_bamboo/bamboo_base.lua +++ b/mods/ITEMS/mcl_bamboo/bamboo_base.lua @@ -8,9 +8,6 @@ local modname = minetest.get_current_modname() local S = minetest.get_translator(modname) local bamboo = "mcl_bamboo:bamboo" -local bamboo_one = bamboo .. "_1" -local bamboo_two = bamboo .. "_2" -local bamboo_three = bamboo .. "_3" local node_sound = mcl_sounds.node_sound_wood_defaults() -- CONSTS @@ -83,6 +80,7 @@ local bamboo_def = { {-0.175, -0.5, -0.195, 0.05, 0.5, 0.030}, } }, + node_placement_prediction = "", on_rotate = on_rotate, @@ -146,18 +144,10 @@ local bamboo_def = { else local placed_type = pr:next(0, 3) -- randomly choose which one to place. mcl_bamboo.mcl_log("Place_Bamboo_Shoot--Type: " .. placed_type) - if placed_type == 0 then - place_item = ItemStack(bamboo) - elseif placed_type == 1 then - place_item = ItemStack(bamboo_one) - elseif placed_type == 2 then - place_item = ItemStack(bamboo_two) - elseif placed_type == 3 then - place_item = ItemStack(bamboo_three) - end + place_item = mcl_bamboo.bamboo_index[placed_type + 1] end minetest.item_place(place_item, placer, pointed_thing, fdir) - itemstack:set_count(itemstack:get_count() - 1) + itemstack:take_item(1) return itemstack, pointed_thing.under end, @@ -307,7 +297,7 @@ bamboo_one_def.selection_box = { {-0.05, -0.5, 0.285, -0.275, 0.5, 0.06}, } } -minetest.register_node(bamboo_one, bamboo_one_def) +minetest.register_node(mcl_bamboo.bamboo_index[2], bamboo_one_def) local bamboo_two_def = table.copy(bamboo_def) bamboo_two_def.node_box = { @@ -329,7 +319,7 @@ bamboo_two_def.selection_box = { {0.25, -0.5, 0.325, 0.025, 0.5, 0.100}, } } -minetest.register_node(bamboo_two, bamboo_two_def) +minetest.register_node(mcl_bamboo.bamboo_index[3], bamboo_two_def) local bamboo_three_def = table.copy(bamboo_def) bamboo_three_def.node_box = { @@ -351,4 +341,4 @@ bamboo_three_def.selection_box = { {-0.125, -0.5, 0.125, -0.3125, 0.5, 0.3125}, } } -minetest.register_node(bamboo_three, bamboo_three_def) +minetest.register_node(mcl_bamboo.bamboo_index[4], bamboo_three_def) diff --git a/mods/ITEMS/mcl_bamboo/bamboo_items.lua b/mods/ITEMS/mcl_bamboo/bamboo_items.lua index 5054dd40a..9bf030ef2 100644 --- a/mods/ITEMS/mcl_bamboo/bamboo_items.lua +++ b/mods/ITEMS/mcl_bamboo/bamboo_items.lua @@ -255,15 +255,21 @@ if minetest.get_modpath("mcl_stairs") then end end -minetest.register_node("mcl_bamboo:scaffolding", { +local scaffold_name = "mcl_bamboo:scaffolding" +local side_scaffold_name = "mcl_bamboo:scaffolding_horizontal" + +local disallow_on_rotate +if minetest.get_modpath("screwdriver") then + disallow_on_rotate = screwdriver.disallow +end + +minetest.register_node(scaffold_name, { description = S("Scaffolding"), doc_items_longdesc = S("Scaffolding block used to climb up or out across areas."), doc_items_hidden = false, tiles = {"mcl_bamboo_scaffolding_top.png", "mcl_bamboo_scaffolding_top.png", "mcl_bamboo_scaffolding_bottom.png"}, drawtype = "nodebox", paramtype = "light", - paramtype2 = "4dir", - param2 = 0, use_texture_alpha = "clip", node_box = { type = "fixed", @@ -291,14 +297,16 @@ minetest.register_node("mcl_bamboo:scaffolding", { sounds = mcl_sounds.node_sound_wood_defaults(), _mcl_blast_resistance = 0, _mcl_hardness = 0, - on_place = function(itemstack, placer, ptd) - local scaff_node_name = "mcl_bamboo:scaffolding" + + on_rotate = disallow_on_rotate, + + on_place = function(itemstack, placer, pointed) mcl_bamboo.mcl_log("Checking for protected placement of scaffolding.") - local node = minetest.get_node(ptd.under) - local pos = ptd.under - local dir = vector.subtract(pointed_thing.under, pointed_thing.above) + local node = minetest.get_node(pointed.under) + local pos = pointed.under + local dir = vector.subtract(pointed.under, pointed.above) local wdir = minetest.dir_to_wallmounted(dir) - local fdir = minetest.dir_to_facedir(dir) + local h = 0 if wdir == 1 then -- top placement. Prevents placing scaffolding along the sides of other nodes. @@ -307,23 +315,22 @@ minetest.register_node("mcl_bamboo:scaffolding", { end mcl_bamboo.mcl_log("placement of scaffolding is not protected.") -- place on solid nodes - if node.name ~= scaff_node_name then - minetest.set_node(ptd.above, {name = scaff_node_name, param2 = 0}) + if node.name ~= scaffold_name then + minetest.set_node(pointed.above, {name = scaffold_name, param2 = 0}) if not minetest.is_creative_enabled(placer:get_player_name()) then itemstack:take_item(1) end return itemstack end --build up when placing on existing scaffold - local h = 0 repeat pos.y = pos.y + 1 local cn = minetest.get_node(pos) - local cnb = minetest.get_node(ptd.under) - local bn = minetest.get_node(vector.offset(ptd.under, 0, -1, 0)) + local cnb = minetest.get_node(pointed.under) + local bn = minetest.get_node(vector.offset(pointed.under, 0, -1, 0)) if cn.name == "air" then -- first step to making scaffolding work like Minecraft scaffolding. - if cnb.name == scaff_node_name and bn == scaff_node_name and SIDE_SCAFFOLDING == false then + if cnb.name == scaffold_name and bn == scaffold_name and SIDE_SCAFFOLDING == false then return itemstack end @@ -342,22 +349,65 @@ minetest.register_node("mcl_bamboo:scaffolding", { until cn.name ~= node.name or itemstack:get_count() == 0 or h >= 128 else -- Don't use. From cora, who failed to make something awesome. - if SIDE_SCAFFOLDING then - -- count param2 up when placing to the sides. Fall when > 6 - local ctrl = placer:get_player_control() - if ctrl and ctrl.sneak then - local pp2 = minetest.get_node(ptd.under).param2 - local np2 = pp2 + 1 - if minetest.get_node(vector.offset(ptd.above, 0, -1, 0)).name == "air" then - minetest.set_node(ptd.above, {name = "mcl_bamboo:scaffolding_horizontal", param2 = np2}) - itemstack:take_item(1) - end - if np2 > 6 then - minetest.check_single_for_falling(ptd.above) - end - return itemstack - end - end + --[[ + if SIDE_SCAFFOLDING then + -- count param2 up when placing to the sides. Fall when > 6 + local ctrl = placer:get_player_control() + if ctrl and ctrl.sneak then + local pp2 = minetest.get_node(ptd.under).param2 + local np2 = pp2 + 1 + if minetest.get_node(vector.offset(ptd.above, 0, -1, 0)).name == "air" then + minetest.set_node(ptd.above, {name = side_scaffold_name, param2 = np2}) + itemstack:take_item(1) + end + if np2 > 6 then + minetest.check_single_for_falling(ptd.above) + end + return itemstack + end + end + ]] + + --[[ Commenting out untested code, for commit. + local fdir = minetest.dir_to_facedir(dir) % 4 + + local meta = minetest.get_meta(pos) + + if not meta then + return false + end + local count = meta:get_int("count", 0) + + h = minetest.get_node(pointed.under).param2 + --repeat + local ctrl = placer:get_player_control() + if ctrl and ctrl.sneak then + local pp2 = h + + local np2 = pp2 + 1 + fdir = fdir + 1 -- convert fdir to a base of one. + local new_pos = adj_nodes[fdir] + + new_pos = vector.offset(pointed.above, new_pos.x, -1, new_pos.z) + if mcl_bamboo.is_protected(new_pos, placer) then + -- disallow placement in protected area + return + end + + itemstack:take_item(1) + if minetest.get_node(new_pos).name == "air" then + minetest.set_node(new_pos, {name = side_scaffold_name, param2 = np2}) + if np2 >= 6 then + np2 = 6 + minetest.minetest.dig_node(new_pos) + end + end + return itemstack + + end + ]] + -- h = h + 1 + --until h >= 7 or itemstack.get_count() <= 0 end end, @@ -365,7 +415,7 @@ minetest.register_node("mcl_bamboo:scaffolding", { -- Node destructor; called before removing node. 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 == scaffold_name then local sound_params = { pos = new_pos, gain = 1.0, -- default @@ -374,13 +424,13 @@ minetest.register_node("mcl_bamboo:scaffolding", { minetest.remove_node(new_pos) minetest.sound_play(node_sound.dug, sound_params, true) - local istack = ItemStack("mcl_bamboo:scaffolding") + local istack = ItemStack(scaffold_name) minetest.add_item(new_pos, istack) end end, }) -minetest.register_node("mcl_bamboo:scaffolding_horizontal", { +minetest.register_node(side_scaffold_name, { description = S("Scaffolding"), doc_items_longdesc = S("Scaffolding block used to climb up or out across areas."), doc_items_hidden = false, @@ -388,8 +438,6 @@ minetest.register_node("mcl_bamboo:scaffolding_horizontal", { drop = "mcl_bamboo:scaffolding", drawtype = "nodebox", paramtype = "light", - paramtype2 = "4dir", - param2 = 0, use_texture_alpha = "clip", node_box = { type = "fixed", @@ -411,14 +459,21 @@ minetest.register_node("mcl_bamboo:scaffolding_horizontal", { groups = {handy = 1, axey = 1, flammable = 3, building_block = 1, material_wood = 1, fire_encouragement = 5, fire_flammability = 20, not_in_creative_inventory = 1, falling_node = 1}, _mcl_after_falling = function(pos) if minetest.get_node(pos).name == "mcl_bamboo:scaffolding_horizontal" then - if minetest.get_node(vector.offset(pos, 0, 0, 0)).name ~= "mcl_bamboo:scaffolding" then + if minetest.get_node(vector.offset(pos, 0, 0, 0)).name ~= scaffold_name then minetest.remove_node(pos) - minetest.add_item(pos, "mcl_bamboo:scaffolding") + minetest.add_item(pos, scaffold_name) else - minetest.set_node(vector.offset(pos, 0, 1, 0), {name = "mcl_bamboo:scaffolding"}) + minetest.set_node(vector.offset(pos, 0, 1, 0), {name = side_scaffold_name}) end end end, + buildable_to = false, + is_ground_content = false, + walkable = false, + climbable = true, + physical = true, + + on_rotate = disallow_on_rotate, on_place = function(itemstack, placer, pointed_thing) if pointed_thing.type ~= "node" then From 8dd4a2611e9730f368afaa6df729b6b8cf240520 Mon Sep 17 00:00:00 2001 From: Michieal Date: Wed, 4 Jan 2023 14:25:31 -0500 Subject: [PATCH 033/105] Added alias for scaffolding. --- mods/ITEMS/mcl_bamboo/init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/mods/ITEMS/mcl_bamboo/init.lua b/mods/ITEMS/mcl_bamboo/init.lua index 20ef64ecf..308e3f61c 100644 --- a/mods/ITEMS/mcl_bamboo/init.lua +++ b/mods/ITEMS/mcl_bamboo/init.lua @@ -41,6 +41,7 @@ minetest.register_alias("bamboo_mosaic", "mcl_bamboo:bamboo_mosaic") minetest.register_alias("mcl_stairs:stair_bamboo", "mcl_stairs:stair_bamboo_block") minetest.register_alias("bamboo:bamboo", "mcl_bamboo:bamboo") +minetest.register_alias("scaffold", "mcl_bamboo:scaffolding") minetest.register_alias("mcl_scaffolding:scaffolding", "mcl_bamboo:scaffolding") minetest.register_alias("mcl_scaffolding:scaffolding_horizontal", "mcl_bamboo:scaffolding") From 65aa956d9c75a76beed2dea24ab45a783e41821b Mon Sep 17 00:00:00 2001 From: Michieal Date: Wed, 4 Jan 2023 22:43:05 -0500 Subject: [PATCH 034/105] Add alias for scaffolding. Rework grow_bamboo to handle random heights, and to handle bonemeal. Remove "bamboo_node" in favor of is_bamboo() --- mods/ITEMS/mcl_bamboo/bamboo_base.lua | 4 +- mods/ITEMS/mcl_bamboo/globals.lua | 158 +++++++++++++++++++------- mods/ITEMS/mcl_bamboo/init.lua | 4 +- 3 files changed, 120 insertions(+), 46 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/bamboo_base.lua b/mods/ITEMS/mcl_bamboo/bamboo_base.lua index 0e25d4ebe..91b188339 100644 --- a/mods/ITEMS/mcl_bamboo/bamboo_base.lua +++ b/mods/ITEMS/mcl_bamboo/bamboo_base.lua @@ -92,8 +92,6 @@ local bamboo_def = { local pos = pointed_thing.under local nodename = node.name mcl_bamboo.mcl_log("node name: " .. nodename) - -- check the nodename to see if it is one of the bamboo's - local bamboo_node = substr(nodename, 1, strlen(bamboo)) mcl_bamboo.mcl_log("Node placement data:") mcl_bamboo.mcl_log(dump(pointed_thing)) @@ -113,7 +111,7 @@ local bamboo_def = { end end - if bamboo_node ~= bamboo and nodename ~= "mcl_bamboo:bamboo_endcap" then + if mcl_bamboo.is_bamboo(nodename) == false and nodename ~= "mcl_bamboo:bamboo_endcap" then -- not bamboo... if nodename ~= "mcl_flowerpots:flower_pot" then if mcl_bamboo.is_dirt(nodename) == false then diff --git a/mods/ITEMS/mcl_bamboo/globals.lua b/mods/ITEMS/mcl_bamboo/globals.lua index e64e223a7..e2fd6d1da 100644 --- a/mods/ITEMS/mcl_bamboo/globals.lua +++ b/mods/ITEMS/mcl_bamboo/globals.lua @@ -4,13 +4,8 @@ --- DateTime: 12/29/22 12:34 PM -- Restructure Date --- -local modname = minetest.get_current_modname() -local S = minetest.get_translator(modname) -local bamboo = "mcl_bamboo:bamboo" -local DEBUG = false +local DEBUG = true -local strlen = string.len -local substr = string.sub local rand = math.random math.randomseed((os.time() + 31) * 31415) -- try to make a valid seed local BAMBOO_MAX_HEIGHT = 16 -- base height check. @@ -19,6 +14,8 @@ local BAMBOO_SOIL_DIST = BAMBOO_MAX_HEIGHT * -1 local BAM_MAX_HEIGHT_STPCHK = BAMBOO_MAX_HEIGHT - 5 local BAM_MAX_HEIGHT_TOP = BAMBOO_MAX_HEIGHT - 1 +local GROW_DOUBLE_CHANCE = 32 + --Bamboo can be planted on moss blocks, grass blocks, dirt, coarse dirt, rooted dirt, gravel, mycelium, podzol, sand, red sand, or mud mcl_bamboo.bamboo_dirt_nodes = { "mcl_core:redsand", @@ -59,72 +56,151 @@ function mcl_bamboo.is_protected(pos, placer) return false end -function mcl_bamboo.grow_bamboo(pos, _) +function mcl_bamboo.grow_bamboo(pos, bonemeal_applied) + local node_above = minetest.get_node(vector.offset(pos, 0, 1, 0)) + if not bonemeal_applied and mcl_bamboo.is_bamboo(node_above.name) == true then + return false -- short circuit this function if we're trying to grow (std) the bamboo and it's not the top shoot. + end + if minetest.get_node_light(pos) < 8 then + return false + end + + -- variables used in more than one spot. + local first_shoot local chk_pos local soil_pos - if minetest.get_node_light(pos) < 8 then - return - end - local found = false -- used for the soil check - local mboo = "" + local node_name = "" + local dist = 0 + local node_below + -- ------------------- + + -- the soil node below. for py = -1, BAMBOO_SOIL_DIST, -1 do chk_pos = vector.offset(pos, 0, py, 0) - local name = minetest.get_node(chk_pos).name - if mcl_bamboo.is_dirt(name) then - found = true + node_name = minetest.get_node(chk_pos).name + if mcl_bamboo.is_dirt(node_name) then soil_pos = chk_pos - end - if found then break else - mboo = substr(name, strlen(name) - 3, strlen(name)) - if mboo ~= "mboo" and mboo ~= "oo_1" and mboo ~= "oo_2" and mboo ~= "oo_3" then + if mcl_bamboo.is_bamboo(node_name) == false then break end end end -- requires knowing where the soil node is. - if not found then - return + if soil_pos == nil then + return false -- returning false means don't use up the bonemeal. end - local grow_amount = rand(1, 32) - grow_amount = rand(1, 32) - grow_amount = rand(1, 32) - grow_amount = rand(1, 32) -- because yeah, not truly random, or even a good prng. - -- Bonemeal: Grows the bamboo by 1-2 stems. (per the minecraft wiki.) + local grow_amount = rand(1, GROW_DOUBLE_CHANCE) + grow_amount = rand(1, GROW_DOUBLE_CHANCE) + grow_amount = rand(1, GROW_DOUBLE_CHANCE) -- because yeah, not truly random, or even a good prng. + grow_amount = rand(1, GROW_DOUBLE_CHANCE) + local init_height = rand(BAM_MAX_HEIGHT_STPCHK, BAM_MAX_HEIGHT_TOP) + + node_name = "" + + -- update: add randomized max height to first node's meta data. + first_shoot = vector.offset(soil_pos, 0, 1, 0) + local meta = minetest.get_meta(first_shoot) + node_below = minetest.get_node(first_shoot).name + + -- check the meta data for the first node, to see how high to make the stalk. + if not meta then + -- if no metadata, set the metadata!!! + meta:get_int("height", init_height) + end + local height = meta:get_int("height", -1) + if height == -1 then + height = init_height + end + + -- Bonemeal: Grows the bamboo by 1-2 stems. (per the minecraft wiki.) + if bonemeal_applied then + -- handle applying bonemeal. + for py = 1, BAM_MAX_HEIGHT_TOP do + -- find the top node of bamboo. + chk_pos = vector.offset(pos, 0, py, 0) + node_name = minetest.get_node(chk_pos).name + dist = vector.distance(soil_pos, chk_pos) + if mcl_bamboo.is_bamboo(node_name) == false or node_name == "mcl_bamboo:bamboo_endcap" then + break + end + end + + if node_name == "mcl_bamboo:bamboo_endcap" then + -- prevent overgrowth + return false + end + + -- check to see if we have a full stalk of bamboo. + if dist >= height - 1 then + if dist == height - 1 then + -- equals top of the stalk before the cap + if node_name == "air" then + minetest.set_node(vector.offset(chk_pos, 0, 1, 0), {name = "mcl_bamboo:bamboo_endcap"}) + return true -- returning true means use up the bonemeal. + else + return false + end + else + -- okay, we're higher than the end cap, fail out. + return false -- returning false means don't use up the bonemeal. + end + end + + -- and now, the meat of the section... add bamboo to the stalk. + -- at this point, we should be lower than the generated maximum height. ~ about height -2 or lower. + if dist <= height - 2 then + if node_name == "air" then + -- here we can check to see if we can do up to 2 bamboo shoots onto the stalk + minetest.set_node(chk_pos, {name = node_below}) + -- handle growing a second node. + if grow_amount == 2 then + chk_pos = vector.offset(chk_pos, 0, 1, 0) + if minetest.get_node(chk_pos).name == "air" then + minetest.set_node(chk_pos, {name = node_below}) + end + end + return true -- exit out with a success. We've added 1-2 nodes, per the wiki. + end + end + end + + -- Non-Bonemeal growth. for py = 1, BAM_MAX_HEIGHT_TOP do + -- Find the topmost node above the stalk, and check it for "air" chk_pos = vector.offset(pos, 0, py, 0) - local node_below = minetest.get_node(pos).name - local name = minetest.get_node(chk_pos).name - local dist = vector.distance(soil_pos, chk_pos) - if dist >= BAM_MAX_HEIGHT_STPCHK then - -- stop growing check. - if name == "air" then - local height = rand(BAM_MAX_HEIGHT_STPCHK, BAM_MAX_HEIGHT_TOP) - if height == dist then + node_below = minetest.get_node(pos).name + node_name = minetest.get_node(chk_pos).name + dist = vector.distance(soil_pos, chk_pos) + + -- stop growing check. ie, handle endcap placement. + if dist >= height - 1 then + if node_name == "air" then + if height - 1 == dist then minetest.set_node(chk_pos, {name = "mcl_bamboo:bamboo_endcap"}) end end break end - mboo = substr(name, strlen(name) - 3, strlen(name)) - if name == "air" then + + -- handle regular node placement. + -- find the air node above the top shoot. place a node. And then, if short enough, + -- check for second node placement. + if node_name == "air" then minetest.set_node(chk_pos, {name = node_below}) - -- handle growing a second node. - if grow_amount == 2 then + -- handle growing a second node. (1 in 32 chance.) + if grow_amount == 2 and dist <= height - 2 then chk_pos = vector.offset(chk_pos, 0, 1, 0) if minetest.get_node(chk_pos).name == "air" then minetest.set_node(chk_pos, {name = node_below}) end end break - elseif mboo ~= "mboo" and mboo ~= "oo_1" and mboo ~= "oo_2" and mboo ~= "oo_3" then - break end end - end -- Add Groups function, courtesy of Warr1024. diff --git a/mods/ITEMS/mcl_bamboo/init.lua b/mods/ITEMS/mcl_bamboo/init.lua index 308e3f61c..2a90c783c 100644 --- a/mods/ITEMS/mcl_bamboo/init.lua +++ b/mods/ITEMS/mcl_bamboo/init.lua @@ -27,8 +27,8 @@ minetest.register_abm({ nodenames = {bamboo, bamboo .. "_1", bamboo .. "_2", bamboo .. "_3"}, interval = 40, chance = 40, - action = function(pos, node) - mcl_bamboo.grow_bamboo(pos, node) + action = function(pos, _) + mcl_bamboo.grow_bamboo(pos, false) end, }) From 687887fe272149c5364119aa24bb3502a8f4917a Mon Sep 17 00:00:00 2001 From: Michieal Date: Wed, 4 Jan 2023 22:49:17 -0500 Subject: [PATCH 035/105] Incorporate applying bonemeal to Bamboo stalks. --- mods/ITEMS/mcl_dye/init.lua | 102 ++++++++++++++++++++---------------- 1 file changed, 56 insertions(+), 46 deletions(-) diff --git a/mods/ITEMS/mcl_dye/init.lua b/mods/ITEMS/mcl_dye/init.lua index 8296519ca..02e8485d3 100644 --- a/mods/ITEMS/mcl_dye/init.lua +++ b/mods/ITEMS/mcl_dye/init.lua @@ -67,28 +67,28 @@ local dyelocal = {} -- This collection of colors is partly a historic thing, partly something else. dyelocal.dyes = { - {"white", "mcl_dye_white", S("Bone Meal"), {dye=1, craftitem=1, basecolor_white=1, excolor_white=1, unicolor_white=1}}, - {"grey", "dye_grey", S("Light Grey Dye"), {dye=1, craftitem=1, basecolor_grey=1, excolor_grey=1, unicolor_grey=1}}, - {"dark_grey", "dye_dark_grey", S("Grey Dye"), {dye=1, craftitem=1, basecolor_grey=1, excolor_darkgrey=1, unicolor_darkgrey=1}}, - {"black", "mcl_dye_black", S("Ink Sac"), {dye=1, craftitem=1, basecolor_black=1, excolor_black=1, unicolor_black=1}}, - {"violet", "dye_violet", S("Purple Dye"), {dye=1, craftitem=1, basecolor_magenta=1, excolor_violet=1, unicolor_violet=1}}, - {"blue", "mcl_dye_blue", S("Lapis Lazuli"), {dye=1, craftitem=1, basecolor_blue=1, excolor_blue=1, unicolor_blue=1}}, - {"lightblue", "mcl_dye_light_blue", S("Light Blue Dye"), {dye=1, craftitem=1, basecolor_blue=1, excolor_blue=1, unicolor_light_blue=1}}, - {"cyan", "dye_cyan", S("Cyan Dye"), {dye=1, craftitem=1, basecolor_cyan=1, excolor_cyan=1, unicolor_cyan=1}}, - {"dark_green", "dye_dark_green", S("Cactus Green"),{dye=1, craftitem=1, basecolor_green=1, excolor_green=1, unicolor_dark_green=1}}, - {"green", "mcl_dye_lime", S("Lime Dye"), {dye=1, craftitem=1, basecolor_green=1, excolor_green=1, unicolor_green=1}}, - {"yellow", "dye_yellow", S("Dandelion Yellow"), {dye=1, craftitem=1, basecolor_yellow=1, excolor_yellow=1, unicolor_yellow=1}}, - {"brown", "mcl_dye_brown", S("Cocoa Beans"), {dye=1, craftitem=1, basecolor_brown=1, excolor_orange=1, unicolor_dark_orange=1, compostability = 65}}, - {"orange", "dye_orange", S("Orange Dye"), {dye=1, craftitem=1, basecolor_orange=1, excolor_orange=1, unicolor_orange=1}}, - {"red", "dye_red", S("Rose Red"), {dye=1, craftitem=1, basecolor_red=1, excolor_red=1, unicolor_red=1}}, - {"magenta", "dye_magenta", S("Magenta Dye"), {dye=1, craftitem=1, basecolor_magenta=1, excolor_red_violet=1,unicolor_red_violet=1}}, - {"pink", "dye_pink", S("Pink Dye"), {dye=1, craftitem=1, basecolor_red=1, excolor_red=1, unicolor_light_red=1}}, + {"white", "mcl_dye_white", S("Bone Meal"), {dye = 1, craftitem = 1, basecolor_white = 1, excolor_white = 1, unicolor_white = 1}}, + {"grey", "dye_grey", S("Light Grey Dye"), {dye = 1, craftitem = 1, basecolor_grey = 1, excolor_grey = 1, unicolor_grey = 1}}, + {"dark_grey", "dye_dark_grey", S("Grey Dye"), {dye = 1, craftitem = 1, basecolor_grey = 1, excolor_darkgrey = 1, unicolor_darkgrey = 1}}, + {"black", "mcl_dye_black", S("Ink Sac"), {dye = 1, craftitem = 1, basecolor_black = 1, excolor_black = 1, unicolor_black = 1}}, + {"violet", "dye_violet", S("Purple Dye"), {dye = 1, craftitem = 1, basecolor_magenta = 1, excolor_violet = 1, unicolor_violet = 1}}, + {"blue", "mcl_dye_blue", S("Lapis Lazuli"), {dye = 1, craftitem = 1, basecolor_blue = 1, excolor_blue = 1, unicolor_blue = 1}}, + {"lightblue", "mcl_dye_light_blue", S("Light Blue Dye"), {dye = 1, craftitem = 1, basecolor_blue = 1, excolor_blue = 1, unicolor_light_blue = 1}}, + {"cyan", "dye_cyan", S("Cyan Dye"), {dye = 1, craftitem = 1, basecolor_cyan = 1, excolor_cyan = 1, unicolor_cyan = 1}}, + {"dark_green", "dye_dark_green", S("Cactus Green"), {dye = 1, craftitem = 1, basecolor_green = 1, excolor_green = 1, unicolor_dark_green = 1}}, + {"green", "mcl_dye_lime", S("Lime Dye"), {dye = 1, craftitem = 1, basecolor_green = 1, excolor_green = 1, unicolor_green = 1}}, + {"yellow", "dye_yellow", S("Dandelion Yellow"), {dye = 1, craftitem = 1, basecolor_yellow = 1, excolor_yellow = 1, unicolor_yellow = 1}}, + {"brown", "mcl_dye_brown", S("Cocoa Beans"), {dye = 1, craftitem = 1, basecolor_brown = 1, excolor_orange = 1, unicolor_dark_orange = 1, compostability = 65}}, + {"orange", "dye_orange", S("Orange Dye"), {dye = 1, craftitem = 1, basecolor_orange = 1, excolor_orange = 1, unicolor_orange = 1}}, + {"red", "dye_red", S("Rose Red"), {dye = 1, craftitem = 1, basecolor_red = 1, excolor_red = 1, unicolor_red = 1}}, + {"magenta", "dye_magenta", S("Magenta Dye"), {dye = 1, craftitem = 1, basecolor_magenta = 1, excolor_red_violet = 1, unicolor_red_violet = 1}}, + {"pink", "dye_pink", S("Pink Dye"), {dye = 1, craftitem = 1, basecolor_red = 1, excolor_red = 1, unicolor_light_red = 1}}, } local mg_name = minetest.get_mapgen_setting("mg_name") dyelocal.unicolor_to_dye_id = {} -for d=1, #dyelocal.dyes do +for d = 1, #dyelocal.dyes do for k, _ in pairs(dyelocal.dyes[d][4]) do if string.sub(k, 1, 9) == "unicolor_" then dyelocal.unicolor_to_dye_id[k] = dyelocal.dyes[d][1] @@ -114,8 +114,8 @@ for _, row in ipairs(dyelocal.dyes) do local img = row[2] local description = row[3] local groups = row[4] - local item_name = "mcl_dye:"..name - local item_image = img..".png" + local item_name = "mcl_dye:" .. name + local item_image = img .. ".png" minetest.register_craftitem(item_name, { inventory_image = item_image, description = description, @@ -156,7 +156,7 @@ function mcl_dye.register_on_bone_meal_apply(func) table.insert(mcl_dye.bone_meal_callbacks, func) end -local function apply_bone_meal(pointed_thing,user) +local function apply_bone_meal(pointed_thing, user) -- Bone meal currently spawns all flowers found in the plains. local flowers_table_plains = { "mcl_flowers:dandelion", @@ -191,7 +191,9 @@ local function apply_bone_meal(pointed_thing,user) local pos = pointed_thing.under local n = minetest.get_node(pos) - if n.name == "" then return false end + if n.name == "" then + return false + end for _, func in pairs(mcl_dye.bone_meal_callbacks) do if func(pointed_thing, user) then @@ -202,7 +204,7 @@ local function apply_bone_meal(pointed_thing,user) if minetest.get_item_group(n.name, "sapling") >= 1 then mcl_dye.add_bone_meal_particle(pos) -- Saplings: 45% chance to advance growth stage - if math.random(1,100) <= 45 then + if math.random(1, 100) <= 45 then return mcl_core.grow_sapling(pos, n) end elseif minetest.get_item_group(n.name, "mushroom") == 1 then @@ -210,7 +212,7 @@ local function apply_bone_meal(pointed_thing,user) -- Try to grow huge mushroom -- Must be on a dirt-type block - local below = minetest.get_node({x=pos.x,y=pos.y-1,z=pos.z}) + local below = minetest.get_node({x = pos.x, y = pos.y - 1, z = pos.z}) if below.name ~= "mcl_core:mycelium" and below.name ~= "mcl_core:dirt" and minetest.get_item_group(below.name, "grass_block") ~= 1 and below.name ~= "mcl_core:coarse_dirt" and below.name ~= "mcl_core:podzol" then return false end @@ -218,12 +220,12 @@ local function apply_bone_meal(pointed_thing,user) -- Select schematic local schematic, offset, height if n.name == "mcl_mushrooms:mushroom_brown" then - schematic = minetest.get_modpath("mcl_mushrooms").."/schematics/mcl_mushrooms_huge_brown.mts" - offset = { x = -3, y = -1, z = -3 } + schematic = minetest.get_modpath("mcl_mushrooms") .. "/schematics/mcl_mushrooms_huge_brown.mts" + offset = {x = -3, y = -1, z = -3} height = 8 elseif n.name == "mcl_mushrooms:mushroom_red" then - schematic = minetest.get_modpath("mcl_mushrooms").."/schematics/mcl_mushrooms_huge_red.mts" - offset = { x = -2, y = -1, z = -2 } + schematic = minetest.get_modpath("mcl_mushrooms") .. "/schematics/mcl_mushrooms_huge_red.mts" + offset = {x = -2, y = -1, z = -2} height = 8 else return false @@ -231,16 +233,16 @@ local function apply_bone_meal(pointed_thing,user) -- 40% chance if math.random(1, 100) <= 40 then -- Check space requirements - for i=1,3 do - local cpos = vector.add(pos, {x=0, y=i, z=0}) + for i = 1, 3 do + local cpos = vector.add(pos, {x = 0, y = i, z = 0}) if minetest.get_node(cpos).name ~= "air" then return false end end local yoff = 3 - local minp, maxp = {x=pos.x-3, y=pos.y+yoff, z=pos.z-3}, {x=pos.x+3, y=pos.y+yoff+(height-3), z=pos.z+3} + local minp, maxp = {x = pos.x - 3, y = pos.y + yoff, z = pos.z - 3}, {x = pos.x + 3, y = pos.y + yoff + (height - 3), z = pos.z + 3} local diff = vector.subtract(maxp, minp) - diff = vector.add(diff, {x=1,y=1,z=1}) + diff = vector.add(diff, {x = 1, y = 1, z = 1}) local totalnodes = diff.x * diff.y * diff.z local goodnodes = minetest.find_nodes_in_area(minp, maxp, {"air", "group:leaves"}) if #goodnodes < totalnodes then @@ -254,7 +256,7 @@ local function apply_bone_meal(pointed_thing,user) return ok ~= nil end return false - -- Wheat, Potato, Carrot, Pumpkin Stem, Melon Stem: Advance by 2-5 stages + -- Wheat, Potato, Carrot, Pumpkin Stem, Melon Stem: Advance by 2-5 stages elseif string.find(n.name, "mcl_farming:wheat_") then mcl_dye.add_bone_meal_particle(pos) local stages = math.random(2, 5) @@ -284,7 +286,7 @@ local function apply_bone_meal(pointed_thing,user) elseif string.find(n.name, "mcl_farming:sweet_berry_bush_") then mcl_dye.add_bone_meal_particle(pos) if n.name == "mcl_farming:sweet_berry_bush_3" then - return minetest.add_item(vector.offset(pos,math.random()-0.5,math.random()-0.5,math.random()-0.5),"mcl_farming:sweet_berry") + return minetest.add_item(vector.offset(pos, math.random() - 0.5, math.random() - 0.5, math.random() - 0.5), "mcl_farming:sweet_berry") else return mcl_farming:grow_plant("plant_sweet_berry_bush", pos, n, 1, true) end @@ -304,12 +306,12 @@ local function apply_bone_meal(pointed_thing,user) if n.name ~= "" and n.name == "air" and (minetest.get_item_group(n2.name, "grass_block_no_snow") == 1) then -- Randomly generate flowers, tall grass or nothing - if math.random(1, 100) <= 90 / ((math.abs(i) + math.abs(j)) / 2)then + if math.random(1, 100) <= 90 / ((math.abs(i) + math.abs(j)) / 2) then -- 90% tall grass, 10% flower mcl_dye.add_bone_meal_particle(pos, {amount = 4}) - if math.random(1,100) <= 90 then + if math.random(1, 100) <= 90 then local col = n2.param2 - minetest.add_node(pos, {name="mcl_flowers:tallgrass", param2=col}) + minetest.add_node(pos, {name = "mcl_flowers:tallgrass", param2 = col}) else local flowers_table if mg_name == "v6" then @@ -326,7 +328,7 @@ local function apply_bone_meal(pointed_thing,user) flowers_table = flowers_table_simple end end - minetest.add_node(pos, {name=flowers_table[math.random(1, #flowers_table)]}) + minetest.add_node(pos, {name = flowers_table[math.random(1, #flowers_table)]}) end end end @@ -335,7 +337,7 @@ local function apply_bone_meal(pointed_thing,user) end return true - -- Double flowers: Drop corresponding item + -- Double flowers: Drop corresponding item elseif n.name == "mcl_flowers:rose_bush" or n.name == "mcl_flowers:rose_bush_top" then mcl_dye.add_bone_meal_particle(pos) minetest.add_item(pos, "mcl_flowers:rose_bush") @@ -356,22 +358,30 @@ local function apply_bone_meal(pointed_thing,user) elseif n.name == "mcl_flowers:tallgrass" then mcl_dye.add_bone_meal_particle(pos) -- Tall Grass: Grow into double tallgrass - local toppos = { x=pos.x, y=pos.y+1, z=pos.z } + local toppos = {x = pos.x, y = pos.y + 1, z = pos.z} local topnode = minetest.get_node(toppos) if minetest.registered_nodes[topnode.name].buildable_to then - minetest.set_node(pos, { name = "mcl_flowers:double_grass", param2 = n.param2 }) - minetest.set_node(toppos, { name = "mcl_flowers:double_grass_top", param2 = n.param2 }) + minetest.set_node(pos, {name = "mcl_flowers:double_grass", param2 = n.param2}) + minetest.set_node(toppos, {name = "mcl_flowers:double_grass_top", param2 = n.param2}) return true end + -- Handle applying bonemeal to bamboo. + elseif mcl_bamboo.is_bamboo(n.name) then + local success = mcl_bamboo.grow_bamboo(pos, true) + if success then + mcl_dye.add_bone_meal_particle(pos) + end + return success + elseif n.name == "mcl_flowers:fern" then mcl_dye.add_bone_meal_particle(pos) -- Fern: Grow into large fern - local toppos = { x=pos.x, y=pos.y+1, z=pos.z } + local toppos = {x = pos.x, y = pos.y + 1, z = pos.z} local topnode = minetest.get_node(toppos) if minetest.registered_nodes[topnode.name].buildable_to then - minetest.set_node(pos, { name = "mcl_flowers:double_fern", param2 = n.param2 }) - minetest.set_node(toppos, { name = "mcl_flowers:double_fern_top", param2 = n.param2 }) + minetest.set_node(pos, {name = "mcl_flowers:double_fern", param2 = n.param2}) + minetest.set_node(toppos, {name = "mcl_flowers:double_fern_top", param2 = n.param2}) return true end end @@ -408,9 +418,9 @@ minetest.register_craftitem("mcl_dye:white", { -- Apply bone meal, if possible local pointed_thing if dropnode.name == "air" then - pointed_thing = { above = droppos, under = { x=droppos.x, y=droppos.y-1, z=droppos.z } } + pointed_thing = {above = droppos, under = {x = droppos.x, y = droppos.y - 1, z = droppos.z}} else - pointed_thing = { above = pos, under = droppos } + pointed_thing = {above = pos, under = droppos} end local success = apply_bone_meal(pointed_thing, nil) if success then From df8fc65e1edd48556911d5ec80b601425002dcb6 Mon Sep 17 00:00:00 2001 From: Michieal Date: Wed, 4 Jan 2023 23:03:08 -0500 Subject: [PATCH 036/105] temp commit. --- mods/ITEMS/mcl_bamboo/bamboo_items.lua | 76 +++++++++++++++----------- 1 file changed, 45 insertions(+), 31 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/bamboo_items.lua b/mods/ITEMS/mcl_bamboo/bamboo_items.lua index 9bf030ef2..63d8a9d38 100644 --- a/mods/ITEMS/mcl_bamboo/bamboo_items.lua +++ b/mods/ITEMS/mcl_bamboo/bamboo_items.lua @@ -9,8 +9,8 @@ local S = minetest.get_translator(modname) local bamboo = "mcl_bamboo:bamboo" local adj_nodes = { vector.new(0, 0, 1), - vector.new(0, 0, -1), vector.new(1, 0, 0), + vector.new(0, 0, -1), vector.new(-1, 0, 0), } @@ -307,8 +307,15 @@ minetest.register_node(scaffold_name, { local dir = vector.subtract(pointed.under, pointed.above) local wdir = minetest.dir_to_wallmounted(dir) local h = 0 + mcl_bamboo.mcl_log("WDIR: " .. wdir) + local fdir = minetest.dir_to_facedir(dir, true) + mcl_bamboo.mcl_log("FDIR: " .. fdir) + + local down_two = minetest.get_node(vector.offset(pointed.under, 0, -1, 0)) + if wdir == 1 then - -- top placement. Prevents placing scaffolding along the sides of other nodes. + -- standing placement. + if mcl_bamboo.is_protected(pos, placer) then return @@ -326,8 +333,8 @@ minetest.register_node(scaffold_name, { repeat pos.y = pos.y + 1 local cn = minetest.get_node(pos) - local cnb = minetest.get_node(pointed.under) - local bn = minetest.get_node(vector.offset(pointed.under, 0, -1, 0)) + local cnb = node + local bn = down_two if cn.name == "air" then -- first step to making scaffolding work like Minecraft scaffolding. if cnb.name == scaffold_name and bn == scaffold_name and SIDE_SCAFFOLDING == false then @@ -347,7 +354,7 @@ minetest.register_node(scaffold_name, { end h = h + 1 until cn.name ~= node.name or itemstack:get_count() == 0 or h >= 128 - else + -- Don't use. From cora, who failed to make something awesome. --[[ if SIDE_SCAFFOLDING then @@ -368,27 +375,28 @@ minetest.register_node(scaffold_name, { end ]] - --[[ Commenting out untested code, for commit. - local fdir = minetest.dir_to_facedir(dir) % 4 + -- Commenting out untested code, for commit. + if SIDE_SCAFFOLDING == true then + local meta = minetest.get_meta(pos) - local meta = minetest.get_meta(pos) + if not meta then + return false + end + -- local count = meta:get_int("count", 0) - if not meta then - return false - end - local count = meta:get_int("count", 0) - - h = minetest.get_node(pointed.under).param2 - --repeat - local ctrl = placer:get_player_control() - if ctrl and ctrl.sneak then + h = minetest.get_node(pointed.under).param2 + local new_pos = pointed.under + repeat + local ctrl = placer:get_player_control() + if ctrl and ctrl.sneak then + if node.name == scaffold_name or node.name == side_scaffold_name then local pp2 = h local np2 = pp2 + 1 fdir = fdir + 1 -- convert fdir to a base of one. - local new_pos = adj_nodes[fdir] + local target_offset = adj_nodes[fdir] - new_pos = vector.offset(pointed.above, new_pos.x, -1, new_pos.z) + new_pos = vector.offset(new_pos, target_offset.x, 0, target_offset.z) if mcl_bamboo.is_protected(new_pos, placer) then -- disallow placement in protected area return @@ -405,10 +413,12 @@ minetest.register_node(scaffold_name, { return itemstack end - ]] - -- h = h + 1 - --until h >= 7 or itemstack.get_count() <= 0 + h = h + 1 + + end + until h >= 7 or itemstack.get_count() <= 0 + end end end, on_destruct = function(pos) @@ -476,15 +486,19 @@ minetest.register_node(side_scaffold_name, { on_rotate = disallow_on_rotate, on_place = function(itemstack, placer, pointed_thing) - if pointed_thing.type ~= "node" then - return itemstack - end - local node = minetest.get_node(pointed_thing.under) - local pos = pointed_thing.under - if mcl_bamboo.is_protected(pos, placer) then - return - end - -- todo: finish this section. + --[[ + if pointed_thing.type ~= "node" then + return itemstack + end + local node = minetest.get_node(pointed_thing.under) + local pos = pointed_thing.under + if mcl_bamboo.is_protected(pos, placer) then + return + end + -- todo: finish this section. + ]] + return false + end From f70176da34b52d11a1db1bb7bbef96878767b451 Mon Sep 17 00:00:00 2001 From: Michieal Date: Wed, 4 Jan 2023 23:56:51 -0500 Subject: [PATCH 037/105] Fix mcl_dyes' mod.conf to use mcl_bamboo grow and check functions. --- mods/ITEMS/mcl_dye/mod.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_dye/mod.conf b/mods/ITEMS/mcl_dye/mod.conf index fe93278fc..bd31e7cfe 100644 --- a/mods/ITEMS/mcl_dye/mod.conf +++ b/mods/ITEMS/mcl_dye/mod.conf @@ -1,2 +1,2 @@ name = mcl_dye -depends = mcl_core, mcl_flowers, mcl_mobitems, mcl_cocoas +depends = mcl_core, mcl_flowers, mcl_mobitems, mcl_cocoas, mcl_bamboo From c4969c13cdecbfa9983d8e17039f87bb8920fcc2 Mon Sep 17 00:00:00 2001 From: Michieal Date: Thu, 5 Jan 2023 00:30:18 -0500 Subject: [PATCH 038/105] trying to fix redundancy error... --- mods/ITEMS/mcl_bamboo/mod.conf | 2 +- mods/ITEMS/mcl_dye/mod.conf | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/mod.conf b/mods/ITEMS/mcl_bamboo/mod.conf index 18bfc79f8..d4b93a7d9 100644 --- a/mods/ITEMS/mcl_bamboo/mod.conf +++ b/mods/ITEMS/mcl_bamboo/mod.conf @@ -1,4 +1,4 @@ name = mcl_bamboo depends = mcl_core, mcl_sounds, mcl_tools -optional_depends = mcl_flowerpots, mclx_stairs, mcl_doors, mcl_signs, mesecons_pressureplates, mcl_fences, mesecons_button, mcl_boats +optional_depends = mcl_flowerpots, mclx_stairs, mcl_doors, mcl_signs, mesecons_pressureplates, mcl_fences, mesecons_button author = Michieal \ No newline at end of file diff --git a/mods/ITEMS/mcl_dye/mod.conf b/mods/ITEMS/mcl_dye/mod.conf index bd31e7cfe..3cb8dd006 100644 --- a/mods/ITEMS/mcl_dye/mod.conf +++ b/mods/ITEMS/mcl_dye/mod.conf @@ -1,2 +1,3 @@ name = mcl_dye -depends = mcl_core, mcl_flowers, mcl_mobitems, mcl_cocoas, mcl_bamboo +depends = mcl_core, mcl_flowers, mcl_mobitems, mcl_cocoas +optional = mcl_bamboo From 08f9c0074a27120a0ba4136a3fe559558c7be85c Mon Sep 17 00:00:00 2001 From: Michieal Date: Thu, 5 Jan 2023 18:31:21 -0500 Subject: [PATCH 039/105] REVERT: Fix mcl_dyes' mod.conf to use mcl_bamboo grow and check functions. --- mods/ITEMS/mcl_dye/init.lua | 6 ++++-- mods/ITEMS/mcl_dye/mod.conf | 1 - 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/mods/ITEMS/mcl_dye/init.lua b/mods/ITEMS/mcl_dye/init.lua index bccbf1dba..b66d08a69 100644 --- a/mods/ITEMS/mcl_dye/init.lua +++ b/mods/ITEMS/mcl_dye/init.lua @@ -353,14 +353,16 @@ local function apply_bone_meal(pointed_thing, user) return true end - -- Handle applying bonemeal to bamboo. +--[[ + Here for when Bonemeal becomes an api, there's code if needed for handling applying to bamboo. + -- Handle applying bonemeal to bamboo. elseif mcl_bamboo.is_bamboo(n.name) then local success = mcl_bamboo.grow_bamboo(pos, true) if success then mcl_dye.add_bone_meal_particle(pos) end return success - +--]] elseif n.name == "mcl_flowers:fern" then mcl_dye.add_bone_meal_particle(pos) -- Fern: Grow into large fern diff --git a/mods/ITEMS/mcl_dye/mod.conf b/mods/ITEMS/mcl_dye/mod.conf index 3cb8dd006..fe93278fc 100644 --- a/mods/ITEMS/mcl_dye/mod.conf +++ b/mods/ITEMS/mcl_dye/mod.conf @@ -1,3 +1,2 @@ name = mcl_dye depends = mcl_core, mcl_flowers, mcl_mobitems, mcl_cocoas -optional = mcl_bamboo From ed64e7f733cd0ff289ce6b8b84478564c314d5b0 Mon Sep 17 00:00:00 2001 From: Michieal Date: Thu, 5 Jan 2023 20:27:52 -0500 Subject: [PATCH 040/105] Reverted scaffolding (WIP) for final push. Making an issue for it's continued work. Left wip in, but commented and future featured out. Will test changes forthwith. Adjusted bamboo base code (randomize which one to use.) to do less math and accomplish the same thing. --- mods/ITEMS/mcl_bamboo/bamboo_base.lua | 8 +- mods/ITEMS/mcl_bamboo/bamboo_items.lua | 177 ++++++++++++++++++++----- 2 files changed, 147 insertions(+), 38 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/bamboo_base.lua b/mods/ITEMS/mcl_bamboo/bamboo_base.lua index 91b188339..363aff9f8 100644 --- a/mods/ITEMS/mcl_bamboo/bamboo_base.lua +++ b/mods/ITEMS/mcl_bamboo/bamboo_base.lua @@ -22,7 +22,6 @@ if minetest.get_modpath("screwdriver") then on_rotate = screwdriver.disallow end - -- basic bamboo nodes. local bamboo_def = { description = "Bamboo", @@ -140,9 +139,9 @@ local bamboo_def = { if bamboo_node ~= -1 then place_item = ItemStack(mcl_bamboo.bamboo_index[bamboo_node]) else - local placed_type = pr:next(0, 3) -- randomly choose which one to place. + local placed_type = pr:next(1, 4) -- randomly choose which one to place. mcl_bamboo.mcl_log("Place_Bamboo_Shoot--Type: " .. placed_type) - place_item = mcl_bamboo.bamboo_index[placed_type + 1] + place_item = mcl_bamboo.bamboo_index[placed_type] end minetest.item_place(place_item, placer, pointed_thing, fdir) itemstack:take_item(1) @@ -192,7 +191,7 @@ bamboo_top.nodebox = nil bamboo_top.selection_box = { type = "fixed", fixed = { - {-0.5, -0.5, -0.5, 0.05, 0.5, 0.5}, + {-0.5, -0.5, -0.5, -0.05, 0.5, 0.5}, } } bamboo_top.collision_box = { @@ -295,6 +294,7 @@ bamboo_one_def.selection_box = { {-0.05, -0.5, 0.285, -0.275, 0.5, 0.06}, } } +mcl_bamboo.mcl_log(dump(mcl_bamboo.bamboo_index)) minetest.register_node(mcl_bamboo.bamboo_index[2], bamboo_one_def) local bamboo_two_def = table.copy(bamboo_def) diff --git a/mods/ITEMS/mcl_bamboo/bamboo_items.lua b/mods/ITEMS/mcl_bamboo/bamboo_items.lua index 63d8a9d38..7c4379637 100644 --- a/mods/ITEMS/mcl_bamboo/bamboo_items.lua +++ b/mods/ITEMS/mcl_bamboo/bamboo_items.lua @@ -6,7 +6,6 @@ -- LOCALS local modname = minetest.get_current_modname() local S = minetest.get_translator(modname) -local bamboo = "mcl_bamboo:bamboo" local adj_nodes = { vector.new(0, 0, 1), vector.new(1, 0, 0), @@ -17,7 +16,10 @@ local adj_nodes = { -- CONSTS -- Due to door fix #2736, doors are displayed backwards. When this is fixed, set this variable to false. local BROKEN_DOORS = true + +-- FUTURE USE VARIABLE. MUST REMAIN FALSE UNTIL IT HAS BEEN FULLY IMPLEMENTED. DO NOT ENABLE. local SIDE_SCAFFOLDING = false +-- --------------------------------------------------------------------------- local node_sound = mcl_sounds.node_sound_wood_defaults() @@ -263,6 +265,142 @@ if minetest.get_modpath("screwdriver") then disallow_on_rotate = screwdriver.disallow end +minetest.register_node(scaffold_name, { + description = S("Scaffolding"), + doc_items_longdesc = S("Scaffolding block used to climb up or out across areas."), + doc_items_hidden = false, + tiles = {"mcl_bamboo_scaffolding_top.png", "mcl_bamboo_scaffolding_top.png", "mcl_bamboo_scaffolding_bottom.png"}, + drawtype = "nodebox", + paramtype = "light", + use_texture_alpha = "clip", + node_box = { + type = "fixed", + fixed = { + {-0.5, 0.375, -0.5, 0.5, 0.5, 0.5}, + {-0.5, -0.5, -0.5, -0.375, 0.5, -0.375}, + {0.375, -0.5, -0.5, 0.5, 0.5, -0.375}, + {0.375, -0.5, 0.375, 0.5, 0.5, 0.5}, + {-0.5, -0.5, 0.375, -0.375, 0.5, 0.5}, + } + }, + selection_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, + }, + }, + buildable_to = false, + is_ground_content = false, + walkable = false, + climbable = true, + physical = true, + node_placement_prediction = "", + groups = {handy = 1, axey = 1, flammable = 3, building_block = 1, material_wood = 1, fire_encouragement = 5, fire_flammability = 20, falling_node = 1, stack_falling = 1}, + sounds = mcl_sounds.node_sound_wood_defaults(), + _mcl_blast_resistance = 0, + _mcl_hardness = 0, + + on_rotate = disallow_on_rotate, + + on_place = function(itemstack, placer, pointed) + mcl_bamboo.mcl_log("Checking for protected placement of scaffolding.") + local node = minetest.get_node(pointed.under) + local pos = pointed.under + local h = 0 + local cnb = node -- Current Base Node. + local bn = minetest.get_node(vector.offset(pos, 0, -1, 0)) -- current node below the cnb. + + -- check protected placement. + if mcl_bamboo.is_protected(pos, placer) then + return + end + mcl_bamboo.mcl_log("placement of scaffolding is not protected.") + -- place on solid nodes + -- Need to add in a check here... to prevent placing scaffolds against doors, chests, etc. + -- Added in a quick check. need to test it. + if node.name ~= scaffold_name then + -- this is a temp fix... will NOT work in final scaffolding implementation. + -- Use pointed node's on_rightclick function first, if present + if placer and not placer:get_player_control().sneak then + if minetest.registered_nodes[node.name] and minetest.registered_nodes[node.name].on_rightclick then + mcl_bamboo.mcl_log("attempting placement of bamboo via targeted node's on_rightclick.") + return minetest.registered_nodes[node.name].on_rightclick(pointed_thing.under, node, placer, itemstack) or itemstack + end + end + -- -------- + + -- A quick check, that may or may not work, to attempt to prevent placing things on the side of other nodes. + local dir = vector.subtract(pointed.under, pointed.above) + local wdir = minetest.dir_to_wallmounted(dir) + if wdir == 1 then + minetest.set_node(pointed.above, {name = scaffold_name, param2 = 0}) + if not minetest.is_creative_enabled(placer:get_player_name()) then + itemstack:take_item(1) + end + return itemstack + else + return + end + end + + --build up when placing on existing scaffold + --[[ + Quick explanation. scaffolding should be placed at the ground level ONLY. To do this, we look at a few + different nodes. Current node (cn) is the top node being placed - make sure that it is air / unoccupied. + BN (below node) is the node below the bottom node; Used to check to see if we are up in the air putting + more scaffolds on the top.. CNB (Current Base Node) is the targeted node for placement; we can only place + scaffolding on this one, to stack them up in the air. + --]] + repeat -- loop through, allowing placement. + pos = vector.offset(pos, 0, 1, 0) -- cleaned up vector. + local cn = minetest.get_node(pos) -- current node. + if cn.name == "air" then + -- first step to making scaffolding work like Minecraft scaffolding. + -- Prevent running up, and putting down new scaffolding + if cnb.name == scaffold_name and bn == scaffold_name and SIDE_SCAFFOLDING == false then + return itemstack + end + + -- Make sure that the uppermost scaffolding doesn't violate protected areas. + if mcl_bamboo.is_protected(pos, placer) then + return itemstack + end + + -- okay, we're good. place the node and take the item unless we are in creative mode. + minetest.set_node(pos, node) + if not minetest.is_creative_enabled(placer:get_player_name()) then + itemstack:take_item(1) + end + -- set the wielded item to the correct itemstack. (possibly unneeded code. but, works.) + placer:set_wielded_item(itemstack) + return itemstack -- finally, return the itemstack to finish on_place. + end + h = h + 1 + until cn.name ~= node.name or itemstack:get_count() == 0 or h >= 128 -- loop check. + end, + on_destruct = function(pos) + -- Node destructor; called before removing node. + local new_pos = vector.offset(pos, 0, 1, 0) + local node_above = minetest.get_node(new_pos) + if node_above and node_above.name == scaffold_name then + 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(scaffold_name) + minetest.add_item(new_pos, istack) + end + end, +}) + +-- FOR FUTURE USE. DO NOT ENABLE. DO NOT UNCOMMENT OUT. THIS WILL BREAK THE SCAFFOLDING, IF NOT FINISHED. +-- YOU HAVE BEEN WARNED. +--[[ +if SIDE_SCAFFOLDING then minetest.register_node(scaffold_name, { description = S("Scaffolding"), doc_items_longdesc = S("Scaffolding block used to climb up or out across areas."), @@ -316,7 +454,6 @@ minetest.register_node(scaffold_name, { if wdir == 1 then -- standing placement. - if mcl_bamboo.is_protected(pos, placer) then return end @@ -355,26 +492,6 @@ minetest.register_node(scaffold_name, { h = h + 1 until cn.name ~= node.name or itemstack:get_count() == 0 or h >= 128 - -- Don't use. From cora, who failed to make something awesome. - --[[ - if SIDE_SCAFFOLDING then - -- count param2 up when placing to the sides. Fall when > 6 - local ctrl = placer:get_player_control() - if ctrl and ctrl.sneak then - local pp2 = minetest.get_node(ptd.under).param2 - local np2 = pp2 + 1 - if minetest.get_node(vector.offset(ptd.above, 0, -1, 0)).name == "air" then - minetest.set_node(ptd.above, {name = side_scaffold_name, param2 = np2}) - itemstack:take_item(1) - end - if np2 > 6 then - minetest.check_single_for_falling(ptd.above) - end - return itemstack - end - end - ]] - -- Commenting out untested code, for commit. if SIDE_SCAFFOLDING == true then local meta = minetest.get_meta(pos) @@ -486,20 +603,12 @@ minetest.register_node(side_scaffold_name, { on_rotate = disallow_on_rotate, on_place = function(itemstack, placer, pointed_thing) - --[[ - if pointed_thing.type ~= "node" then - return itemstack - end - local node = minetest.get_node(pointed_thing.under) - local pos = pointed_thing.under - if mcl_bamboo.is_protected(pos, placer) then - return - end - -- todo: finish this section. - ]] + -- this function shouldn't be called, as this is never placed by the user. + -- it's placed only as a variant of regular scaffolding. return false - end }) +end +--]] From e1cd16c971863909e7476bddf855bf3acde94628 Mon Sep 17 00:00:00 2001 From: Michieal Date: Fri, 6 Jan 2023 00:41:26 -0500 Subject: [PATCH 041/105] Adjusted growth interval. tested and fixed bamboo growth function. Add debug code across growth function and scaffold place. disabled debug for commit. removed finished todos. --- mods/ITEMS/mcl_bamboo/bamboo_items.lua | 4 +++- mods/ITEMS/mcl_bamboo/globals.lua | 26 ++++++++++++++++++++++---- mods/ITEMS/mcl_bamboo/init.lua | 4 +--- 3 files changed, 26 insertions(+), 8 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/bamboo_items.lua b/mods/ITEMS/mcl_bamboo/bamboo_items.lua index 7c4379637..ab8aa9d65 100644 --- a/mods/ITEMS/mcl_bamboo/bamboo_items.lua +++ b/mods/ITEMS/mcl_bamboo/bamboo_items.lua @@ -310,6 +310,8 @@ minetest.register_node(scaffold_name, { local cnb = node -- Current Base Node. local bn = minetest.get_node(vector.offset(pos, 0, -1, 0)) -- current node below the cnb. + mcl_bamboo.mcl_log("Below Node: " .. bn.name) + -- check protected placement. if mcl_bamboo.is_protected(pos, placer) then return @@ -324,7 +326,7 @@ minetest.register_node(scaffold_name, { if placer and not placer:get_player_control().sneak then if minetest.registered_nodes[node.name] and minetest.registered_nodes[node.name].on_rightclick then mcl_bamboo.mcl_log("attempting placement of bamboo via targeted node's on_rightclick.") - return minetest.registered_nodes[node.name].on_rightclick(pointed_thing.under, node, placer, itemstack) or itemstack + return minetest.registered_nodes[node.name].on_rightclick(pointed.under, node, placer, itemstack) or itemstack end end -- -------- diff --git a/mods/ITEMS/mcl_bamboo/globals.lua b/mods/ITEMS/mcl_bamboo/globals.lua index e2fd6d1da..38892a3ca 100644 --- a/mods/ITEMS/mcl_bamboo/globals.lua +++ b/mods/ITEMS/mcl_bamboo/globals.lua @@ -4,7 +4,7 @@ --- DateTime: 12/29/22 12:34 PM -- Restructure Date --- -local DEBUG = true +local DEBUG = false local rand = math.random math.randomseed((os.time() + 31) * 31415) -- try to make a valid seed @@ -58,6 +58,7 @@ end function mcl_bamboo.grow_bamboo(pos, bonemeal_applied) local node_above = minetest.get_node(vector.offset(pos, 0, 1, 0)) + mcl_bamboo.mcl_log("Grow bamboo called; bonemeal: " .. tostring(bonemeal_applied)) if not bonemeal_applied and mcl_bamboo.is_bamboo(node_above.name) == true then return false -- short circuit this function if we're trying to grow (std) the bamboo and it's not the top shoot. @@ -75,6 +76,7 @@ function mcl_bamboo.grow_bamboo(pos, bonemeal_applied) local node_below -- ------------------- + mcl_bamboo.mcl_log("Grow bamboo; checking for soil: ") -- the soil node below. for py = -1, BAMBOO_SOIL_DIST, -1 do chk_pos = vector.offset(pos, 0, py, 0) @@ -93,11 +95,13 @@ function mcl_bamboo.grow_bamboo(pos, bonemeal_applied) return false -- returning false means don't use up the bonemeal. end + mcl_bamboo.mcl_log("Grow bamboo; soil found: ") local grow_amount = rand(1, GROW_DOUBLE_CHANCE) grow_amount = rand(1, GROW_DOUBLE_CHANCE) grow_amount = rand(1, GROW_DOUBLE_CHANCE) -- because yeah, not truly random, or even a good prng. grow_amount = rand(1, GROW_DOUBLE_CHANCE) - local init_height = rand(BAM_MAX_HEIGHT_STPCHK, BAM_MAX_HEIGHT_TOP) + local init_height = rand(BAM_MAX_HEIGHT_STPCHK + 1, BAM_MAX_HEIGHT_TOP + 1) + mcl_bamboo.mcl_log("Grow bamboo; random height: " .. init_height) node_name = "" @@ -106,16 +110,21 @@ function mcl_bamboo.grow_bamboo(pos, bonemeal_applied) local meta = minetest.get_meta(first_shoot) node_below = minetest.get_node(first_shoot).name + mcl_bamboo.mcl_log("Grow bamboo; checking height meta ") -- check the meta data for the first node, to see how high to make the stalk. if not meta then -- if no metadata, set the metadata!!! - meta:get_int("height", init_height) + meta:set_int("height", init_height) end local height = meta:get_int("height", -1) - if height == -1 then + mcl_bamboo.mcl_log("Grow bamboo; meta-height: " .. height) + if height <= 10 then height = init_height + meta:set_int("height", init_height) end + mcl_bamboo.mcl_log("Grow bamboo; height: " .. height) + -- Bonemeal: Grows the bamboo by 1-2 stems. (per the minecraft wiki.) if bonemeal_applied then -- handle applying bonemeal. @@ -129,6 +138,8 @@ function mcl_bamboo.grow_bamboo(pos, bonemeal_applied) end end + mcl_bamboo.mcl_log("Grow bamboo; dist: " .. dist) + if node_name == "mcl_bamboo:bamboo_endcap" then -- prevent overgrowth return false @@ -139,6 +150,7 @@ function mcl_bamboo.grow_bamboo(pos, bonemeal_applied) if dist == height - 1 then -- equals top of the stalk before the cap if node_name == "air" then + mcl_bamboo.mcl_log("Grow bamboo; Placing endcap") minetest.set_node(vector.offset(chk_pos, 0, 1, 0), {name = "mcl_bamboo:bamboo_endcap"}) return true -- returning true means use up the bonemeal. else @@ -155,11 +167,13 @@ function mcl_bamboo.grow_bamboo(pos, bonemeal_applied) if dist <= height - 2 then if node_name == "air" then -- here we can check to see if we can do up to 2 bamboo shoots onto the stalk + mcl_bamboo.mcl_log("Grow bamboo; Placing bamboo.") minetest.set_node(chk_pos, {name = node_below}) -- handle growing a second node. if grow_amount == 2 then chk_pos = vector.offset(chk_pos, 0, 1, 0) if minetest.get_node(chk_pos).name == "air" then + mcl_bamboo.mcl_log("Grow bamboo; OOOH! It's twofer day!") minetest.set_node(chk_pos, {name = node_below}) end end @@ -180,6 +194,7 @@ function mcl_bamboo.grow_bamboo(pos, bonemeal_applied) if dist >= height - 1 then if node_name == "air" then if height - 1 == dist then + mcl_bamboo.mcl_log("Grow bamboo; Placing endcap") minetest.set_node(chk_pos, {name = "mcl_bamboo:bamboo_endcap"}) end end @@ -190,11 +205,14 @@ function mcl_bamboo.grow_bamboo(pos, bonemeal_applied) -- find the air node above the top shoot. place a node. And then, if short enough, -- check for second node placement. if node_name == "air" then + mcl_bamboo.mcl_log("Grow bamboo; dist: " .. dist) + mcl_bamboo.mcl_log("Grow bamboo; Placing bamboo.") minetest.set_node(chk_pos, {name = node_below}) -- handle growing a second node. (1 in 32 chance.) if grow_amount == 2 and dist <= height - 2 then chk_pos = vector.offset(chk_pos, 0, 1, 0) if minetest.get_node(chk_pos).name == "air" then + mcl_bamboo.mcl_log("Grow bamboo; OOOH! It's twofer day!") minetest.set_node(chk_pos, {name = node_below}) end end diff --git a/mods/ITEMS/mcl_bamboo/init.lua b/mods/ITEMS/mcl_bamboo/init.lua index 2a90c783c..c180dc6ec 100644 --- a/mods/ITEMS/mcl_bamboo/init.lua +++ b/mods/ITEMS/mcl_bamboo/init.lua @@ -25,7 +25,7 @@ dofile(minetest.get_modpath(modname) .. "/recipes.lua") --ABMs minetest.register_abm({ nodenames = {bamboo, bamboo .. "_1", bamboo .. "_2", bamboo .. "_3"}, - interval = 40, + interval = 31.5, chance = 40, action = function(pos, _) mcl_bamboo.grow_bamboo(pos, false) @@ -48,8 +48,6 @@ minetest.register_alias("mcl_scaffolding:scaffolding_horizontal", "mcl_bamboo:sc --[[ todo -- make scaffolds do side scaffold blocks, so that they jut out. todo -- Also, make those blocks collapse (break) when a nearby connected scaffold breaks. -todo -- fix the random height for bamboo. Use metadata for storing the height, on_place. -todo -- fix scaffolding placing, instead of using on_rightclick first. waiting on specific things: todo -- Raft -- need model From cc24144bc66094c7c79f3a0c9c63479225744328 Mon Sep 17 00:00:00 2001 From: Michieal Date: Fri, 6 Jan 2023 01:22:18 -0500 Subject: [PATCH 042/105] Fixed collision and selection box for endcap nodes. fixed typo in debug message. --- mods/ITEMS/mcl_bamboo/bamboo_base.lua | 14 ++------------ mods/ITEMS/mcl_bamboo/globals.lua | 2 +- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/bamboo_base.lua b/mods/ITEMS/mcl_bamboo/bamboo_base.lua index 363aff9f8..7b2fb12f1 100644 --- a/mods/ITEMS/mcl_bamboo/bamboo_base.lua +++ b/mods/ITEMS/mcl_bamboo/bamboo_base.lua @@ -188,18 +188,8 @@ bamboo_top.drawtype = "plantlike_rooted" --"plantlike" bamboo_top.special_tiles = {{name = "mcl_bamboo_endcap.png"}} bamboo_top.nodebox = nil -bamboo_top.selection_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, -0.5, -0.05, 0.5, 0.5}, - } -} -bamboo_top.collision_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, -0.5, 0.05, 0.5, 0.5}, - } -} +bamboo_top.selection_box = nil +bamboo_top.collision_box = nil bamboo_top.on_place = function(itemstack, _, _) -- Should never occur... but, if it does, then nix it. diff --git a/mods/ITEMS/mcl_bamboo/globals.lua b/mods/ITEMS/mcl_bamboo/globals.lua index 38892a3ca..2e44a695e 100644 --- a/mods/ITEMS/mcl_bamboo/globals.lua +++ b/mods/ITEMS/mcl_bamboo/globals.lua @@ -95,7 +95,7 @@ function mcl_bamboo.grow_bamboo(pos, bonemeal_applied) return false -- returning false means don't use up the bonemeal. end - mcl_bamboo.mcl_log("Grow bamboo; soil found: ") + mcl_bamboo.mcl_log("Grow bamboo; soil found. ") local grow_amount = rand(1, GROW_DOUBLE_CHANCE) grow_amount = rand(1, GROW_DOUBLE_CHANCE) grow_amount = rand(1, GROW_DOUBLE_CHANCE) -- because yeah, not truly random, or even a good prng. From ee0b355f5132eec23025bef5b4c9233b14d77001 Mon Sep 17 00:00:00 2001 From: Michieal Date: Fri, 6 Jan 2023 20:21:08 +0000 Subject: [PATCH 043/105] Fix licensing. --- mods/ITEMS/mcl_bamboo/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_bamboo/README.md b/mods/ITEMS/mcl_bamboo/README.md index a6ef7911d..7705e665e 100644 --- a/mods/ITEMS/mcl_bamboo/README.md +++ b/mods/ITEMS/mcl_bamboo/README.md @@ -5,7 +5,8 @@ This mod adds minecraft-like bamboo nodes to your Mineclone 2 world. Code: Michieal. Original (basic) bamboo code by: Small Joker. -License for code / images / textures: CC-BY-SA. +License for code: GPLv3. +License for images / textures: CC-BY-SA. Images Created by Michieal, except for: Inventory / wield image: created by RandomLegoBrick#8692 and is CC0. From 07a56165ed1d10b7ab8199cab6dea2718b6b0b6b Mon Sep 17 00:00:00 2001 From: Michieal Date: Fri, 6 Jan 2023 20:23:59 +0000 Subject: [PATCH 044/105] update optional depends. --- mods/ITEMS/mcl_bamboo/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_bamboo/README.md b/mods/ITEMS/mcl_bamboo/README.md index 7705e665e..733ec6ce2 100644 --- a/mods/ITEMS/mcl_bamboo/README.md +++ b/mods/ITEMS/mcl_bamboo/README.md @@ -12,7 +12,8 @@ Inventory / wield image: created by RandomLegoBrick#8692 and is CC0. Dependencies: mcl_core, mcl_sounds, mcl_tools -Optional Dependencies = mcl_flowerpots, mclx_stairs, mcl_doors, mcl_signs, mesecons_pressureplates, mcl_fences, mesecons_button, mcl_boats +Optional Dependencies = mcl_flowerpots, mclx_stairs, mcl_doors, mcl_signs, mesecons_pressureplates, mcl_fences, mesecons_button. +Note that "mcl_boats" may be used at a later date. Special thanks to Nicu for help with the nodebox stalk design. From 7ebf9b7ab84c95ac74c1fba6b116d520e7c132ed Mon Sep 17 00:00:00 2001 From: Michieal Date: Fri, 6 Jan 2023 17:40:35 -0500 Subject: [PATCH 045/105] Mega commit. lol. Did a LOT of refactoring. Cleaned up some vestigial code. Cleaned up aliases. --- mods/ITEMS/mcl_bamboo/bamboo_base.lua | 49 ++++++------- mods/ITEMS/mcl_bamboo/bamboo_items.lua | 98 +++++++++++--------------- mods/ITEMS/mcl_bamboo/globals.lua | 10 +-- mods/ITEMS/mcl_bamboo/init.lua | 25 ++++--- mods/ITEMS/mcl_bamboo/recipes.lua | 94 ++++++++++++++---------- 5 files changed, 138 insertions(+), 138 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/bamboo_base.lua b/mods/ITEMS/mcl_bamboo/bamboo_base.lua index 7b2fb12f1..ee82b55dd 100644 --- a/mods/ITEMS/mcl_bamboo/bamboo_base.lua +++ b/mods/ITEMS/mcl_bamboo/bamboo_base.lua @@ -4,17 +4,17 @@ --- DateTime: 12/29/22 12:33 PM -- Restructure Date --- +-- CONSTS +local DOUBLE_DROP_CHANCE = 8 +-- Used everywhere. Often this is just the name, but it makes sense to me as BAMBOO, because that's how I think of it... +-- "BAMBOO" goes here. +local BAMBOO = "mcl_bamboo:bamboo" +local BAMBOO_ENDCAP_NAME = "mcl_bamboo:bamboo_endcap" + -- LOCALS local modname = minetest.get_current_modname() local S = minetest.get_translator(modname) -local bamboo = "mcl_bamboo:bamboo" local node_sound = mcl_sounds.node_sound_wood_defaults() - --- CONSTS -local DOUBLE_DROP_CHANCE = 8 - -local strlen = string.len -local substr = string.sub local pr = PseudoRandom((os.time() + 15766) * 12) -- switched from math.random() to PseudoRandom because the random wasn't very random. local on_rotate @@ -46,13 +46,13 @@ local bamboo_def = { -- 1 in 100 chance of dropping. -- Default rarity is '1'. rarity = DOUBLE_DROP_CHANCE, - items = {bamboo .. " 2"}, + items = {BAMBOO .. " 2"}, }, { -- 1 in 2 chance of dropping. -- Default rarity is '1'. rarity = 1, - items = {bamboo}, + items = {BAMBOO}, }, }, }, @@ -90,11 +90,10 @@ local bamboo_def = { local node = minetest.get_node(pointed_thing.under) local pos = pointed_thing.under local nodename = node.name - mcl_bamboo.mcl_log("node name: " .. nodename) mcl_bamboo.mcl_log("Node placement data:") mcl_bamboo.mcl_log(dump(pointed_thing)) - mcl_bamboo.mcl_log(node.name) + mcl_bamboo.mcl_log("node name: " .. nodename) mcl_bamboo.mcl_log("Checking for protected placement of bamboo.") if mcl_bamboo.is_protected(pos, placer) then @@ -110,7 +109,7 @@ local bamboo_def = { end end - if mcl_bamboo.is_bamboo(nodename) == false and nodename ~= "mcl_bamboo:bamboo_endcap" then + if mcl_bamboo.is_bamboo(nodename) == false and nodename ~= BAMBOO_ENDCAP_NAME then -- not bamboo... if nodename ~= "mcl_flowerpots:flower_pot" then if mcl_bamboo.is_dirt(nodename) == false then @@ -131,10 +130,9 @@ local bamboo_def = { local place_item = ItemStack(itemstack) -- make a copy so that we don't indirectly mess with the original. - mcl_bamboo.mcl_log("node name: " .. nodename) - local bamboo_node = mcl_bamboo.is_bamboo(nodename) - mcl_bamboo.mcl_log("bamboo_node: " .. bamboo_node) + mcl_bamboo.mcl_log("node name: " .. nodename .. "\nbamboo_node: " .. bamboo_node) + -- intentional use of nodename. if bamboo_node ~= -1 then place_item = ItemStack(mcl_bamboo.bamboo_index[bamboo_node]) @@ -152,32 +150,25 @@ local bamboo_def = { -- Node destructor; called before removing node. local new_pos = vector.offset(pos, 0, 1, 0) local node_above = minetest.get_node(new_pos) - local bamboo_node = substr(node_above.name, 1, strlen(bamboo)) - local istack = ItemStack(bamboo) + local bamboo_node = string.sub(node_above.name, 1, string.len(BAMBOO)) + local istack = ItemStack(BAMBOO) local sound_params = { pos = new_pos, gain = 1.0, -- default max_hear_distance = 10, -- default, uses a Euclidean metric } - if node_above and (bamboo_node == bamboo and node_above.name ~= "mcl_bamboo:bamboo_endcap") then + if node_above and (bamboo_node == BAMBOO or node_above.name == BAMBOO_ENDCAP_NAME) then minetest.remove_node(new_pos) minetest.sound_play(node_sound.dug, sound_params, true) if pr:next(1, DOUBLE_DROP_CHANCE) == 1 then minetest.add_item(new_pos, istack) end minetest.add_item(new_pos, istack) - elseif node_above and node_above.name == "mcl_bamboo:bamboo_endcap" then - minetest.remove_node(new_pos) - minetest.sound_play(node_sound.dug, sound_params, true) - minetest.add_item(new_pos, istack) - if pr:next(1, DOUBLE_DROP_CHANCE) == 1 then - minetest.add_item(new_pos, istack) - end end end, } -minetest.register_node(bamboo, bamboo_def) +minetest.register_node(BAMBOO, bamboo_def) local bamboo_top = table.copy(bamboo_def) bamboo_top.groups = {not_in_creative_inventory = 1, handy = 1, axey = 1, choppy = 1, flammable = 3} @@ -193,11 +184,11 @@ bamboo_top.collision_box = nil bamboo_top.on_place = function(itemstack, _, _) -- Should never occur... but, if it does, then nix it. - itemstack:set_name(bamboo) + itemstack:set_name(BAMBOO) return itemstack end -minetest.register_node("mcl_bamboo:bamboo_endcap", bamboo_top) +minetest.register_node(BAMBOO_ENDCAP_NAME, bamboo_top) local bamboo_block_def = { description = "Bamboo Block", @@ -253,7 +244,7 @@ minetest.register_node("mcl_bamboo:bamboo_plank", { -- Bamboo Part 2 Base nodes. -- Bamboo Mosaic -local bamboo_mosaic = table.copy(minetest.registered_nodes[bamboo .. "_plank"]) +local bamboo_mosaic = table.copy(minetest.registered_nodes[BAMBOO .. "_plank"]) bamboo_mosaic.tiles = {"mcl_bamboo_bamboo_plank.png"} bamboo_mosaic.groups = {handy = 1, axey = 1, flammable = 3, fire_encouragement = 5, fire_flammability = 20} bamboo_mosaic.description = S("Bamboo Mosaic Plank") diff --git a/mods/ITEMS/mcl_bamboo/bamboo_items.lua b/mods/ITEMS/mcl_bamboo/bamboo_items.lua index ab8aa9d65..efe92d7d9 100644 --- a/mods/ITEMS/mcl_bamboo/bamboo_items.lua +++ b/mods/ITEMS/mcl_bamboo/bamboo_items.lua @@ -3,6 +3,21 @@ --- Created by michieal. --- DateTime: 12/29/22 12:38 PM -- Restructure Date --- + +-- CONSTS +-- Due to door fix #2736, doors are displayed backwards. When this is fixed, set this variable to false. +local BROKEN_DOORS = true + +-- FUTURE USE VARIABLE. MUST REMAIN FALSE UNTIL IT HAS BEEN FULLY IMPLEMENTED. DO NOT ENABLE. +local SIDE_SCAFFOLDING = false +local SIDE_SCAFFOLD_NAME = "mcl_bamboo:scaffolding_horizontal" +-- --------------------------------------------------------------------------- +local SCAFFOLDING_NAME = "mcl_bamboo:scaffolding" +-- Used everywhere. Often this is just the name, but it makes sense to me as BAMBOO, because that's how I think of it... +-- "BAMBOO" goes here. +local BAMBOO = "mcl_bamboo:bamboo" +local BAMBOO_PLANK = BAMBOO .. "_plank" + -- LOCALS local modname = minetest.get_current_modname() local S = minetest.get_translator(modname) @@ -12,15 +27,6 @@ local adj_nodes = { vector.new(0, 0, -1), vector.new(-1, 0, 0), } - --- CONSTS --- Due to door fix #2736, doors are displayed backwards. When this is fixed, set this variable to false. -local BROKEN_DOORS = true - --- FUTURE USE VARIABLE. MUST REMAIN FALSE UNTIL IT HAS BEEN FULLY IMPLEMENTED. DO NOT ENABLE. -local SIDE_SCAFFOLDING = false --- --------------------------------------------------------------------------- - local node_sound = mcl_sounds.node_sound_wood_defaults() -- specific bamboo nodes (Items)... Pt. 1 @@ -28,15 +34,15 @@ if minetest.get_modpath("mcl_flowerpots") then mcl_bamboo.mcl_log("FlowerPot Section Entrance. Modpath exists.") if mcl_flowerpots ~= nil then -- Flower-potted Bamboo... - local flwr_name = "mcl_bamboo:bamboo" + local flwr_name = BAMBOO local flwr_def = {name = "bamboo_plant", desc = S("Bamboo"), image = "mcl_bamboo_bamboo_fpm.png", -- use with "register_potted_cube" -- "mcl_bamboo_flower_pot.png", -- use with "register_potted_flower" } - mcl_flowerpots.register_potted_cube(flwr_name, flwr_def) - -- mcl_flowerpots.register_potted_flower(flwr_name, flwr_def) + -- Chose cube over "potted_flower" as "potted flower" looks bad. + mcl_flowerpots.register_potted_cube(flwr_name, flwr_def) -- mcl_flowerpots.register_potted_flower(flwr_name, flwr_def) minetest.register_alias("bamboo_flower_pot", "mcl_flowerpots:flower_pot_bamboo_plant") end end @@ -111,7 +117,7 @@ if minetest.get_modpath("mcl_stairs") then ) mcl_stairs.register_stair_and_slab_simple( "bamboo_plank", - "mcl_bamboo:bamboo_plank", + BAMBOO_PLANK, S("Bamboo Plank Stair"), S("Bamboo Plank Slab"), S("Double Bamboo Plank Slab") @@ -166,7 +172,7 @@ if minetest.get_modpath("mesecons_pressureplates") then {"mcl_bamboo_bamboo_plank.png"}, "mcl_bamboo_bamboo_plank.png", nil, - {{"mcl_bamboo:bamboo_plank", "mcl_bamboo:bamboo_plank"}}, + {{BAMBOO_PLANK, BAMBOO_PLANK}}, mcl_sounds.node_sound_wood_defaults(), {axey = 1, material_wood = 1}, nil, @@ -189,7 +195,7 @@ if minetest.get_modpath("mcl_signs") then mcl_signs.register_sign_custom("mcl_bamboo", "_bamboo", "mcl_signs_sign_greyscale.png", "#f6dc91", "default_sign_greyscale.png", "default_sign_greyscale.png", "Bamboo Sign") - mcl_signs.register_sign_craft("mcl_bamboo", "mcl_bamboo:bamboo_plank", "_bamboo") + mcl_signs.register_sign_craft("mcl_bamboo", BAMBOO_PLANK, "_bamboo") minetest.register_alias("bamboo_sign", "mcl_signs:wall_sign_bamboo") end end @@ -198,7 +204,6 @@ if minetest.get_modpath("mcl_fences") then mcl_bamboo.mcl_log("Fences Section Entrance. Modpath exists.") local id = "bamboo_fence" - local id_gate = "bamboo_fence_gate" local wood_groups = {handy = 1, axey = 1, flammable = 2, fence_wood = 1, fire_encouragement = 5, fire_flammability = 20} local wood_connect = {"group:fence_wood"} @@ -209,24 +214,6 @@ if minetest.get_modpath("mcl_fences") then mcl_bamboo.mcl_log(dump(fence_id)) mcl_bamboo.mcl_log(dump(gate_id)) - - local craft_wood = "mcl_bamboo:bamboo_plank" - minetest.register_craft({ - output = "mcl_bamboo:" .. id .. " 3", - recipe = { - {craft_wood, "mcl_core:stick", craft_wood}, - {craft_wood, "mcl_core:stick", craft_wood}, - } - }) - minetest.register_craft({ - output = "mcl_bamboo:" .. id_gate, - recipe = { - {"mcl_core:stick", craft_wood, "mcl_core:stick"}, - {"mcl_core:stick", craft_wood, "mcl_core:stick"}, - } - }) - minetest.register_alias("bamboo_fence", "mcl_fences:" .. id) - minetest.register_alias("bamboo_fence_gate", "mcl_fences:" .. id_gate) end if minetest.get_modpath("mesecons_button") then @@ -235,7 +222,7 @@ if minetest.get_modpath("mesecons_button") then "bamboo", S("Bamboo Button"), "mcl_bamboo_bamboo_plank.png", - "mcl_bamboo:bamboo_plank", + BAMBOO_PLANK, node_sound, {material_wood = 1, handy = 1, pickaxey = 1, flammable = 3, fire_flammability = 20, fire_encouragement = 5, }, 1, @@ -257,15 +244,12 @@ if minetest.get_modpath("mcl_stairs") then end end -local scaffold_name = "mcl_bamboo:scaffolding" -local side_scaffold_name = "mcl_bamboo:scaffolding_horizontal" - local disallow_on_rotate if minetest.get_modpath("screwdriver") then disallow_on_rotate = screwdriver.disallow end -minetest.register_node(scaffold_name, { +minetest.register_node(SCAFFOLDING_NAME, { description = S("Scaffolding"), doc_items_longdesc = S("Scaffolding block used to climb up or out across areas."), doc_items_hidden = false, @@ -320,7 +304,7 @@ minetest.register_node(scaffold_name, { -- place on solid nodes -- Need to add in a check here... to prevent placing scaffolds against doors, chests, etc. -- Added in a quick check. need to test it. - if node.name ~= scaffold_name then + if node.name ~= SCAFFOLDING_NAME then -- this is a temp fix... will NOT work in final scaffolding implementation. -- Use pointed node's on_rightclick function first, if present if placer and not placer:get_player_control().sneak then @@ -335,7 +319,7 @@ minetest.register_node(scaffold_name, { local dir = vector.subtract(pointed.under, pointed.above) local wdir = minetest.dir_to_wallmounted(dir) if wdir == 1 then - minetest.set_node(pointed.above, {name = scaffold_name, param2 = 0}) + minetest.set_node(pointed.above, {name = SCAFFOLDING_NAME, param2 = 0}) if not minetest.is_creative_enabled(placer:get_player_name()) then itemstack:take_item(1) end @@ -357,9 +341,9 @@ minetest.register_node(scaffold_name, { pos = vector.offset(pos, 0, 1, 0) -- cleaned up vector. local cn = minetest.get_node(pos) -- current node. if cn.name == "air" then - -- first step to making scaffolding work like Minecraft scaffolding. + -- first step to making scaffolding work like scaffolding should. -- Prevent running up, and putting down new scaffolding - if cnb.name == scaffold_name and bn == scaffold_name and SIDE_SCAFFOLDING == false then + if cnb.name == SCAFFOLDING_NAME and bn == SCAFFOLDING_NAME and SIDE_SCAFFOLDING == false then return itemstack end @@ -384,7 +368,7 @@ minetest.register_node(scaffold_name, { -- Node destructor; called before removing node. local new_pos = vector.offset(pos, 0, 1, 0) local node_above = minetest.get_node(new_pos) - if node_above and node_above.name == scaffold_name then + if node_above and node_above.name == SCAFFOLDING_NAME then local sound_params = { pos = new_pos, gain = 1.0, -- default @@ -393,7 +377,7 @@ minetest.register_node(scaffold_name, { minetest.remove_node(new_pos) minetest.sound_play(node_sound.dug, sound_params, true) - local istack = ItemStack(scaffold_name) + local istack = ItemStack(SCAFFOLDING_NAME) minetest.add_item(new_pos, istack) end end, @@ -403,7 +387,7 @@ minetest.register_node(scaffold_name, { -- YOU HAVE BEEN WARNED. --[[ if SIDE_SCAFFOLDING then -minetest.register_node(scaffold_name, { +minetest.register_node(SCAFFOLDING_NAME, { description = S("Scaffolding"), doc_items_longdesc = S("Scaffolding block used to climb up or out across areas."), doc_items_hidden = false, @@ -461,8 +445,8 @@ minetest.register_node(scaffold_name, { end mcl_bamboo.mcl_log("placement of scaffolding is not protected.") -- place on solid nodes - if node.name ~= scaffold_name then - minetest.set_node(pointed.above, {name = scaffold_name, param2 = 0}) + if node.name ~= SCAFFOLDING_NAME then + minetest.set_node(pointed.above, {name = SCAFFOLDING_NAME, param2 = 0}) if not minetest.is_creative_enabled(placer:get_player_name()) then itemstack:take_item(1) end @@ -476,7 +460,7 @@ minetest.register_node(scaffold_name, { local bn = down_two if cn.name == "air" then -- first step to making scaffolding work like Minecraft scaffolding. - if cnb.name == scaffold_name and bn == scaffold_name and SIDE_SCAFFOLDING == false then + if cnb.name == SCAFFOLDING_NAME and bn == SCAFFOLDING_NAME and SIDE_SCAFFOLDING == false then return itemstack end @@ -508,7 +492,7 @@ minetest.register_node(scaffold_name, { repeat local ctrl = placer:get_player_control() if ctrl and ctrl.sneak then - if node.name == scaffold_name or node.name == side_scaffold_name then + if node.name == SCAFFOLDING_NAME or node.name == SIDE_SCAFFOLD_NAME then local pp2 = h local np2 = pp2 + 1 @@ -523,7 +507,7 @@ minetest.register_node(scaffold_name, { itemstack:take_item(1) if minetest.get_node(new_pos).name == "air" then - minetest.set_node(new_pos, {name = side_scaffold_name, param2 = np2}) + minetest.set_node(new_pos, {name = SIDE_SCAFFOLD_NAME, param2 = np2}) if np2 >= 6 then np2 = 6 minetest.minetest.dig_node(new_pos) @@ -544,7 +528,7 @@ minetest.register_node(scaffold_name, { -- Node destructor; called before removing node. local new_pos = vector.offset(pos, 0, 1, 0) local node_above = minetest.get_node(new_pos) - if node_above and node_above.name == scaffold_name then + if node_above and node_above.name == SCAFFOLDING_NAME then local sound_params = { pos = new_pos, gain = 1.0, -- default @@ -553,13 +537,13 @@ minetest.register_node(scaffold_name, { minetest.remove_node(new_pos) minetest.sound_play(node_sound.dug, sound_params, true) - local istack = ItemStack(scaffold_name) + local istack = ItemStack(SCAFFOLDING_NAME) minetest.add_item(new_pos, istack) end end, }) -minetest.register_node(side_scaffold_name, { +minetest.register_node(SIDE_SCAFFOLD_NAME, { description = S("Scaffolding"), doc_items_longdesc = S("Scaffolding block used to climb up or out across areas."), doc_items_hidden = false, @@ -588,11 +572,11 @@ minetest.register_node(side_scaffold_name, { groups = {handy = 1, axey = 1, flammable = 3, building_block = 1, material_wood = 1, fire_encouragement = 5, fire_flammability = 20, not_in_creative_inventory = 1, falling_node = 1}, _mcl_after_falling = function(pos) if minetest.get_node(pos).name == "mcl_bamboo:scaffolding_horizontal" then - if minetest.get_node(vector.offset(pos, 0, 0, 0)).name ~= scaffold_name then + if minetest.get_node(vector.offset(pos, 0, 0, 0)).name ~= SCAFFOLDING_NAME then minetest.remove_node(pos) - minetest.add_item(pos, scaffold_name) + minetest.add_item(pos, SCAFFOLDING_NAME) else - minetest.set_node(vector.offset(pos, 0, 1, 0), {name = side_scaffold_name}) + minetest.set_node(vector.offset(pos, 0, 1, 0), {name = SIDE_SCAFFOLD_NAME}) end end end, diff --git a/mods/ITEMS/mcl_bamboo/globals.lua b/mods/ITEMS/mcl_bamboo/globals.lua index 2e44a695e..6356b253a 100644 --- a/mods/ITEMS/mcl_bamboo/globals.lua +++ b/mods/ITEMS/mcl_bamboo/globals.lua @@ -56,6 +56,8 @@ function mcl_bamboo.is_protected(pos, placer) return false end +local BAMBOO_ENDCAP_NAME = "mcl_bamboo:bamboo_endcap" + function mcl_bamboo.grow_bamboo(pos, bonemeal_applied) local node_above = minetest.get_node(vector.offset(pos, 0, 1, 0)) mcl_bamboo.mcl_log("Grow bamboo called; bonemeal: " .. tostring(bonemeal_applied)) @@ -133,14 +135,14 @@ function mcl_bamboo.grow_bamboo(pos, bonemeal_applied) chk_pos = vector.offset(pos, 0, py, 0) node_name = minetest.get_node(chk_pos).name dist = vector.distance(soil_pos, chk_pos) - if mcl_bamboo.is_bamboo(node_name) == false or node_name == "mcl_bamboo:bamboo_endcap" then + if mcl_bamboo.is_bamboo(node_name) == false or node_name == BAMBOO_ENDCAP_NAME then break end end mcl_bamboo.mcl_log("Grow bamboo; dist: " .. dist) - if node_name == "mcl_bamboo:bamboo_endcap" then + if node_name == BAMBOO_ENDCAP_NAME then -- prevent overgrowth return false end @@ -151,7 +153,7 @@ function mcl_bamboo.grow_bamboo(pos, bonemeal_applied) -- equals top of the stalk before the cap if node_name == "air" then mcl_bamboo.mcl_log("Grow bamboo; Placing endcap") - minetest.set_node(vector.offset(chk_pos, 0, 1, 0), {name = "mcl_bamboo:bamboo_endcap"}) + minetest.set_node(vector.offset(chk_pos, 0, 1, 0), {name = BAMBOO_ENDCAP_NAME}) return true -- returning true means use up the bonemeal. else return false @@ -195,7 +197,7 @@ function mcl_bamboo.grow_bamboo(pos, bonemeal_applied) if node_name == "air" then if height - 1 == dist then mcl_bamboo.mcl_log("Grow bamboo; Placing endcap") - minetest.set_node(chk_pos, {name = "mcl_bamboo:bamboo_endcap"}) + minetest.set_node(chk_pos, {name = BAMBOO_ENDCAP_NAME}) end end break diff --git a/mods/ITEMS/mcl_bamboo/init.lua b/mods/ITEMS/mcl_bamboo/init.lua index c180dc6ec..34485768b 100644 --- a/mods/ITEMS/mcl_bamboo/init.lua +++ b/mods/ITEMS/mcl_bamboo/init.lua @@ -7,7 +7,9 @@ -- LOCALS local modname = minetest.get_current_modname() -local bamboo = "mcl_bamboo:bamboo" +-- Used everywhere. Often this is just the name, but it makes sense to me as BAMBOO, because that's how I think of it... +-- "BAMBOO" goes here. +local BAMBOO = "mcl_bamboo:bamboo" mcl_bamboo = {} @@ -24,7 +26,7 @@ dofile(minetest.get_modpath(modname) .. "/recipes.lua") --ABMs minetest.register_abm({ - nodenames = {bamboo, bamboo .. "_1", bamboo .. "_2", bamboo .. "_3"}, + nodenames = mcl_bamboo.bamboo_index, interval = 31.5, chance = 40, action = function(pos, _) @@ -33,26 +35,31 @@ minetest.register_abm({ }) -- Base Aliases. +local SCAFFOLDING_NAME = "mcl_bamboo:scaffolding" minetest.register_alias("bamboo_block", "mcl_bamboo:bamboo_block") minetest.register_alias("bamboo_strippedblock", "mcl_bamboo:bamboo_block_stripped") -minetest.register_alias("bamboo", "mcl_bamboo:bamboo") +minetest.register_alias("bamboo", BAMBOO) minetest.register_alias("bamboo_plank", "mcl_bamboo:bamboo_plank") minetest.register_alias("bamboo_mosaic", "mcl_bamboo:bamboo_mosaic") minetest.register_alias("mcl_stairs:stair_bamboo", "mcl_stairs:stair_bamboo_block") -minetest.register_alias("bamboo:bamboo", "mcl_bamboo:bamboo") -minetest.register_alias("scaffold", "mcl_bamboo:scaffolding") -minetest.register_alias("mcl_scaffolding:scaffolding", "mcl_bamboo:scaffolding") -minetest.register_alias("mcl_scaffolding:scaffolding_horizontal", "mcl_bamboo:scaffolding") +minetest.register_alias("bamboo_stairs", "mcl_stairs:stair_bamboo_block") +minetest.register_alias("bamboo:bamboo", BAMBOO) +minetest.register_alias("scaffold", SCAFFOLDING_NAME) +minetest.register_alias("mcl_scaffolding:scaffolding", SCAFFOLDING_NAME) +minetest.register_alias("mcl_scaffolding:scaffolding_horizontal", SCAFFOLDING_NAME) + +minetest.register_alias("bamboo_fence", "mcl_fences:bamboo_fence") +minetest.register_alias("bamboo_fence_gate", "mcl_fences:bamboo_fence_gate") --[[ -todo -- make scaffolds do side scaffold blocks, so that they jut out. +todo -- make scaffolds do side scaffold blocks, so that they jut out. (Shelved.) todo -- Also, make those blocks collapse (break) when a nearby connected scaffold breaks. waiting on specific things: todo -- Raft -- need model todo -- Raft with Chest. same. -todo -- handle bonemeal... +todo -- handle bonemeal... (shelved until after redoing the bonemeal api). ----------------------------------------------------------- todo -- Add in Extras. -- Moved to Official Mod Pack. diff --git a/mods/ITEMS/mcl_bamboo/recipes.lua b/mods/ITEMS/mcl_bamboo/recipes.lua index 9566fc9b8..489b24259 100644 --- a/mods/ITEMS/mcl_bamboo/recipes.lua +++ b/mods/ITEMS/mcl_bamboo/recipes.lua @@ -4,43 +4,45 @@ --- DateTime: 12/29/22 12:46 PM -- Restructure Date --- These are all of the fuel recipes and all of the crafting recipes, consolidated into one place. -local bamboo = "mcl_bamboo:bamboo" -local bamboo_plank = bamboo .. "_plank" +-- Used everywhere. Often this is just the name, but it makes sense to me as BAMBOO, because that's how I think of it... +-- "BAMBOO" goes here. +local BAMBOO = "mcl_bamboo:bamboo" +local BAMBOO_PLANK = BAMBOO .. "_plank" -- Craftings -- Basic Bamboo craftings minetest.register_craft({ output = "mcl_core:stick", recipe = { - {bamboo}, - {bamboo}, + {BAMBOO}, + {BAMBOO}, } }) minetest.register_craft({ - output = bamboo .. "_block", + output = BAMBOO .. "_block", recipe = { - {bamboo, bamboo, bamboo}, - {bamboo, bamboo, bamboo}, - {bamboo, bamboo, bamboo}, + {BAMBOO, BAMBOO, BAMBOO}, + {BAMBOO, BAMBOO, BAMBOO}, + {BAMBOO, BAMBOO, BAMBOO}, } }) minetest.register_craft({ - output = bamboo_plank .. " 2", + output = BAMBOO_PLANK .. " 2", recipe = { - {bamboo .. "_block"}, + {BAMBOO .. "_block"}, } }) minetest.register_craft({ - output = bamboo_plank .. " 2", + output = BAMBOO_PLANK .. " 2", recipe = { - {bamboo .. "_block_stripped"}, + {BAMBOO .. "_block_stripped"}, } }) minetest.register_craft({ - output = bamboo .. "_mosaic", + output = BAMBOO .. "_mosaic", recipe = { {"mcl_stair:slab_bamboo_plank"}, {"mcl_stair:slab_bamboo_plank"}, @@ -49,62 +51,76 @@ minetest.register_craft({ -- Bamboo specific items -if minetest.get_modpath("mcl_doors") then - if mcl_doors then - minetest.register_craft({ - output = "mcl_bamboo:bamboo_door 3", - recipe = { - {bamboo_plank, bamboo_plank}, - {bamboo_plank, bamboo_plank}, - {bamboo_plank, bamboo_plank} - } - }) - minetest.register_craft({ - output = "mcl_bamboo:bamboo_trapdoor 2", - recipe = { - {bamboo_plank, bamboo_plank, bamboo_plank}, - {bamboo_plank, bamboo_plank, bamboo_plank}, - } - }) - end +if minetest.get_modpath("mcl_doors") and mcl_doors then + minetest.register_craft({ + output = "mcl_bamboo:bamboo_door 3", + recipe = { + {BAMBOO_PLANK, BAMBOO_PLANK}, + {BAMBOO_PLANK, BAMBOO_PLANK}, + {BAMBOO_PLANK, BAMBOO_PLANK} + } + }) + minetest.register_craft({ + output = "mcl_bamboo:bamboo_trapdoor 2", + recipe = { + {BAMBOO_PLANK, BAMBOO_PLANK, BAMBOO_PLANK}, + {BAMBOO_PLANK, BAMBOO_PLANK, BAMBOO_PLANK}, + } + }) +end +if minetest.get_modpath("mcl_fences") then + minetest.register_craft({ + output = "mcl_bamboo:bamboo_fence 3", + recipe = { + {BAMBOO_PLANK, "mcl_core:stick", BAMBOO_PLANK}, + {BAMBOO_PLANK, "mcl_core:stick", BAMBOO_PLANK}, + } + }) + minetest.register_craft({ + output = "mcl_bamboo:bamboo_fence_gate", + recipe = { + {"mcl_core:stick", BAMBOO_PLANK, "mcl_core:stick"}, + {"mcl_core:stick", BAMBOO_PLANK, "mcl_core:stick"}, + } + }) end minetest.register_craft({ output = "mcl_bamboo:scaffolding 6", - recipe = {{bamboo, "mcl_mobitems:string", bamboo}, - {bamboo, "", bamboo}, - {bamboo, "", bamboo}} + recipe = {{BAMBOO, "mcl_mobitems:string", BAMBOO}, + {BAMBOO, "", BAMBOO}, + {BAMBOO, "", BAMBOO}} }) -- Fuels -- Basic Bamboo nodes minetest.register_craft({ type = "fuel", - recipe = bamboo, + recipe = BAMBOO, burntime = 2.5, -- supposed to be 1/2 that of a stick, per minecraft wiki as of JE 1.19.3 }) minetest.register_craft({ type = "fuel", - recipe = bamboo .. "_block", + recipe = BAMBOO .. "_block", burntime = 15, }) minetest.register_craft({ type = "fuel", - recipe = bamboo .. "_block_stripped", + recipe = BAMBOO .. "_block_stripped", burntime = 15, }) minetest.register_craft({ type = "fuel", - recipe = bamboo_plank, + recipe = BAMBOO_PLANK, burntime = 7.5, }) minetest.register_craft({ type = "fuel", - recipe = bamboo .. "_mosaic", + recipe = BAMBOO .. "_mosaic", burntime = 7.5, }) From f92ea77849d07db5ff7bbfe596cb5d6c605a733e Mon Sep 17 00:00:00 2001 From: Michieal Date: Fri, 6 Jan 2023 17:41:01 -0500 Subject: [PATCH 046/105] Mega commit. lol. Did a LOT of refactoring. Cleaned up some vestigial code. Cleaned up aliases. --- mods/ITEMS/mcl_bamboo/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_bamboo/init.lua b/mods/ITEMS/mcl_bamboo/init.lua index 34485768b..b0b33c502 100644 --- a/mods/ITEMS/mcl_bamboo/init.lua +++ b/mods/ITEMS/mcl_bamboo/init.lua @@ -59,7 +59,7 @@ todo -- Also, make those blocks collapse (break) when a nearby connected scaffol waiting on specific things: todo -- Raft -- need model todo -- Raft with Chest. same. -todo -- handle bonemeal... (shelved until after redoing the bonemeal api). +todo -- handle bonemeal... (shelved until after redoing the bonemeal api)... ----------------------------------------------------------- todo -- Add in Extras. -- Moved to Official Mod Pack. From ede21a86270bee2dfebeb0e3790d6da9581bbc44 Mon Sep 17 00:00:00 2001 From: Michieal Date: Fri, 6 Jan 2023 22:43:41 +0000 Subject: [PATCH 047/105] revert f92ea77849d07db5ff7bbfe596cb5d6c605a733e revert accidental second commit. Mega commit. lol. Did a LOT of refactoring. Cleaned up some vestigial code. Cleaned up aliases. --- mods/ITEMS/mcl_bamboo/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_bamboo/init.lua b/mods/ITEMS/mcl_bamboo/init.lua index b0b33c502..34485768b 100644 --- a/mods/ITEMS/mcl_bamboo/init.lua +++ b/mods/ITEMS/mcl_bamboo/init.lua @@ -59,7 +59,7 @@ todo -- Also, make those blocks collapse (break) when a nearby connected scaffol waiting on specific things: todo -- Raft -- need model todo -- Raft with Chest. same. -todo -- handle bonemeal... (shelved until after redoing the bonemeal api)... +todo -- handle bonemeal... (shelved until after redoing the bonemeal api). ----------------------------------------------------------- todo -- Add in Extras. -- Moved to Official Mod Pack. From 132178b8c7f6c9d69f4726bfc46d3dcb95781c36 Mon Sep 17 00:00:00 2001 From: Michieal Date: Fri, 6 Jan 2023 17:46:54 -0500 Subject: [PATCH 048/105] clear up comment confusion. --- mods/ITEMS/mcl_bamboo/bamboo_items.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/bamboo_items.lua b/mods/ITEMS/mcl_bamboo/bamboo_items.lua index efe92d7d9..6feedaf9f 100644 --- a/mods/ITEMS/mcl_bamboo/bamboo_items.lua +++ b/mods/ITEMS/mcl_bamboo/bamboo_items.lua @@ -305,7 +305,7 @@ minetest.register_node(SCAFFOLDING_NAME, { -- Need to add in a check here... to prevent placing scaffolds against doors, chests, etc. -- Added in a quick check. need to test it. if node.name ~= SCAFFOLDING_NAME then - -- this is a temp fix... will NOT work in final scaffolding implementation. + -- Start temp fix: This is a temp fix... will NOT work in final scaffolding implementation. -- Use pointed node's on_rightclick function first, if present if placer and not placer:get_player_control().sneak then if minetest.registered_nodes[node.name] and minetest.registered_nodes[node.name].on_rightclick then @@ -313,7 +313,7 @@ minetest.register_node(SCAFFOLDING_NAME, { return minetest.registered_nodes[node.name].on_rightclick(pointed.under, node, placer, itemstack) or itemstack end end - -- -------- + -- End: Temp fix -- A quick check, that may or may not work, to attempt to prevent placing things on the side of other nodes. local dir = vector.subtract(pointed.under, pointed.above) From 3074c15d14ec98e4210213db8f4dd900d939d043 Mon Sep 17 00:00:00 2001 From: Michieal Date: Fri, 6 Jan 2023 18:07:30 -0500 Subject: [PATCH 049/105] clear up comment confusion. Factored out hard coded names for variable names. removed "minecraft" from README.md. --- mods/ITEMS/mcl_bamboo/README.md | 2 +- mods/ITEMS/mcl_bamboo/bamboo_base.lua | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/README.md b/mods/ITEMS/mcl_bamboo/README.md index 733ec6ce2..f2ad95afd 100644 --- a/mods/ITEMS/mcl_bamboo/README.md +++ b/mods/ITEMS/mcl_bamboo/README.md @@ -1,7 +1,7 @@ mcl_bamboo ========= -This mod adds minecraft-like bamboo nodes to your Mineclone 2 world. +This mod adds working, familiar bamboo nodes to your Mineclone 2 world. Code: Michieal. Original (basic) bamboo code by: Small Joker. diff --git a/mods/ITEMS/mcl_bamboo/bamboo_base.lua b/mods/ITEMS/mcl_bamboo/bamboo_base.lua index ee82b55dd..785261a53 100644 --- a/mods/ITEMS/mcl_bamboo/bamboo_base.lua +++ b/mods/ITEMS/mcl_bamboo/bamboo_base.lua @@ -10,6 +10,7 @@ local DOUBLE_DROP_CHANCE = 8 -- "BAMBOO" goes here. local BAMBOO = "mcl_bamboo:bamboo" local BAMBOO_ENDCAP_NAME = "mcl_bamboo:bamboo_endcap" +local BAMBOO_PLANK = BAMBOO .. "_plank" -- LOCALS local modname = minetest.get_current_modname() @@ -33,7 +34,8 @@ local bamboo_def = { drop = { max_items = 1, - -- Maximum number of item lists to drop. + -- From the API: + -- max_items: Maximum number of item lists to drop. -- The entries in 'items' are processed in order. For each: -- Item filtering is applied, chance of drop is applied, if both are -- successful the entire item list is dropped. @@ -43,13 +45,13 @@ local bamboo_def = { items = { -- Examples: { - -- 1 in 100 chance of dropping. + -- 1 in DOUBLE_DROP_CHANCE chance of dropping. -- Default rarity is '1'. rarity = DOUBLE_DROP_CHANCE, items = {BAMBOO .. " 2"}, }, { - -- 1 in 2 chance of dropping. + -- 1 in 1 chance of dropping. (Note: this means that it will drop 100% of the time.) -- Default rarity is '1'. rarity = 1, items = {BAMBOO}, @@ -244,7 +246,7 @@ minetest.register_node("mcl_bamboo:bamboo_plank", { -- Bamboo Part 2 Base nodes. -- Bamboo Mosaic -local bamboo_mosaic = table.copy(minetest.registered_nodes[BAMBOO .. "_plank"]) +local bamboo_mosaic = table.copy(minetest.registered_nodes[BAMBOO_PLANK]) bamboo_mosaic.tiles = {"mcl_bamboo_bamboo_plank.png"} bamboo_mosaic.groups = {handy = 1, axey = 1, flammable = 3, fire_encouragement = 5, fire_flammability = 20} bamboo_mosaic.description = S("Bamboo Mosaic Plank") From c65bbcd5a55b40b92380d9db34f1f5463c1f099d Mon Sep 17 00:00:00 2001 From: Michieal Date: Sat, 7 Jan 2023 16:14:33 -0500 Subject: [PATCH 050/105] fixed missed spot for licensing. --- mods/ITEMS/mcl_bamboo/init.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/init.lua b/mods/ITEMS/mcl_bamboo/init.lua index 34485768b..9209acf51 100644 --- a/mods/ITEMS/mcl_bamboo/init.lua +++ b/mods/ITEMS/mcl_bamboo/init.lua @@ -2,8 +2,7 @@ -- Parts of mcl_scaffolding were used. Mcl_scaffolding originally created by Cora; Fixed and heavily reworked -- for mcl_bamboo by Michieal. -- Creation date: 12-01-2022 (Dec 1st, 2022) --- License for everything: CC-BY-SA 4.0 --- Bamboo max height: 12-16 +-- License for Media: CC-BY-SA 4.0; Code: GPLv3 -- LOCALS local modname = minetest.get_current_modname() From d5dda679ebdf5be2b6f763eb991c7421d2bade21 Mon Sep 17 00:00:00 2001 From: Michieal Date: Sat, 7 Jan 2023 16:45:36 -0500 Subject: [PATCH 051/105] fix vestigial variable names to not be so obtuse. --- mods/ITEMS/mcl_bamboo/bamboo_items.lua | 42 +++++++++++++------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/bamboo_items.lua b/mods/ITEMS/mcl_bamboo/bamboo_items.lua index 6feedaf9f..7b891cbcc 100644 --- a/mods/ITEMS/mcl_bamboo/bamboo_items.lua +++ b/mods/ITEMS/mcl_bamboo/bamboo_items.lua @@ -291,10 +291,10 @@ minetest.register_node(SCAFFOLDING_NAME, { local node = minetest.get_node(pointed.under) local pos = pointed.under local h = 0 - local cnb = node -- Current Base Node. - local bn = minetest.get_node(vector.offset(pos, 0, -1, 0)) -- current node below the cnb. + local current_base_node = node -- Current Base Node. + local below_node = minetest.get_node(vector.offset(pos, 0, -1, 0)) -- current node below the current_base_node. - mcl_bamboo.mcl_log("Below Node: " .. bn.name) + mcl_bamboo.mcl_log("Below Node: " .. below_node.name) -- check protected placement. if mcl_bamboo.is_protected(pos, placer) then @@ -332,18 +332,18 @@ minetest.register_node(SCAFFOLDING_NAME, { --build up when placing on existing scaffold --[[ Quick explanation. scaffolding should be placed at the ground level ONLY. To do this, we look at a few - different nodes. Current node (cn) is the top node being placed - make sure that it is air / unoccupied. - BN (below node) is the node below the bottom node; Used to check to see if we are up in the air putting - more scaffolds on the top.. CNB (Current Base Node) is the targeted node for placement; we can only place + different nodes. Current node (current_node) is the top node being placed - make sure that it is air / unoccupied. + below_node (below node) is the node below the bottom node; Used to check to see if we are up in the air putting + more scaffolds on the top.. current_base_node (Current Base Node) is the targeted node for placement; we can only place scaffolding on this one, to stack them up in the air. --]] repeat -- loop through, allowing placement. pos = vector.offset(pos, 0, 1, 0) -- cleaned up vector. - local cn = minetest.get_node(pos) -- current node. - if cn.name == "air" then + local current_node = minetest.get_node(pos) -- current node. + if current_node.name == "air" then -- first step to making scaffolding work like scaffolding should. -- Prevent running up, and putting down new scaffolding - if cnb.name == SCAFFOLDING_NAME and bn == SCAFFOLDING_NAME and SIDE_SCAFFOLDING == false then + if current_base_node.name == SCAFFOLDING_NAME and below_node == SCAFFOLDING_NAME and SIDE_SCAFFOLDING == false then return itemstack end @@ -362,7 +362,7 @@ minetest.register_node(SCAFFOLDING_NAME, { return itemstack -- finally, return the itemstack to finish on_place. end h = h + 1 - until cn.name ~= node.name or itemstack:get_count() == 0 or h >= 128 -- loop check. + until current_node.name ~= node.name or itemstack:get_count() == 0 or h >= 128 -- loop check. end, on_destruct = function(pos) -- Node destructor; called before removing node. @@ -455,12 +455,12 @@ minetest.register_node(SCAFFOLDING_NAME, { --build up when placing on existing scaffold repeat pos.y = pos.y + 1 - local cn = minetest.get_node(pos) - local cnb = node - local bn = down_two - if cn.name == "air" then + local current_node = minetest.get_node(pos) + local current_base_node = node + local below_node = down_two + if current_node.name == "air" then -- first step to making scaffolding work like Minecraft scaffolding. - if cnb.name == SCAFFOLDING_NAME and bn == SCAFFOLDING_NAME and SIDE_SCAFFOLDING == false then + if current_base_node.name == SCAFFOLDING_NAME and below_node == SCAFFOLDING_NAME and SIDE_SCAFFOLDING == false then return itemstack end @@ -476,7 +476,7 @@ minetest.register_node(SCAFFOLDING_NAME, { return itemstack end h = h + 1 - until cn.name ~= node.name or itemstack:get_count() == 0 or h >= 128 + until current_node.name ~= node.name or itemstack:get_count() == 0 or h >= 128 -- Commenting out untested code, for commit. if SIDE_SCAFFOLDING == true then @@ -493,9 +493,9 @@ minetest.register_node(SCAFFOLDING_NAME, { local ctrl = placer:get_player_control() if ctrl and ctrl.sneak then if node.name == SCAFFOLDING_NAME or node.name == SIDE_SCAFFOLD_NAME then - local pp2 = h + local param_2 = h - local np2 = pp2 + 1 + local node_param2 = param_2 + 1 fdir = fdir + 1 -- convert fdir to a base of one. local target_offset = adj_nodes[fdir] @@ -507,9 +507,9 @@ minetest.register_node(SCAFFOLDING_NAME, { itemstack:take_item(1) if minetest.get_node(new_pos).name == "air" then - minetest.set_node(new_pos, {name = SIDE_SCAFFOLD_NAME, param2 = np2}) - if np2 >= 6 then - np2 = 6 + minetest.set_node(new_pos, {name = SIDE_SCAFFOLD_NAME, param2 = node_param2}) + if node_param2 >= 6 then + node_param2 = 6 minetest.minetest.dig_node(new_pos) end end From 34faca3f2c78e02ddaa411d724df579938c092c9 Mon Sep 17 00:00:00 2001 From: Michieal Date: Sun, 8 Jan 2023 23:08:12 -0500 Subject: [PATCH 052/105] Added in License.txt Made the end cap node wave in the wind. --- mods/ITEMS/mcl_bamboo/License.txt | 226 +++++++++++++++++++++++++ mods/ITEMS/mcl_bamboo/bamboo_base.lua | 4 +- mods/ITEMS/mcl_bamboo/bamboo_items.lua | 2 +- mods/ITEMS/mcl_bamboo/globals.lua | 2 +- mods/ITEMS/mcl_bamboo/init.lua | 1 + mods/ITEMS/mcl_bamboo/recipes.lua | 1 + 6 files changed, 232 insertions(+), 4 deletions(-) create mode 100644 mods/ITEMS/mcl_bamboo/License.txt diff --git a/mods/ITEMS/mcl_bamboo/License.txt b/mods/ITEMS/mcl_bamboo/License.txt new file mode 100644 index 000000000..36caec951 --- /dev/null +++ b/mods/ITEMS/mcl_bamboo/License.txt @@ -0,0 +1,226 @@ + +GNU GENERAL PUBLIC LICENSE + +Version 3, 29 June 2007 + +Copyright © 2007 Free Software Foundation, Inc. + +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. +Preamble + +The GNU General Public License is a free, copyleft license for software and other kinds of works. + +The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. + +To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. + +For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. + +Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. + +For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. + +Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. + +Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. + +The precise terms and conditions for copying, distribution and modification follow. +TERMS AND CONDITIONS +0. Definitions. + +“This License” refers to version 3 of the GNU General Public License. + +“Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. + +“The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations. + +To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work. + +A “covered work” means either the unmodified Program or a work based on the Program. + +To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. + +To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. + +An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. +1. Source Code. + +The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work. + +A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. + +The “System Libraries” of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. + +The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. + +The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. + +The Corresponding Source for a work in source code form is that same work. +2. Basic Permissions. + +All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. + +You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. + +Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. +3. Protecting Users' Legal Rights From Anti-Circumvention Law. + +No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. + +When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. +4. Conveying Verbatim Copies. + +You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. + +You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. +5. Conveying Modified Source Versions. + +You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified it, and giving a relevant date. + b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to “keep intact all notices”. + c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. + d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. + +A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. +6. Conveying Non-Source Forms. + +You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: + + a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. + b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. + c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. + d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. + e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. + +A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. + +A “User Product” is either (1) a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. + +“Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. + +If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). + +The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. + +Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. +7. Additional Terms. + +“Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. + +When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. + +Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or + b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or + c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or + d) Limiting the use for publicity purposes of names of licensors or authors of the material; or + e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or + f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. + +All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. + +If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. + +Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. +8. Termination. + +You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). + +However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. + +Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. + +Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. +9. Acceptance Not Required for Having Copies. + +You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. +10. Automatic Licensing of Downstream Recipients. + +Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. + +An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. + +You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. +11. Patents. + +A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”. + +A contributor's “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. + +Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. + +In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. + +If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. + +If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. + +A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. + +Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. +12. No Surrender of Others' Freedom. + +If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. +13. Use with the GNU Affero General Public License. + +Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. +14. Revised Versions of this License. + +The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. + +If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. + +Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. +15. Disclaimer of Warranty. + +THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. +16. Limitation of Liability. + +IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. +17. Interpretation of Sections 15 and 16. + +If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. + +END OF TERMS AND CONDITIONS +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + +If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an “about box”. + +You should also get your employer (if you work as a programmer) or school, if any, to sign a “copyright disclaimer” for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . + +The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . diff --git a/mods/ITEMS/mcl_bamboo/bamboo_base.lua b/mods/ITEMS/mcl_bamboo/bamboo_base.lua index 785261a53..428981bb1 100644 --- a/mods/ITEMS/mcl_bamboo/bamboo_base.lua +++ b/mods/ITEMS/mcl_bamboo/bamboo_base.lua @@ -2,7 +2,7 @@ --- Generated by EmmyLua(https://github.com/EmmyLua) --- Created by michieal. --- DateTime: 12/29/22 12:33 PM -- Restructure Date ---- +--- Copyright (C) 2022 - 2023, Michieal. See License.txt -- CONSTS local DOUBLE_DROP_CHANCE = 8 @@ -178,7 +178,7 @@ bamboo_top.tiles = {"mcl_bamboo_endcap.png"} bamboo_top.drawtype = "plantlike_rooted" --"plantlike" --bamboo_top.paramtype2 = "meshoptions" --bamboo_top.param2 = 2 - +bamboo_top.waving = 2 bamboo_top.special_tiles = {{name = "mcl_bamboo_endcap.png"}} bamboo_top.nodebox = nil bamboo_top.selection_box = nil diff --git a/mods/ITEMS/mcl_bamboo/bamboo_items.lua b/mods/ITEMS/mcl_bamboo/bamboo_items.lua index 7b891cbcc..31489292f 100644 --- a/mods/ITEMS/mcl_bamboo/bamboo_items.lua +++ b/mods/ITEMS/mcl_bamboo/bamboo_items.lua @@ -2,7 +2,7 @@ --- Generated by EmmyLua(https://github.com/EmmyLua) --- Created by michieal. --- DateTime: 12/29/22 12:38 PM -- Restructure Date ---- +--- Copyright (C) 2022 - 2023, Michieal. See License.txt -- CONSTS -- Due to door fix #2736, doors are displayed backwards. When this is fixed, set this variable to false. diff --git a/mods/ITEMS/mcl_bamboo/globals.lua b/mods/ITEMS/mcl_bamboo/globals.lua index 6356b253a..14f9472ad 100644 --- a/mods/ITEMS/mcl_bamboo/globals.lua +++ b/mods/ITEMS/mcl_bamboo/globals.lua @@ -2,7 +2,7 @@ --- Generated by EmmyLua(https://github.com/EmmyLua) --- Created by michieal. --- DateTime: 12/29/22 12:34 PM -- Restructure Date ---- +--- Copyright (C) 2022 - 2023, Michieal. See License.txt local DEBUG = false diff --git a/mods/ITEMS/mcl_bamboo/init.lua b/mods/ITEMS/mcl_bamboo/init.lua index 9209acf51..44499a6e1 100644 --- a/mods/ITEMS/mcl_bamboo/init.lua +++ b/mods/ITEMS/mcl_bamboo/init.lua @@ -3,6 +3,7 @@ -- for mcl_bamboo by Michieal. -- Creation date: 12-01-2022 (Dec 1st, 2022) -- License for Media: CC-BY-SA 4.0; Code: GPLv3 +-- Copyright (C) 2022 - 2023, Michieal. See License.txt -- LOCALS local modname = minetest.get_current_modname() diff --git a/mods/ITEMS/mcl_bamboo/recipes.lua b/mods/ITEMS/mcl_bamboo/recipes.lua index 489b24259..d5c48d68e 100644 --- a/mods/ITEMS/mcl_bamboo/recipes.lua +++ b/mods/ITEMS/mcl_bamboo/recipes.lua @@ -3,6 +3,7 @@ --- Created by michieal. --- DateTime: 12/29/22 12:46 PM -- Restructure Date --- These are all of the fuel recipes and all of the crafting recipes, consolidated into one place. +--- Copyright (C) 2022 - 2023, Michieal. See License.txt -- Used everywhere. Often this is just the name, but it makes sense to me as BAMBOO, because that's how I think of it... -- "BAMBOO" goes here. From 8df0b2a48ecd9ebdac47908aee788ea213139367 Mon Sep 17 00:00:00 2001 From: Michieal Date: Mon, 9 Jan 2023 16:31:02 -0500 Subject: [PATCH 053/105] Made changes to the MapGen definitions because with the new grow code, bamboo creates its own height, and therefore places its own top. And, having multiple tops looks funny. --- mods/MAPGEN/mcl_biomes/init.lua | 83 +++++++++------------------------ 1 file changed, 23 insertions(+), 60 deletions(-) diff --git a/mods/MAPGEN/mcl_biomes/init.lua b/mods/MAPGEN/mcl_biomes/init.lua index 8590a56a6..14725c59d 100644 --- a/mods/MAPGEN/mcl_biomes/init.lua +++ b/mods/MAPGEN/mcl_biomes/init.lua @@ -4458,8 +4458,8 @@ local function register_decorations() end end - register_double_fern(0.01, 0.03, {"Jungle", "JungleM", "JungleEdge", "JungleEdgeM", "Taiga", "ColdTaiga", "MegaTaiga", "MegaSpruceTaiga", "BambooJungle", "BambooJungleM", "BambooJungleEdge", "BambooJungleEdgeM",}) - register_double_fern(0.15, 0.1, {"JungleM"}) + register_double_fern(0.01, 0.03, {"Jungle", "JungleM", "JungleEdge", "JungleEdgeM", "Taiga", "ColdTaiga", "MegaTaiga", "MegaSpruceTaiga", "BambooJungle", "BambooJungleM", "BambooJungleEdge", "BambooJungleEdgeM", }) + register_double_fern(0.15, 0.1, {"JungleM", "BambooJungleM"}) -- Large flowers local function register_large_flower(name, biomes, seed, offset, flower_forest_offset) @@ -4591,15 +4591,15 @@ local function register_decorations() -- Bamboo minetest.register_decoration({ deco_type = "simple", - place_on = {"group:grass_block_no_snow", "mcl_core:dirt",}, + place_on = {"group:grass_block_no_snow", "mcl_core:dirt", }, sidelen = 80, fill_ratio = 0.0043, biomes = {"Jungle", "JungleM", "JungleEdge", "JungleEdgeM"}, y_min = 1, y_max = mcl_vars.mg_overworld_max, decoration = "mcl_bamboo:bamboo", - height = 12, - max_height = 15, + height = 9, + max_height = 11, flags = "place_center_x, place_center_z", rotation = "random", }) @@ -4613,45 +4613,27 @@ local function register_decorations() y_min = 1, y_max = mcl_vars.mg_overworld_max, decoration = "mcl_bamboo:bamboo", - height = 12, - max_height = 15, + height = 9, + max_height = 12, flags = "place_center_x, place_center_z", rotation = "random", }) - - minetest.register_decoration({ - deco_type = "simple", - place_on = {"mcl_bamboo:bamboo"}, - sidelen = 80, - fill_ratio = 1, - biomes = {"BambooJungle", "BambooJungleM", "BambooJungleEdge", "BambooJungleEdgeM", "Jungle", "JungleM", "JungleEdge", "JungleEdgeM"}, - y_min = 1, - y_max = mcl_vars.mg_overworld_max, - decoration = "mcl_bamboo:bamboo_endcap", - height = 1, - max_height = 4, - flags = "all_floors", - }) - - minetest.register_decoration({ - deco_type = "simple", - place_on = {"group:grass_block_no_snow"}, - sidelen = 16, - noise_params = { - offset = 0, - scale = 0.012, - spread = {x = 100, y = 100, z = 100}, - seed = 354, - octaves = 1, - persist = 0.5, - lacunarity = 1.0, - flags = "absvalue" - }, - biomes = {"BambooJungle", "BambooJungleM"}, - y_max = mcl_vars.mg_overworld_max, - y_min = 2, - decoration = "mcl_core:podzol" - }) + --[[ + -- commenting out this section because with the new grow code, bamboo creates its own height, and therefore places it's own top. + minetest.register_decoration({ + deco_type = "simple", + place_on = {"mcl_bamboo:bamboo"}, + sidelen = 80, + fill_ratio = 1, + biomes = {"BambooJungle", "BambooJungleM", "BambooJungleEdge", "BambooJungleEdgeM", "Jungle", "JungleM", "JungleEdge", "JungleEdgeM"}, + y_min = 1, + y_max = mcl_vars.mg_overworld_max, + decoration = "mcl_bamboo:bamboo_endcap", + height = 1, + max_height = 4, + flags = "all_floors", + }) + ]] minetest.register_decoration({ deco_type = "simple", @@ -4673,25 +4655,6 @@ local function register_decorations() decoration = "mcl_flowers:tallgrass" }) - minetest.register_decoration({ - deco_type = "simple", - place_on = {"group:grass_block_no_snow"}, - sidelen = 16, - noise_params = { - offset = 0, - scale = 0.012, - spread = {x = 100, y = 100, z = 100}, - seed = 354, - octaves = 1, - persist = 0.5, - lacunarity = 1.0, - flags = "absvalue" - }, - biomes = {"BambooJungle", "BambooJungleM", "BambooJungleEdge"}, - y_max = mcl_vars.mg_overworld_max, - y_min = 2, - decoration = "mcl_mud:mud" - }) register_doubletall_grass(-0.0005, -0.3, {"BambooJungle", "BambooJungleM", "BambooJungleEdge"}) register_grass_decoration("tallgrass", -0.03, 1, {"BambooJungle", "BambooJungleM", "BambooJungleEdge"}) From 726eba7ed8b279a33157b85584be2554f9092496 Mon Sep 17 00:00:00 2001 From: Michieal Date: Tue, 10 Jan 2023 04:42:31 -0500 Subject: [PATCH 054/105] Make bamboo fence/gate less yellow. It's bamboo, not corn XD --- .../textures/mcl_bamboo_fence_bamboo.png | Bin 205 -> 205 bytes .../textures/mcl_bamboo_fence_gate_bamboo.png | Bin 206 -> 206 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_fence_bamboo.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_fence_bamboo.png index 2a0da61d18bca3520268308deb5c8a694b138c33..1988002757941b2c1ef58a378087491f3a72f917 100644 GIT binary patch delta 35 tcmV+;0Nnr00nGuBDH-RkS?alS@XMC*&z Date: Tue, 10 Jan 2023 15:36:17 -0500 Subject: [PATCH 055/105] Fix bamboo mosaic using wrong texture. Fix error. --- mods/ITEMS/mcl_bamboo/bamboo_base.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/bamboo_base.lua b/mods/ITEMS/mcl_bamboo/bamboo_base.lua index 428981bb1..ca15a8cb0 100644 --- a/mods/ITEMS/mcl_bamboo/bamboo_base.lua +++ b/mods/ITEMS/mcl_bamboo/bamboo_base.lua @@ -141,7 +141,7 @@ local bamboo_def = { else local placed_type = pr:next(1, 4) -- randomly choose which one to place. mcl_bamboo.mcl_log("Place_Bamboo_Shoot--Type: " .. placed_type) - place_item = mcl_bamboo.bamboo_index[placed_type] + place_item = ItemStack(mcl_bamboo.bamboo_index[placed_type]) end minetest.item_place(place_item, placer, pointed_thing, fdir) itemstack:take_item(1) @@ -247,7 +247,7 @@ minetest.register_node("mcl_bamboo:bamboo_plank", { -- Bamboo Part 2 Base nodes. -- Bamboo Mosaic local bamboo_mosaic = table.copy(minetest.registered_nodes[BAMBOO_PLANK]) -bamboo_mosaic.tiles = {"mcl_bamboo_bamboo_plank.png"} +bamboo_mosaic.tiles = {"mcl_bamboo_bamboo_plank_mosaic.png"} bamboo_mosaic.groups = {handy = 1, axey = 1, flammable = 3, fire_encouragement = 5, fire_flammability = 20} bamboo_mosaic.description = S("Bamboo Mosaic Plank") bamboo_mosaic._doc_items_longdesc = S("Bamboo Mosaic Plank") From 784f3ec226f59e939b3348d8250450879f6741b5 Mon Sep 17 00:00:00 2001 From: Michieal Date: Tue, 10 Jan 2023 16:40:18 -0500 Subject: [PATCH 056/105] Made plank textures more dried bamboo looking. --- .../textures/mcl_bamboo_bamboo_plank.png | Bin 427 -> 327 bytes .../textures/mcl_bamboo_bamboo_plank_mosaic.png | Bin 389 -> 357 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_bamboo_plank.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_bamboo_plank.png index cd19288f9aee17dc1a4dddb61f173bf6e2aa85f7..973a5819689e61fb39c9796cf85cb530896be05d 100644 GIT binary patch delta 311 zcmV-70m%NV1IGf88Gi-<001BJ|6u?C0S-w-K~y-)t&`141TheVze+MFp7k+yU(yE@ zy!i?u-b8kGlJbzBnO(&n)`pN7y6Nh!s_5j@J$6Syz}3MgKK61X5uD;ipF`hO~3Cs80BpC3T_6$f>9 zopErt2gO>5+jm~k6`{@%YSfy=*Q06*&A9zMyI*9MmoMcZX^Q{FlCfV@uaaD zrd_%ZcAL(s`T}eWW9RCPK8@nYU(7*rnd_JsA-o(=n82mtJA>k|u$lwAYH4|W`X1uv zx3K%#2TJRInJ~|45_st{vXSbKq1ZLagYALd5LO44&05P)?E_^ejmLwbpveFL002ov JPDHLkV1n#)j=2B; delta 412 zcmV;N0b~Bh0;>a%8Gix*005AYXf^-<0dh%1K~yNum6FSD+dvFO?XtCLqoJX3|EAY z)tArvIKOt=uYHeUdN!@$0W`9AKdH3TZr8n(oYWpuc@x}OW`9y^b5LtS9Bbgfl%@QfVuv+#ZoV+?BU9?5x#aZ^bul_Qmu zX&jS#K~qo2UGfP|JH7#o@LNX#!Yxa_Wa)Sc!B?Qa9^k77wLP4R2hmL~Vb=z=eNGeM zD}$*04*+!|gq0i#ggloV#U4t!I?Cdqa diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_bamboo_plank_mosaic.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_bamboo_plank_mosaic.png index f3ef80872295011164df35df0d686b7e708f4f90..b4020d3b31b7e4eef2fb03323732861f8aa8a0af 100644 GIT binary patch delta 341 zcmV-b0jmCm1LXpc8Gi-<001BJ|6u?C0W3*GK~y-)jgwDH12GWA-%Nt1w(GefYQ=Bt zXY(Rh{8P_uR}e}w;~}$?*)6mVgd`++dHKzReqWvyTF`<3B0vQIkh(`-Dce`1#T`JY z&ihZ~G{3EziR>`fUIl;x5Elb+ZNpp(GA@Ox-w03@CGzDAEq`{aHf3n&QxyTgv!w}g z6Da$4x6QL9r2h&6Kw8}USbn~Z0lTA|uAcxsR-3AALv-U$P;2%Cq6-X&?2Jsfi1+Mt z<0en5WhFpsE;K+K^1NRobq|i9?B0Bh=Qp) z!~n<00LaV$$jl7L&jHEG0LjfE$<6@D&IrlR2g=MA%FQ6k&J@ee0nE!6%*`0g&K%6o z8qLfZ&CL?c%@fVe8_mug&CVmu&j`)W5Y5jS&CeXp%nZ)W4}Z?j7|zfI&d?an(IC#z zE6>je&(Q#gK4VJ&006v6L_t&-S4GT8qJl6G1;EZjR1k51pmYWTb})wf-|w%!Zfj9= z0I=HwDJ80mIgqJ^T?+gV!KtqC1s!AAih!z9TTQp?C4_LSm_dZ{SOUm7my>flN)kg} z49l|MmeT$oY;HCN*APJIp+lDZep|+c8KjMY?K(g;3P3^6c~ Date: Tue, 10 Jan 2023 18:48:03 -0500 Subject: [PATCH 057/105] Fix placement of bamboo onto bamboo nodes going higher than max height. --- mods/ITEMS/mcl_bamboo/bamboo_base.lua | 50 +++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/mods/ITEMS/mcl_bamboo/bamboo_base.lua b/mods/ITEMS/mcl_bamboo/bamboo_base.lua index ca15a8cb0..5767285cf 100644 --- a/mods/ITEMS/mcl_bamboo/bamboo_base.lua +++ b/mods/ITEMS/mcl_bamboo/bamboo_base.lua @@ -143,6 +143,56 @@ local bamboo_def = { mcl_bamboo.mcl_log("Place_Bamboo_Shoot--Type: " .. placed_type) place_item = ItemStack(mcl_bamboo.bamboo_index[placed_type]) end + + -- height check for placing bamboo nodes. because... lmfao bamboo stalk to the sky. + -- variables used in more than one spot. + local first_shoot + local chk_pos + local soil_pos + local node_name = "" + local dist = 0 + local height = -1 + local BAMBOO_MAX_HEIGHT = 16 -- base height check. + + local BAMBOO_SOIL_DIST = BAMBOO_MAX_HEIGHT * -1 + -- ------------------- + for py = -1, BAMBOO_SOIL_DIST, -1 do + chk_pos = vector.offset(pos, 0, py, 0) + node_name = minetest.get_node(chk_pos).name + if mcl_bamboo.is_dirt(node_name) then + soil_pos = chk_pos + break + else + if mcl_bamboo.is_bamboo(node_name) == false then + break + end + end + end + -- requires knowing where the soil node is. + if soil_pos == nil then + return itemstack -- returning itemstack means don't place. + end + + first_shoot = vector.offset(soil_pos, 0, 1, 0) + local meta = minetest.get_meta(first_shoot) + + if meta then + height = meta:get_int("height", -1) + end + + dist = vector.distance(soil_pos, chk_pos) + + -- okay, so don't go beyond max height... + if dist > 15 and height == -1 then + -- height not found + return itemstack + end + + if dist + 1 > height - 1 then + -- height found. + return itemstack + end + minetest.item_place(place_item, placer, pointed_thing, fdir) itemstack:take_item(1) return itemstack, pointed_thing.under From c12f2cc565372015e536e70b30af8bd6e23543dc Mon Sep 17 00:00:00 2001 From: Michieal Date: Tue, 10 Jan 2023 19:23:40 -0500 Subject: [PATCH 058/105] Fix placement of bamboo endcap --- mods/ITEMS/mcl_bamboo/globals.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_bamboo/globals.lua b/mods/ITEMS/mcl_bamboo/globals.lua index 14f9472ad..822938f4c 100644 --- a/mods/ITEMS/mcl_bamboo/globals.lua +++ b/mods/ITEMS/mcl_bamboo/globals.lua @@ -194,7 +194,8 @@ function mcl_bamboo.grow_bamboo(pos, bonemeal_applied) -- stop growing check. ie, handle endcap placement. if dist >= height - 1 then - if node_name == "air" then + local above_node_name = minetest.get_node(vector.offset(chk_pos, 0, 1, 0)).name + if node_name == "air" and above_node_name == "air" then if height - 1 == dist then mcl_bamboo.mcl_log("Grow bamboo; Placing endcap") minetest.set_node(chk_pos, {name = BAMBOO_ENDCAP_NAME}) From aad2d114f96f79bb12e2a8611637424be8ade934 Mon Sep 17 00:00:00 2001 From: Michieal Date: Tue, 10 Jan 2023 20:49:38 -0500 Subject: [PATCH 059/105] temp commit. recolor of the planks and scaffolds. --- .../textures/mcl_bamboo_bamboo_plank.png | Bin 327 -> 277 bytes .../textures/mcl_bamboo_bamboo_plank_mosaic.png | Bin 357 -> 256 bytes .../textures/mcl_bamboo_scaffolding_bottom.png | Bin 205 -> 306 bytes .../textures/mcl_bamboo_scaffolding_top.png | Bin 244 -> 398 bytes 4 files changed, 0 insertions(+), 0 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_bamboo_plank.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_bamboo_plank.png index 973a5819689e61fb39c9796cf85cb530896be05d..a58f4f7d5503f73df52ca03f881434691ca6b37f 100644 GIT binary patch delta 260 zcmV+f0sH>P0+j-g8Gi!+001a04^sdD083CzR7Lg9f%VRU_0NO#&xH2Rh4#>e_Rxm* z(TVoaiuvKH`QfYi;;i}Nt@`4v`r@wo(dZ4JHi`SLeg9ylooT>rt5RHN{4CQ!f9=nab*tj>1;0000< KMNUMnLSTXu@s0lg delta 311 zcmV-70m%N90>=W78Gi-<001BJ|6u?C0S-w-K~y-)t&`141TheVze+MFp7k+yU(yE@ zy!i?u-b8kGlJbzBnO(&n)`pN7y6Nh!s_5j@J$6Syz}3MgKK61X5uD;ipF`hO~3Cs80BpC3T_6$f>9 zopErt2gO>5+jm~k6`{@%YSfy=*Q06*&A9zMyI*9MmoMcZX^Q{FlCfV@uaaD zrd_%ZcAL(s`T}eWW9RCPK8@nYU(7*rnd_JsA-o(=n82mtJA>k|u$lwAYH4|W`X1uv zx3K%#2TJRInJ~|45_st{vXSbKq1ZLagYALd5LO44&05P)?E_^ejmLwbpveFL002ov JPDHLkV1m$uj-mhn diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_bamboo_plank_mosaic.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_bamboo_plank_mosaic.png index b4020d3b31b7e4eef2fb03323732861f8aa8a0af..ea0f2d5658e675e53000fc27def27df706d8dfcd 100644 GIT binary patch delta 239 zcmV0)PUL8Gi!+001a04^sdD05(ueR7LmHkN4G)_tld3)|2dgNG5FiW&M}g`Wus^Ve;tv^s3E>s8vylJ*002ovPDHLkV1f-3dbj`p delta 341 zcmV-b0jmCh0_6gb8Gi-<001BJ|6u?C0W3*GK~y-)jgwDH12GWA-%Nt1w(GefYQ=Bt zXY(Rh{8P_uR}e}w;~}$?*)6mVgd`++dHKzReqWvyTF`<3B0vQIkh(`-Dce`1#T`JY z&ihZ~G{3EziR>`fUIl;x5Elb+ZNpp(GA@Ox-w03@CGzDAEq`{aHf3n&QxyTgv!w}g z6Da$4x6QL9r2h&6Kw8}USbn~Z0lTA|uAcxsR-3AALv-U$P;2%Cq6-X&?2Jsfi1+Mt z<0en5WhFpsE;K+K^1NRobq|i9?B0Bh=QpZo@DPJW8@fAOZvw&D5bo zzmXs15B)_S&{y;W-TH=(9g27fBBN3aiyai(HPFTOErdW)ngv zf!J>ov1qVG#6Ce$e=RGz5^77bba7hc#ZzcL0qa2N<5eUD3`eE>!@rb>{W!Xrh(j_} pT-wt0bjp1iPaIlwJ&PMC`~rx4c9G2)ci;d3002ovPDHLkV1iIng+2fP delta 189 zcmV;u07Cz=0?h%C7=Hu<0002(-QrRJ000SaNLh0L01FZT01FZU(%pXi0000OP)t-s z8X6jVi9U#!M3$#Wqqa`1!BMoxTf5F{M7IDm00001bW%=J06^y0W&i*HPDw;TR0tgf z!2tn-Fbn{&Xuts;=Aa!0-roQ{7}(MO#HjVTdc8!PnbE@zY&Hr=0Zb1t1#oL%DBuvl r;Q^)wrUcRsY$7`I%rxrvz1F+_#|04tL{I**00000NkvXXu0mjfvu{Nr diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_scaffolding_top.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_scaffolding_top.png index 4fb912a4af40315684f88ff827cd45a3005aea92..d748191ba18c58673c678d613293f2ae60275782 100644 GIT binary patch delta 383 zcmV-_0f7GW0geNZ7=H)`0000V^Z#K000C7=L_t(I%bioPZo)teeV2qJ6;xTe@g3bd z^(Pp+z|_4XAHbfeT{7OrP>GGD*&?-(kUDlM18NsUqTF4YxI=U)0YVX$PS2A4>}TuD zWE2p#jAR1C>!VyR!JHm;Z8vVQjtiI$P{;}akZHs4`e-vUZGSMQ2i9?6mC1KAs8X1& z2NLVUWSPKlJ(M!3eA=u)Dg|v;D3))yxP4&x`!k&DJNEPOvWM=?Ju5z6YYs%{lZrX1 zm=ge`eE2Wwd>I7<5&9&ffMgWVDP#c9`7#Q~(jx#sckskgKBU7qqVC|4rF=x?W>qaj zCRH^p>95o1D0pg)2z_eEY07OcqQ@4YPsnCt%H|Ww=97~Z==^LpK3{=;P%$U9nC|T0 zco7xzQZ1%c({mIwIQ0%@?3xhg4f3tG{nw0_hi+>+Q#K0ZTi`Ma$_r dC}q-mSidZry$z&{R~7&O002ovPDHLkV1h>fu}S~{ delta 228 zcmVB4NNNa7B#oi7kr^m5V>(ns9jM(gY0{)cQ-CJVoY}E_<_w_8 e<>h75fEWN{CM(IlM5Ac{0000 Date: Wed, 11 Jan 2023 02:19:19 -0500 Subject: [PATCH 060/105] Prevent growing "around" things in the way. --- mods/ITEMS/mcl_bamboo/globals.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mods/ITEMS/mcl_bamboo/globals.lua b/mods/ITEMS/mcl_bamboo/globals.lua index 822938f4c..f1e585b62 100644 --- a/mods/ITEMS/mcl_bamboo/globals.lua +++ b/mods/ITEMS/mcl_bamboo/globals.lua @@ -192,6 +192,10 @@ function mcl_bamboo.grow_bamboo(pos, bonemeal_applied) node_name = minetest.get_node(chk_pos).name dist = vector.distance(soil_pos, chk_pos) + if node_name ~= "air" and mcl_bamboo.is_bamboo(node_name) == false then + break + end + -- stop growing check. ie, handle endcap placement. if dist >= height - 1 then local above_node_name = minetest.get_node(vector.offset(chk_pos, 0, 1, 0)).name From b07e6fccdcdaab844c627dcec2fda2b42eb49d46 Mon Sep 17 00:00:00 2001 From: Michieal Date: Wed, 11 Jan 2023 02:22:30 -0500 Subject: [PATCH 061/105] Put height into placed, base, bamboo stalk nodes so that height checks work properly. Fix placing bamboo on top of other bamboo nodes, when it would go above the decided height. It now stops just before the endcap node placement. --- mods/ITEMS/mcl_bamboo/bamboo_base.lua | 113 +++++++++++++++----------- 1 file changed, 64 insertions(+), 49 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/bamboo_base.lua b/mods/ITEMS/mcl_bamboo/bamboo_base.lua index 5767285cf..11ab9649d 100644 --- a/mods/ITEMS/mcl_bamboo/bamboo_base.lua +++ b/mods/ITEMS/mcl_bamboo/bamboo_base.lua @@ -136,65 +136,80 @@ local bamboo_def = { mcl_bamboo.mcl_log("node name: " .. nodename .. "\nbamboo_node: " .. bamboo_node) -- intentional use of nodename. + local rand_height + local BAMBOO_MAX_HEIGHT = 16 -- maximum height of 16, per wiki. + local first_shoot + local meta + if bamboo_node ~= -1 then place_item = ItemStack(mcl_bamboo.bamboo_index[bamboo_node]) + + -- height check for placing bamboo nodes. because... lmfao bamboo stalk to the sky. + -- variables used in more than one spot. + local chk_pos + local soil_pos + local node_name = "" + local dist = 0 + local height = -1 + + local BAMBOO_SOIL_DIST = BAMBOO_MAX_HEIGHT * -1 + -- ------------------- + for py = -1, BAMBOO_SOIL_DIST, -1 do + chk_pos = vector.offset(pos, 0, py, 0) + node_name = minetest.get_node(chk_pos).name + if mcl_bamboo.is_dirt(node_name) then + first_shoot = vector.offset(chk_pos, 0, 1, 0) + break + else + if mcl_bamboo.is_bamboo(node_name) == false then + break + end + end + end + -- requires knowing where the soil node is. + if first_shoot == nil then + return + end + meta = minetest.get_meta(first_shoot) + if meta then + height = meta:get_int("height", -1) + end + + dist = vector.distance(first_shoot, pos) + 1 -- +1 for the ground offset. + minetest.log("Distance: " .. dist .. " Height: " .. height .. " Bamboo to place: " .. mcl_bamboo.bamboo_index[bamboo_node]) + -- okay, so don't go beyond max height... + -- Height is determined when the first node grows. + -- here, it's not found, so let them do 4-5 nodes up. (should help it grow.) + if dist < 5 and height < 5 then + -- allow + else + -- else, it's complicated. + if dist > 5 and height < 5 then + return + end + end + + if dist > height - 1 then + -- height found. here, we let them do it until they reach where the endcap will go. + return + end else local placed_type = pr:next(1, 4) -- randomly choose which one to place. mcl_bamboo.mcl_log("Place_Bamboo_Shoot--Type: " .. placed_type) place_item = ItemStack(mcl_bamboo.bamboo_index[placed_type]) + rand_height = pr:next(BAMBOO_MAX_HEIGHT - 4, BAMBOO_MAX_HEIGHT) end - -- height check for placing bamboo nodes. because... lmfao bamboo stalk to the sky. - -- variables used in more than one spot. - local first_shoot - local chk_pos - local soil_pos - local node_name = "" - local dist = 0 - local height = -1 - local BAMBOO_MAX_HEIGHT = 16 -- base height check. - - local BAMBOO_SOIL_DIST = BAMBOO_MAX_HEIGHT * -1 - -- ------------------- - for py = -1, BAMBOO_SOIL_DIST, -1 do - chk_pos = vector.offset(pos, 0, py, 0) - node_name = minetest.get_node(chk_pos).name - if mcl_bamboo.is_dirt(node_name) then - soil_pos = chk_pos - break - else - if mcl_bamboo.is_bamboo(node_name) == false then - break - end + local _, position = minetest.item_place(place_item, placer, pointed_thing, fdir) + if not minetest.is_creative_enabled(placer:get_player_name()) then + itemstack:take_item(1) + end + if rand_height and rand_height > 1 then + meta = minetest.get_meta(position) + if meta then + meta:set_int("height", rand_height) end end - -- requires knowing where the soil node is. - if soil_pos == nil then - return itemstack -- returning itemstack means don't place. - end - - first_shoot = vector.offset(soil_pos, 0, 1, 0) - local meta = minetest.get_meta(first_shoot) - - if meta then - height = meta:get_int("height", -1) - end - - dist = vector.distance(soil_pos, chk_pos) - - -- okay, so don't go beyond max height... - if dist > 15 and height == -1 then - -- height not found - return itemstack - end - - if dist + 1 > height - 1 then - -- height found. - return itemstack - end - - minetest.item_place(place_item, placer, pointed_thing, fdir) - itemstack:take_item(1) return itemstack, pointed_thing.under end, From 1de806f6f884dabe0ae3873263f494ded8a73276 Mon Sep 17 00:00:00 2001 From: Michieal Date: Wed, 11 Jan 2023 02:22:30 -0500 Subject: [PATCH 062/105] Put height into placed, base, bamboo stalk nodes so that height checks work properly. Fix placing bamboo on top of other bamboo nodes, when it would go above the decided height. It now stops just before the endcap node placement. Fixed Errant log message. Fixed itemstack removal while in creative mode. --- mods/ITEMS/mcl_bamboo/bamboo_base.lua | 113 +++++++++++++++----------- 1 file changed, 64 insertions(+), 49 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/bamboo_base.lua b/mods/ITEMS/mcl_bamboo/bamboo_base.lua index 5767285cf..0de5e8d6e 100644 --- a/mods/ITEMS/mcl_bamboo/bamboo_base.lua +++ b/mods/ITEMS/mcl_bamboo/bamboo_base.lua @@ -136,65 +136,80 @@ local bamboo_def = { mcl_bamboo.mcl_log("node name: " .. nodename .. "\nbamboo_node: " .. bamboo_node) -- intentional use of nodename. + local rand_height + local BAMBOO_MAX_HEIGHT = 16 -- maximum height of 16, per wiki. + local first_shoot + local meta + if bamboo_node ~= -1 then place_item = ItemStack(mcl_bamboo.bamboo_index[bamboo_node]) + + -- height check for placing bamboo nodes. because... lmfao bamboo stalk to the sky. + -- variables used in more than one spot. + local chk_pos + local soil_pos + local node_name = "" + local dist = 0 + local height = -1 + + local BAMBOO_SOIL_DIST = BAMBOO_MAX_HEIGHT * -1 + -- ------------------- + for py = -1, BAMBOO_SOIL_DIST, -1 do + chk_pos = vector.offset(pos, 0, py, 0) + node_name = minetest.get_node(chk_pos).name + if mcl_bamboo.is_dirt(node_name) then + first_shoot = vector.offset(chk_pos, 0, 1, 0) + break + else + if mcl_bamboo.is_bamboo(node_name) == false then + break + end + end + end + -- requires knowing where the soil node is. + if first_shoot == nil then + return + end + meta = minetest.get_meta(first_shoot) + if meta then + height = meta:get_int("height", -1) + end + + dist = vector.distance(first_shoot, pos) + 1 -- +1 for the ground offset. + mcl_bamboo.mcl_log("Distance: " .. dist .. " Height: " .. height .. " Bamboo to place: " .. mcl_bamboo.bamboo_index[bamboo_node]) + -- okay, so don't go beyond max height... + -- Height is determined when the first node grows or is placed. + -- here, it's not found, so let them do 4-5 nodes up. (should help it grow.) + if dist < 5 and height < 5 then + -- allow + else + -- else, it's complicated. + if dist > 5 and height < 5 then + return + end + end + + if dist > height - 1 then + -- height found. here, we let them do it until they reach where the endcap will go. + return + end else local placed_type = pr:next(1, 4) -- randomly choose which one to place. mcl_bamboo.mcl_log("Place_Bamboo_Shoot--Type: " .. placed_type) place_item = ItemStack(mcl_bamboo.bamboo_index[placed_type]) + rand_height = pr:next(BAMBOO_MAX_HEIGHT - 4, BAMBOO_MAX_HEIGHT) end - -- height check for placing bamboo nodes. because... lmfao bamboo stalk to the sky. - -- variables used in more than one spot. - local first_shoot - local chk_pos - local soil_pos - local node_name = "" - local dist = 0 - local height = -1 - local BAMBOO_MAX_HEIGHT = 16 -- base height check. - - local BAMBOO_SOIL_DIST = BAMBOO_MAX_HEIGHT * -1 - -- ------------------- - for py = -1, BAMBOO_SOIL_DIST, -1 do - chk_pos = vector.offset(pos, 0, py, 0) - node_name = minetest.get_node(chk_pos).name - if mcl_bamboo.is_dirt(node_name) then - soil_pos = chk_pos - break - else - if mcl_bamboo.is_bamboo(node_name) == false then - break - end + local _, position = minetest.item_place(place_item, placer, pointed_thing, fdir) + if not minetest.is_creative_enabled(placer:get_player_name()) then + itemstack:take_item(1) + end + if rand_height and rand_height > 1 then + meta = minetest.get_meta(position) + if meta then + meta:set_int("height", rand_height) end end - -- requires knowing where the soil node is. - if soil_pos == nil then - return itemstack -- returning itemstack means don't place. - end - - first_shoot = vector.offset(soil_pos, 0, 1, 0) - local meta = minetest.get_meta(first_shoot) - - if meta then - height = meta:get_int("height", -1) - end - - dist = vector.distance(soil_pos, chk_pos) - - -- okay, so don't go beyond max height... - if dist > 15 and height == -1 then - -- height not found - return itemstack - end - - if dist + 1 > height - 1 then - -- height found. - return itemstack - end - - minetest.item_place(place_item, placer, pointed_thing, fdir) - itemstack:take_item(1) return itemstack, pointed_thing.under end, From 00408b998cf02d5af9b99fb0d56e2a3fdce420d1 Mon Sep 17 00:00:00 2001 From: Michieal Date: Wed, 11 Jan 2023 07:16:12 -0500 Subject: [PATCH 063/105] Fix -- Bamboo grow, bamboo place to be correct. --- mods/ITEMS/mcl_bamboo/bamboo_base.lua | 29 ++++++++++++++------------- mods/ITEMS/mcl_bamboo/globals.lua | 26 +++++++++++++++--------- 2 files changed, 32 insertions(+), 23 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/bamboo_base.lua b/mods/ITEMS/mcl_bamboo/bamboo_base.lua index 0de5e8d6e..bac4222b8 100644 --- a/mods/ITEMS/mcl_bamboo/bamboo_base.lua +++ b/mods/ITEMS/mcl_bamboo/bamboo_base.lua @@ -91,7 +91,7 @@ local bamboo_def = { end local node = minetest.get_node(pointed_thing.under) local pos = pointed_thing.under - local nodename = node.name + local nodename = node.name -- intentional use of nodename. mcl_bamboo.mcl_log("Node placement data:") mcl_bamboo.mcl_log(dump(pointed_thing)) @@ -106,13 +106,14 @@ local bamboo_def = { -- Use pointed node's on_rightclick function first, if present if placer and not placer:get_player_control().sneak then if minetest.registered_nodes[node.name] and minetest.registered_nodes[node.name].on_rightclick then - mcl_bamboo.mcl_log("attempting placement of bamboo via targeted node's on_rightclick.") + mcl_bamboo.mcl_log("Attempting targeted node's on_rightclick.") return minetest.registered_nodes[node.name].on_rightclick(pointed_thing.under, node, placer, itemstack) or itemstack end end if mcl_bamboo.is_bamboo(nodename) == false and nodename ~= BAMBOO_ENDCAP_NAME then -- not bamboo... + mcl_bamboo.mcl_log("not bamboo...") if nodename ~= "mcl_flowerpots:flower_pot" then if mcl_bamboo.is_dirt(nodename) == false then mcl_bamboo.mcl_log("bamboo dirt node not found; node name: " .. nodename) @@ -132,22 +133,20 @@ local bamboo_def = { local place_item = ItemStack(itemstack) -- make a copy so that we don't indirectly mess with the original. - local bamboo_node = mcl_bamboo.is_bamboo(nodename) + local bamboo_node = mcl_bamboo.is_bamboo(nodename) or 0 mcl_bamboo.mcl_log("node name: " .. nodename .. "\nbamboo_node: " .. bamboo_node) - -- intentional use of nodename. local rand_height local BAMBOO_MAX_HEIGHT = 16 -- maximum height of 16, per wiki. local first_shoot local meta - if bamboo_node ~= -1 then + if bamboo_node and bamboo_node > 0 then place_item = ItemStack(mcl_bamboo.bamboo_index[bamboo_node]) -- height check for placing bamboo nodes. because... lmfao bamboo stalk to the sky. -- variables used in more than one spot. local chk_pos - local soil_pos local node_name = "" local dist = 0 local height = -1 @@ -160,10 +159,9 @@ local bamboo_def = { if mcl_bamboo.is_dirt(node_name) then first_shoot = vector.offset(chk_pos, 0, 1, 0) break - else - if mcl_bamboo.is_bamboo(node_name) == false then - break - end + end + if mcl_bamboo.is_bamboo(node_name) == false then + break end end -- requires knowing where the soil node is. @@ -205,9 +203,12 @@ local bamboo_def = { itemstack:take_item(1) end if rand_height and rand_height > 1 then - meta = minetest.get_meta(position) - if meta then - meta:set_int("height", rand_height) + if position then + mcl_bamboo.mcl_log("Setting Height Data...") + meta = minetest.get_meta(position) + if meta then + meta:set_int("height", rand_height) + end end end return itemstack, pointed_thing.under @@ -243,7 +244,7 @@ bamboo_top.tiles = {"mcl_bamboo_endcap.png"} bamboo_top.drawtype = "plantlike_rooted" --"plantlike" --bamboo_top.paramtype2 = "meshoptions" --bamboo_top.param2 = 2 -bamboo_top.waving = 2 +-- bamboo_top.waving = 2 bamboo_top.special_tiles = {{name = "mcl_bamboo_endcap.png"}} bamboo_top.nodebox = nil bamboo_top.selection_box = nil diff --git a/mods/ITEMS/mcl_bamboo/globals.lua b/mods/ITEMS/mcl_bamboo/globals.lua index f1e585b62..02c90ab49 100644 --- a/mods/ITEMS/mcl_bamboo/globals.lua +++ b/mods/ITEMS/mcl_bamboo/globals.lua @@ -13,7 +13,6 @@ local BAMBOO_MAX_HEIGHT = 16 -- base height check. local BAMBOO_SOIL_DIST = BAMBOO_MAX_HEIGHT * -1 local BAM_MAX_HEIGHT_STPCHK = BAMBOO_MAX_HEIGHT - 5 local BAM_MAX_HEIGHT_TOP = BAMBOO_MAX_HEIGHT - 1 - local GROW_DOUBLE_CHANCE = 32 --Bamboo can be planted on moss blocks, grass blocks, dirt, coarse dirt, rooted dirt, gravel, mycelium, podzol, sand, red sand, or mud @@ -31,7 +30,12 @@ mcl_bamboo.bamboo_dirt_nodes = { } function mcl_bamboo.is_dirt(node_name) - return table.indexof(mcl_bamboo.bamboo_dirt_nodes, node_name) ~= -1 + local index = table.indexof(mcl_bamboo.bamboo_dirt_nodes, node_name) + if index == -1 then + return false + else + return true + end end mcl_bamboo.bamboo_index = { @@ -42,7 +46,12 @@ mcl_bamboo.bamboo_index = { } function mcl_bamboo.is_bamboo(node_name) - return table.indexof(mcl_bamboo.bamboo_index, node_name) + local index = table.indexof(mcl_bamboo.bamboo_index, node_name) + if index == -1 then + return false + else + return index + end end --- pos: node position; placer: ObjectRef that is placing the item @@ -62,7 +71,7 @@ function mcl_bamboo.grow_bamboo(pos, bonemeal_applied) local node_above = minetest.get_node(vector.offset(pos, 0, 1, 0)) mcl_bamboo.mcl_log("Grow bamboo called; bonemeal: " .. tostring(bonemeal_applied)) - if not bonemeal_applied and mcl_bamboo.is_bamboo(node_above.name) == true then + if not bonemeal_applied and mcl_bamboo.is_bamboo(node_above.name) ~= false then return false -- short circuit this function if we're trying to grow (std) the bamboo and it's not the top shoot. end if minetest.get_node_light(pos) < 8 then @@ -79,17 +88,16 @@ function mcl_bamboo.grow_bamboo(pos, bonemeal_applied) -- ------------------- mcl_bamboo.mcl_log("Grow bamboo; checking for soil: ") - -- the soil node below. + -- the soil node below the bamboo. for py = -1, BAMBOO_SOIL_DIST, -1 do chk_pos = vector.offset(pos, 0, py, 0) node_name = minetest.get_node(chk_pos).name if mcl_bamboo.is_dirt(node_name) then soil_pos = chk_pos break - else - if mcl_bamboo.is_bamboo(node_name) == false then - break - end + end + if mcl_bamboo.is_bamboo(node_name) == false then + break end end -- requires knowing where the soil node is. From b572363b8ec6afb29d2bdfe8251633936ef414c8 Mon Sep 17 00:00:00 2001 From: Michieal Date: Wed, 11 Jan 2023 07:16:41 -0500 Subject: [PATCH 064/105] temp commit. recolor scaffolds. --- .../textures/mcl_bamboo_scaffolding_bottom.png | Bin 306 -> 363 bytes .../textures/mcl_bamboo_scaffolding_top.png | Bin 398 -> 493 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_scaffolding_bottom.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_scaffolding_bottom.png index 9a8c56f8408e383e2a74f4ee04b8814cc3b1ea79..7fdbce5ea1e5c0e91d39c8440c0a9179d8d756c8 100644 GIT binary patch delta 337 zcmV-X0j~bC0_y^hBYy!hNkl zh*2yIHkQ7Jod`aJg`$Oq6?aXtpT#PO_(RsyOmn}vcg}DvyEv9bfo|`J_F4;)7#^Rn zPzP7zGwMIX|qqJYUCkZl- zw|ZQub8&ZrMFGbsulD{ZV9oG9iKT-$#wk=wzYKAv5$ac;!2KtzL5A=4j*v8V_~7Ia zGsCynS|1YCUP@ZV&CHft_tkncP~6{QQ_~#m@3FPMSxQu%mS19qMFBbgzRDhoVR-_w jT3J`~W$i>A4Km&U4qAch!R|#300000NkvXXu0mjfUJjdS delta 280 zcmV+z0q6ef0-BYyz-Nklb>!3_MD*MIZtM6wTD3L%)$9)`8e>6R~KpMZ`Wq zQGYEfx)N$jvUG7;<;7EIJ^|}M>El%-1q?@}{KLPLi2XRanTSI&Rb1NA^>oU88c$ku eJ&PMC`~rx4b`g=y8F%0S0000@Yh=;|Ajh(tM(rC^(nt%Mycz&fX zMnb$`@bQ%0=PwZ*;ketR^D9*AKDn*cAYLFk;$(Ejt7lJ9>whkF^}7M<9TW=Hb^(xD z6UW`AWCFDR9@WMJl!5yD565{~~# zI`On$nViM((SMV?Xguv(pY#MBc$U(opEJmkSHVRFCiEql4W&${3iRgDEe6SKC_3S#rnVlmAHe*j!BtlN%ZX#oHL002ov JPDHLkV1fqI>;wP+ delta 371 zcmV-(0gV3b1C9fbB!5*&L_t(I%bioPZo)teeV2qJ6;xTe@g3bd^(Pp+z|_4XAHbfe zT{7OrP>GGD*&?-(kUDlM18NsUqTF4YxI=U)0YVX$PS2A4>}TuDWE2p#jAR1C>!VyR z!JHm;Z8vVQjtiI$P{;}akZHs4`e-vUZ7`I7< z5&9&ffMgWVDP#c9`7#Q~(jx#sckskgKBU7qqVC|4rF=x?W>qajCRH^p>95o1C~A%f zeQL;Q%55*A$7~j%PsnCt%H|Ww=97~Z==^LpK3{=;P%$U9nC|T0co7xzQZ1%c({mIw zIQ0%@?3xhg4f3tG{nw0_hi+>+Q#K0ZTi`Ma$_rC}q-mSidZry$z&{ RR~7&O002ovPDHLkV1kY)uEYQU From 699355933077cb9c62519d97ad43bb66a75868cb Mon Sep 17 00:00:00 2001 From: Michieal Date: Wed, 11 Jan 2023 07:26:01 -0500 Subject: [PATCH 065/105] Updated relevant Credits for Bamboo and recent work. --- CREDITS.md | 5 ++++- mods/HUD/mcl_credits/people.lua | 4 +++- mods/ITEMS/mcl_bamboo/README.md | 6 ++++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CREDITS.md b/CREDITS.md index 9c2930155..c213011c8 100644 --- a/CREDITS.md +++ b/CREDITS.md @@ -35,7 +35,7 @@ * SumianVoice * MrRar * talamh -* Faerraven +* Faerraven / Michieal ## Contributors * Laurent Rocher @@ -147,11 +147,13 @@ * jordan4ibanez * paramat * cora +* Faerraven / Michieal ## 3D Models * 22i * tobyplowy * epCode +* Faerraven / Michieal ## Textures * XSSheep @@ -166,6 +168,7 @@ * RandomLegoBrick * cora * Faerraven / Michieal +* Nicu ## Translations * Wuzzy diff --git a/mods/HUD/mcl_credits/people.lua b/mods/HUD/mcl_credits/people.lua index 9c4208ece..5f4eda17d 100644 --- a/mods/HUD/mcl_credits/people.lua +++ b/mods/HUD/mcl_credits/people.lua @@ -36,7 +36,7 @@ return { "SumianVoice", "MrRar", "talamh", - "Faerraven", + "Faerraven / Michieal", }}, {S("Contributors"), 0x52FF00, { "Laurent Rocher", @@ -147,11 +147,13 @@ return { "jordan4ibanez", "paramat", "cora", + "Faerraven / Michieal", }}, {S("3D Models"), 0x0019FF, { "22i", "tobyplowy", "epCode", + "Faerraven / Michieal", }}, {S("Textures"), 0xFF9705, { "XSSheep", diff --git a/mods/ITEMS/mcl_bamboo/README.md b/mods/ITEMS/mcl_bamboo/README.md index f2ad95afd..b77e3e90b 100644 --- a/mods/ITEMS/mcl_bamboo/README.md +++ b/mods/ITEMS/mcl_bamboo/README.md @@ -12,10 +12,12 @@ Inventory / wield image: created by RandomLegoBrick#8692 and is CC0. Dependencies: mcl_core, mcl_sounds, mcl_tools -Optional Dependencies = mcl_flowerpots, mclx_stairs, mcl_doors, mcl_signs, mesecons_pressureplates, mcl_fences, mesecons_button. +Optional Dependencies = mcl_flowerpots, mclx_stairs, mcl_doors, mcl_signs, mesecons_pressureplates, mcl_fences, +mesecons_button. Note that "mcl_boats" may be used at a later date. -Special thanks to Nicu for help with the nodebox stalk design. +Special thanks to Nicu for help with a ton of things from testing, to encouragement, to graphic design and nodebox work. +Nicu - You Rock! Small Joker's bamboo forum topic: Forum topic: https://forum.minetest.net/viewtopic.php?id=8289 From a04d946879fe6450457a42d6ee280811206b7d9f Mon Sep 17 00:00:00 2001 From: Michieal Date: Wed, 11 Jan 2023 21:50:34 -0500 Subject: [PATCH 066/105] Updated Licensing for additional images. --- mods/ITEMS/mcl_bamboo/README.md | 10 +++++++--- mods/ITEMS/mcl_bamboo/init.lua | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/README.md b/mods/ITEMS/mcl_bamboo/README.md index b77e3e90b..c251321ac 100644 --- a/mods/ITEMS/mcl_bamboo/README.md +++ b/mods/ITEMS/mcl_bamboo/README.md @@ -6,9 +6,13 @@ This mod adds working, familiar bamboo nodes to your Mineclone 2 world. Code: Michieal. Original (basic) bamboo code by: Small Joker. License for code: GPLv3. -License for images / textures: CC-BY-SA. -Images Created by Michieal, except for: -Inventory / wield image: created by RandomLegoBrick#8692 and is CC0. +License for images / textures: CC-BY-SA except where noted. +Images Created by Michieal, except for: + +* Inventory / wield image for Bamboo Stalk: created by RandomLegoBrick#8692 and is CC0. +* The Bamboo door image, which is a variant of this image: https://www.flickr.com/photos/basheertome/5179849901/ which + is CC-BY 2.0, + Basheer Tome (2015). Dependencies: mcl_core, mcl_sounds, mcl_tools diff --git a/mods/ITEMS/mcl_bamboo/init.lua b/mods/ITEMS/mcl_bamboo/init.lua index 44499a6e1..fe97c19d4 100644 --- a/mods/ITEMS/mcl_bamboo/init.lua +++ b/mods/ITEMS/mcl_bamboo/init.lua @@ -2,7 +2,7 @@ -- Parts of mcl_scaffolding were used. Mcl_scaffolding originally created by Cora; Fixed and heavily reworked -- for mcl_bamboo by Michieal. -- Creation date: 12-01-2022 (Dec 1st, 2022) --- License for Media: CC-BY-SA 4.0; Code: GPLv3 +-- License for Media: CC-BY-SA 4.0 (except where noted); Code: GPLv3 -- Copyright (C) 2022 - 2023, Michieal. See License.txt -- LOCALS From d2625d3ace33a9329a947c7704f6b80d38ac5af6 Mon Sep 17 00:00:00 2001 From: Michieal Date: Thu, 12 Jan 2023 03:27:17 -0500 Subject: [PATCH 067/105] Fix water node placement, and lava node placement. (Yes, nether lava too!) --- mods/ITEMS/mcl_bamboo/bamboo_base.lua | 33 ++++++++++++++++----------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/bamboo_base.lua b/mods/ITEMS/mcl_bamboo/bamboo_base.lua index bac4222b8..b8f99787b 100644 --- a/mods/ITEMS/mcl_bamboo/bamboo_base.lua +++ b/mods/ITEMS/mcl_bamboo/bamboo_base.lua @@ -198,27 +198,34 @@ local bamboo_def = { rand_height = pr:next(BAMBOO_MAX_HEIGHT - 4, BAMBOO_MAX_HEIGHT) end - local _, position = minetest.item_place(place_item, placer, pointed_thing, fdir) - if not minetest.is_creative_enabled(placer:get_player_name()) then - itemstack:take_item(1) - end - if rand_height and rand_height > 1 then - if position then - mcl_bamboo.mcl_log("Setting Height Data...") - meta = minetest.get_meta(position) - if meta then - meta:set_int("height", rand_height) + local node_above_name = minetest.get_node(pointed_thing.above).name + minetest.log("\n\n\nnode_above name: " .. node_above_name) + if node_above_name ~= "mcl_core:water_source" or node_above_name ~= "mcl_core:lava_source" + or node_above_name ~= "mcl_nether:nether_lava_source" then + local _, position = minetest.item_place(place_item, placer, pointed_thing, fdir) + if not minetest.is_creative_enabled(placer:get_player_name()) then + itemstack:take_item(1) + end + if rand_height and rand_height > 1 then + if position then + mcl_bamboo.mcl_log("Setting Height Data...") + meta = minetest.get_meta(position) + if meta then + meta:set_int("height", rand_height) + end end end + return itemstack, pointed_thing.under + else + return end - return itemstack, pointed_thing.under end, on_destruct = function(pos) -- Node destructor; called before removing node. local new_pos = vector.offset(pos, 0, 1, 0) local node_above = minetest.get_node(new_pos) - local bamboo_node = string.sub(node_above.name, 1, string.len(BAMBOO)) + local bamboo_node = mcl_bamboo.is_bamboo(node_above.name) or 0 local istack = ItemStack(BAMBOO) local sound_params = { pos = new_pos, @@ -226,7 +233,7 @@ local bamboo_def = { max_hear_distance = 10, -- default, uses a Euclidean metric } - if node_above and (bamboo_node == BAMBOO or node_above.name == BAMBOO_ENDCAP_NAME) then + if node_above and ((bamboo_node and bamboo_node > 0) or node_above.name == BAMBOO_ENDCAP_NAME) then minetest.remove_node(new_pos) minetest.sound_play(node_sound.dug, sound_params, true) if pr:next(1, DOUBLE_DROP_CHANCE) == 1 then From f81eec6fff721efde29bc5fdf979cfe01508edbd Mon Sep 17 00:00:00 2001 From: Michieal Date: Thu, 12 Jan 2023 03:28:29 -0500 Subject: [PATCH 068/105] temp commit - brownish, rather than yellow, colored palette for bamboo things. --- .../mcl_bamboo_bamboo_block_stripped.png | Bin 375 -> 299 bytes .../textures/mcl_bamboo_bamboo_bottom.png | Bin 516 -> 425 bytes .../textures/mcl_bamboo_bamboo_plank.png | Bin 277 -> 188 bytes .../mcl_bamboo_bamboo_plank_mosaic.png | Bin 256 -> 247 bytes .../textures/mcl_bamboo_door_bottom.png | Bin 1967 -> 2557 bytes .../textures/mcl_bamboo_door_bottom_alt.png | Bin 1966 -> 2557 bytes .../textures/mcl_bamboo_door_top.png | Bin 1990 -> 2912 bytes .../textures/mcl_bamboo_door_top_alt.png | Bin 1982 -> 2913 bytes .../textures/mcl_bamboo_door_wield.png | Bin 1392 -> 1762 bytes .../textures/mcl_bamboo_fence_bamboo.png | Bin 205 -> 239 bytes .../textures/mcl_bamboo_fence_gate_bamboo.png | Bin 206 -> 300 bytes .../mcl_bamboo_scaffolding_bottom.png | Bin 363 -> 216 bytes .../textures/mcl_bamboo_scaffolding_top.png | Bin 493 -> 318 bytes .../textures/mcl_bamboo_trapdoor_side.png | Bin 650 -> 518 bytes .../textures/mcl_bamboo_trapdoor_top.png | Bin 628 -> 518 bytes .../textures/mcl_bamboo_trapdoor_wield.png | Bin 684 -> 389 bytes 16 files changed, 0 insertions(+), 0 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_bamboo_block_stripped.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_bamboo_block_stripped.png index b9418a27b10d677645eb8e4819f904364d5c7ef3..3d89ef07fc8ee90e9ce1ec7d85822486a2ddf9af 100644 GIT binary patch delta 272 zcmV+r0q_3z0;>X$B!6H~OjJdjmVTa@fS;IwpP7N6nu4O6grb~rkkkgBDRtEG{vrje|tlB}nbtf-T%sFSUzm9D9lu&S4^ ztC+H_nzOE(wXmK}aL$$h004$bL_t&-S2e{k4udcZ1<>#Bkbi&}Dxr#@_di}&RDzSZ zi}RMp<0I!=&X>f5few*5n?jgNLCoCs8Qz=5T(^}pyXLfddxGmN|#+X@#{t=C@rokkS=XY^cEMi2n#w WYxQ4T)MEeu00{s|MNUMnLSTaaLyoWj delta 348 zcmV-i0i*t_0`~%tB!8SxOjJc@aR6*}0Bm;vZgl{0cK~sF0CRZ&bA14KfB<-c0C)1jSPp54Tz8tiH{J8kbe=1kP?fL6N{4+itz^kCqmYm>7_l80001%NklQf z7U?L2?#_Hc9aX7C2ooRU|IQ71p)3bFvWkskyQYq^qxB{f)G@DF$>=?$j?cqL&g;tP u_`Oe;RRj8F6_Ua(EeXc^Y(k8FYLZb$l6j zeHnOt8hU{ldw?2!cN%?q8i9HlgMb;Oo^q$5cBrCvsiJtPqJMd+qIs&Lda9#)s-%0X zqT6FM8!BOYSXa^p(OE<)c=2&3(x88U0jjd>L%#HJe=zBlU|7& zMM#z)wHw%+NPoZ`!yRx(<)uK6J3$U3e6fbSuOZDujolax#@HFQl=CgLRzqVgG*fvj z-+()d|CExdgapwt=^n_nXIARHt_vpkncpxvBRB8E^ucoa4i}k t_bZ52Lkc2qy10CQuC)5N4-c>M2S)WOg>Itv$p8QV00>D%PDHLkV1k!$wV?n2 delta 490 zcmV`CdpcQhG-h)dZgUxHbs1=Q8FhRa zZFm`Ibs2Vn8HI`&c!C;*h8cK+8G(fvdxjZ%h8k;h8i|k^hJ_i5i5Yl(8is}$h=>|! zZy9!g8f$$Sh>00{g&BH<8HkD*d4m~ka~Xw)8HtG*hld%8i+>u0h#Gx*8f$tQfQA`; zh8lc@8H0uyYjYWNd>M<18gX|SdW0E=i5Yi+8F_^nYk3-mh#G@{8Dw!8gM}G-gBgT| z8GnZvad{eSaT#uO8GC>lZE_iXcN%wn8G(8ka(Nnbdl`Cx8Rhvw^8f$<32;bRa{vGi z!Tk07*qoM6N<$f(cv5F#rGn diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_bamboo_plank.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_bamboo_plank.png index a58f4f7d5503f73df52ca03f881434691ca6b37f..93e5d95b8f70273dc907edc30ccbbdcba1819b1f 100644 GIT binary patch delta 172 zcmV;d08{^!0=xl`7=Hu<0002(-QrRJ000|MOjJdon}fW$sJ*(W!@#k`!Lr4|v&F)+ z#>2G6!?lz!TTlQ109;8#K~xA^P03LWgFpZT(E$Z`DM7&n2OI)8b`8)y3ANpirh)l- z$-uv3TUWW|M*m1TbpjK>fE8CO5432v^7~96ZEAY!#$1*%za>;)07k${ud#5_YixAc ayW}t6GbMM706*&h0000f z_R)#<(Te%us`=ro`Qohk;;s7Pt@`4w`s1(q`sKFz z=DGI!6T1Ka0EJ0JK~xx5WzRu!!axv1(MC1_!`SoNs2T2m(ta#LL8`3fTS%plu9BqC zbeSYY-k#5U-+K1Fax+J;U(Ov219-&g+o4HP;KZZ{m@JNvwKoI9X)vLaG)wxCG@qpa za*Tuq9?21w^}a5BZA-f?oox-h^ZD{OTOK$m2weZckyNAba3)Z{(&!C~8LZBC00000 LNkvXXu0mjf5&w<* diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_bamboo_plank_mosaic.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_bamboo_plank_mosaic.png index ea0f2d5658e675e53000fc27def27df706d8dfcd..590c596c1e8fe6577a3a3f05e7654f30b2e4abde 100644 GIT binary patch delta 230 zcmV1qbJ g@+1Ax;aPC_09M6Cv~36`H2?qr07*qoM6N<$f@{NRPXGV_ delta 239 zcmVdgNG5FiW&M}g`Wus^Ve;tv^s3E>s8vylJ*002ovPDHLkV1gX;ddUC) diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_door_bottom.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_door_bottom.png index 286cdd381a2d74b3af8e38d950bca77b07bb524f..c50693b6486a0e53f5cca10f1f3fc3b6091f7c6d 100644 GIT binary patch delta 2548 zcmV830YMM$Mp#kyt5rj=030*Odbg=m~sB`A#$4#dGFiCxEI z&v-od&di;;kMsP_`JUbJTl~j9&HuUihc7(+_=St7&!7JO4_^EFx4!eg@BQSt zYoBwn;=PS;{Pkab^$VXpclj#g$yfj4Yjia1Z=5>S>#djBV)Kb-+kw|=g`4M|LZ0iy zVUeb%d+S0<(SPVnNNo%9sg0^SZkigbPP(l;pJmG>--uU6gD7%EReO}A%f;-7 zBL@T#&*P0q3*%`-=ab{r=PzICudMDo`e*8S?0?$tJm2cAzV*ZJ{^iSG0D$$) z^Qx|*IB7*el613WrV#<9FPt87irZ@g%8>7|bh#L;c2`EjDCrZ2cog}q5Rf~6dc}{T z&e~ZL^3|0DC+(;^9K7}VcQGbUz3|5vlgaM=AdJ0MT$b{1Ixh;DbVdQE43na)Cr6XI z(pFiiw0||m^O*1PIBNF>tLgH1eB*jumYe6!X#$ipWesLN>94E;z>~lCx!;a4i@L+< zENi#p{&1DI+F7Z`QD=uc54X2>KECa9k8w^YD)W?p(?%6i zVXZOq2msuE=gr@4kr8#n2pX*oyiS4v0l;8541c4j6~=MEw6#hIh5;kjj>C;JYgayX z^}}D^`o%lft##TON+9rJ9#C9WjnBhpUizZ7=EJxD!&d$< z=8aO;7(%dAGKwN=jPLt5M~7X%x{FSMjCCvf$wvz zOw#EigfJqtsHK!et&Fo$nMP^mQGd^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ub$4b?yE9U8cXB|~yhM}xx6c5fa|jOI+&+#J-JK{fAuvTx zq1GC)=$d%%?gIcJ1fMYTcDp^@W=vv?!!R&20A|MI`2HGX=P>by05AY|7ZGW(H7ret-XDKSDvOVr|=t)?s6{R+@wmk^#-u6lRsPVi3fl%&fVz zZF_omtYZxbP-7r9-EikFL5Y{t=$aHl zFf(_@Bt#D|cQ-R40?;%KGuwoS(!||G1QUyVI&MP z2i9d7-Cb1y&SP~XMSq|`0MyECwjfpxYLNj-eJT_IL=c;^d0>MPHtRf&B?P#;nPKAY zeGhlXWEf9Df{D9h(zb0%DaMFN-}l2X05CHihGD&4W5UctbOwmqIaM_?>FFr#Hqp(D znfvaFhm8_MDb1S8_mmTnVdhu;?+0>ItX na)klxW=zCxry64+gE0OFx>+45aGHQ800000NkvXXu0mjfLc6k} diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_door_top.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_door_top.png index 8aba3c825e77c61dc8bcb2603c0f527484932ffd..e8cbcf666fc6f07693eb02f414bfae2ab33510de 100644 GIT binary patch delta 2906 zcmV-g3#IhN58xJ%BYz7gNklcQi|UfeEErIxN+YcpSk~jP98bLnUlx(hv#2m|K97U#XdLR`avE!@C2Xu_?;MKzyn`; znm_!#dwJ{JF|OIYk8eKz5=!a7Qn$D{|Cx;DS_qF zr^(`!s;ua)uYWKc^sx+uP>QA1MGUXT)YLe`;RwsFF*Y&HdUq4Ywy~WW>)mzQ4UZRo z@*_Hp7M)gy(Pod(4=IzFG>IvS0x1MaX-LPiXm_SKwQ!tzbBvYMHKu1KNa7GFHC)R= ze{nAkRjRjbixw$TlpxX5vv9)+mL)0oo> z3pkceQI(WZu(rN}GBn1gFC)$pOv~i#>2sW2US)E22XnI%2u-rO-o-F148y|lYFr@G zAZEPQpno;H4PC2fOkBaX*?F|Wq0k@jWbkLlI01?tx;t;P0J>$3LK|~t_zl5 zdxQ4)H0^esbL%5&wuS51%uhC$x~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!{<5i+%KRl_<#LF4>7f4 zs$BTPV+VQg2lvoUw>Wd4ZEJtukI2v$eX#XwNSEV8F2>uWEG?PTr%)mH=9EagY-+PqZ%R4!6{cg&<2gYLjlvl?yzVfB_VXTms87?y{ zj7F3_%WeCYcMnDWH{QkMSoS<+?-LCB~?{nO-9HD#BiE=mT2m3ld7r;GRMB9-5j`anZqk< zh;fh?mgSM7Njb?XX4|Ei@hB~(t(j~#L=@v4i-R4kZcLFJ`u!4T6TRB7(+7fjoXyGY zkfmLFNHOx~zdXy)mtSLMm0popxK^l&f}Zy{?>+r0rycb0zJF7Unr<;kEv2_yv-di( zTxi;EyqZiVjE!S?ut+cpO`s?WmiFvqZ#Co4laH{z6*=?L1)e{2hIig_8-IKFY5G|Y z5y3gfg|p`wPsX@vG-6}DCia#0->@6RAjTpBY2=6n==1`(h_QmjA-3WCS`D_r(rri^ zCQ#%9cI;nfhcey6^ujvJ3#VzEVc>_9gC6xPV6u|FM5fg)q_q4OsYS${^#tVJ00000 LNkvXXu0mjf@>k9+ diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_door_top_alt.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_door_top_alt.png index 6aa951c2613ad7b78eccb522b6fa5da5ab87c123..8e183256a4696f74501d8319f12370d28e4162a3 100644 GIT binary patch delta 2907 zcmV-h3#9bE58)P&BYz7hNkli&?URxT}g@s*k z-C=iF=6z@G>zsSu=hq?GCT2s^&qw_Fp&5P6+pprl;cI9%e1BeBS>@i(e}!K@bddMm z@JpO{z_5tqtgPTcZg)e^TYus_$$9VFwedR%8Z}QZWKcrRn+3alMdR08vWwW!**u*rBTV*f^n3@{L@~bSbFCmn| zu@r-TkIv>Qy3}NG%F5}}lz?(89C_m3C;(ZjR&X2#txJlcpoj~$x)I+$@&e!gk4H(1 zl70|inTk;y5v4JsC`BrVZZDwOYLjI-Su{lIj69C84SxfXmsA`FDGic%#PrMrtLq!o z8e_b=c!E}Y3eRzn?C|_5mgQ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Q0Wk&Mx4J~=CUlWe4Tt;>o2f}8`_-pT00000NkvXXu0mjf Dd1$sW diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_door_wield.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_door_wield.png index 8fd32398c59d99d3baf95aaed1fcda0b6cfb1f6b..8c9daefc5bdbdc0f5bddb2f34f882362682da510 100644 GIT binary patch delta 1747 zcmV;^1}ypT3gQirBYy^|NklX*(WigMUsKld@wT@pK zFqBFW3yD1R@P8v{;Sj4O8>J)Tg%b>K7$Fw#Wp!?rWFkUOG|JxFHgWyphlsd%zSliq zV#iK&HN=(cm+&N&bYF<59-(Y_WNyx}kX=FyNAXP$#}C-PeU!ErAo~HnA9N2WmUGx< zi+)kSx0<}2Z3^2CJt-Xh&AURenw&WD(pll|M}H!a+d?Xyl#cjKUBMFei?g6QEim)DL`_9kNmNm}2 z@sHg8M}Ho7zw`9-w<_$n$9^oGeD%+rR76LV1Y|uz$FtZmzIjc6yw--PseR1NUd6U; zl!(sm4e8hixqJiQ?D5k|xiK$4_S8=;fLfu9Wt!Z~=4mwdvSoB*_kfP?BdH3}zFy2y z9>Z$epRCPXoAr*KI_3hLIP!Q;xxPeSI>kg!ihq{Tq$8|D3aSl*a-l$T^(GNLjHc`U zd%rs-0~|ed>{gv0IdQ6{Yawd2I-}dhxZ}?K%wD_JeFWOJNvbEoz~o*EOP4W?ynp_^ zfAjK_5AspYL=@ZXn;PZv)eMPPgw^F0J~J|o-EOg(FLfV*^gusmt%~V35G0>N_v|E} zD}Q0w4hR9Dpeh=ws?*cgPa>6~f8zwb$uwF>?jEq1xk5x03F#3mtHt=(7QX(~{S-@O zl6`$xmV+WmgwzoAav7-uLmNl&I|0>dvwOh7!w)gsrxQ4B0w2c5x6$zhR7GQDd6jax zh%9R;;RsG(vUm3mR8hgBgJHC~2Vk4jjeip5QWh-~X7kRyh_Z|x4inQA@Y~3mN~Kby z<4L^v&O6kM0<}UFU01sYT)FfgL{Z0X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ence_bamboo.png index 1988002757941b2c1ef58a378087491f3a72f917..9870636418c040d75a8f171949212c695e1cc362 100644 GIT binary patch delta 211 zcmV;^04)E_0q+5jB!47OOjJd*tCY8|n8v@X#=ot|z^}-`ugb!)(#pBi%)HjlzSz;h z+0w%>LfP^F004$bL_t&t9Rkpu&YS}OIA}*t!0;H#NYVig;0a9FjRS7P z#KhOBLmBAh{64Ho-=-dd>ajOff^*z`99t|)m%StLdn;chflStJ!PtY0TVNlNR6j#a z2ds6)bGd`;il=k9ou)F6cE5Xn3}NC4OZfIpT%Hp$ez>^lGe N002ovPDHLkV1i=RX7~UA delta 177 zcmV;i08an!0nGuBB!3l9OjJeZu3752bMVWS@z0&|(xmd%tn=BkhS2UD0001UNkli?H9vwM@ME@mt7p`_L^Al(m-w_G6cM>j3e6v{whu5APGtRkOZ@5FP;rf f_CgW>Y69>F59%H_5|4cp00000NkvXXu0mjfH*!tQ diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_fence_gate_bamboo.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_fence_gate_bamboo.png index 76e8dd3e5fb297ae632fcf18ad30b56637c546ab..8dc865cf3830b6a7a0de9b39c8d42fa147832dac 100644 GIT binary patch delta 285 zcmV+&0pkA70jvU$7=H)@0000eEe}%w002}_OjJd}x~0Usr^UUg$G@w`zpTi?t;xZz z%)_zF#InuBv(3h|&BnFP$F|SMx6jD7(8#yZ$+*+Xxzo$L)Xclp&Aiplyw%RW*3Q1x z&%W2szu3{i+0(rDLqVgmw0{_cA!$SO?tf1{Gxbdp zGGa;2+E~H}NI2^m$!40FXm&;rvar=>y8A$rnWK5Di5E24 jZF8+lYKfd$@)q<54s{XineKSS00000NkvXXu0mjfOfQuu delta 190 zcmV;v073t(0?q-D7=Hu<0002(-QrRJ000$GOjJee!hG$=hw#po@z9y^(xCF!sPo#c zm2-B*0001VNklIK2ho|4%qm%xYFE8(yB< z&-aGK@KXk&qY-m5p^sWo97XgHQE=EA2Wnu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o#M8dTWG!SvEF~|&RfA1t!`v~UFXntKCiL(83#;!Y z^iy*_wjaG~2LD>7B1Rp)cqrML?sU6wuZGjuDzEZVNLSe^pN!5BvG@8;w~Mp6#o+j; zBp}tW%8_OVZhquKvr*W4eSlm?)ak4t*AYTW^7A{bMyn(o$8C}7XhoP}G0g>k09-Gu U+m2yr0RR9107*qoM6N<$g5{F#tN;K2 diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_trapdoor_side.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_trapdoor_side.png index 444c54bdd07d6f4103e672ee5e54b33d22b3495a..e53ae5a0fa19e80088cb892d905a25b2efecdc38 100644 GIT binary patch delta 493 zcmVmkz}U^f*v`Y*&%)l-%A&lZ5&!@I0(4SNQvml>N~(td007%b zL_t&-S2d2=a({wA6a~+XJ78dpOALudP$U;H3JwgT!7a=G|4|++UQcy(9~6zWwbRG5 zP8O4~Cm*ov?At-eNu2P<$S*!I9At*^*mrEJZwo(f;x>&O3W@%RNqC18CwFTyDxgBx z3)BvmXk${v09RzMq{dCfT?POkwAT8F%QY5sA4sq|qh?erYC^1; zMw*IFpJp$hU^1d=F{5iTq-HCnWjCc~ET&~Ere-*&XE~{1FREfNs%S2%YCNlFHmhkb ztZFc>X)>>AEwP+ivVlIcZ8@}VI<;>*#EwSGl}*cA7X;yl3gXX6e6d>A`8~*^BDHYU%VC0 z!ENiqYwN>o>&0;F!ffosZSBNr?Z zN~(td008hwL_t&-S2d2=TLEzxh0m9Li%FC{RHSUln15;cjjfQfN499tX!-xIyYS5I zdEV!J4`fZlp%ggPVJj}G_?+atYQ<5?Ch@%D-6RkZF>=;IW(?Pmkz}U^f*v`Y*&%)l-%A&lZ5&!@I0(4SNQvml>N~(td007%b zL_t&-S2d2=a({wA6a~+XJ78dpOALudP$U;H3JwgT!7a=G|4|++UQcy(9~6zWwbRG5 zP8O4~Cm*ov?At-eNu2P<$S*!I9At*^*mrEJZwo(f;x>&O3W@%RNqC18Cw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NxbxOmIBdCRza%ei*Txp&LCc+0tY%f*q*xO2?7bw&A*DxzmCnoj?KW3&b)ihzKG7hhR(r{&%lb$!ko{;p3lXr z(8Y$(#f;F#snEu%(8jCL#;MWAuhGY_(a5mUzmIz}w}0XQ000kkQchC<0RaL60s;dB z1_%lg_xEkMC@}y40N6=HK~xwSO~Gd)LQw#K;g^g^3K?0Y?7dwXMMhDQL$1B)+WR=i zpU3^=d2j(P{=2%^UQe4_=GtNA;QSWwc&mK=`e0jg@8Ixk9N4Qyk%cUZ?h# Date: Thu, 12 Jan 2023 03:28:29 -0500 Subject: [PATCH 069/105] temp commit - brownish, rather than yellow, colored palette for bamboo things. --- .../backup/mcl_bamboo_door_bottom.png | Bin 1967 -> 0 bytes .../textures/backup/mcl_bamboo_door_top.png | Bin 1990 -> 0 bytes .../textures/backup/mcl_bamboo_door_wield.png | Bin 3920 -> 0 bytes .../mcl_bamboo_bamboo_block_stripped.png | Bin 375 -> 299 bytes .../textures/mcl_bamboo_bamboo_bottom.png | Bin 516 -> 425 bytes .../textures/mcl_bamboo_bamboo_plank.png | Bin 277 -> 188 bytes .../mcl_bamboo_bamboo_plank_mosaic.png | Bin 256 -> 166 bytes .../textures/mcl_bamboo_door_bottom.png | Bin 1967 -> 2557 bytes .../textures/mcl_bamboo_door_bottom_alt.png | Bin 1966 -> 2557 bytes .../textures/mcl_bamboo_door_top.png | Bin 1990 -> 2912 bytes .../textures/mcl_bamboo_door_top_alt.png | Bin 1982 -> 2913 bytes .../textures/mcl_bamboo_door_wield.png | Bin 1392 -> 1762 bytes .../textures/mcl_bamboo_fence_bamboo.png | Bin 205 -> 239 bytes .../textures/mcl_bamboo_fence_gate_bamboo.png | Bin 206 -> 300 bytes .../mcl_bamboo_scaffolding_bottom.png | Bin 363 -> 216 bytes .../textures/mcl_bamboo_scaffolding_top.png | Bin 493 -> 318 bytes .../textures/mcl_bamboo_trapdoor_side.png | Bin 650 -> 518 bytes .../textures/mcl_bamboo_trapdoor_top.png | Bin 628 -> 518 bytes .../textures/mcl_bamboo_trapdoor_wield.png | Bin 684 -> 389 bytes 19 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 mods/ITEMS/mcl_bamboo/textures/backup/mcl_bamboo_door_bottom.png delete mode 100644 mods/ITEMS/mcl_bamboo/textures/backup/mcl_bamboo_door_top.png delete mode 100644 mods/ITEMS/mcl_bamboo/textures/backup/mcl_bamboo_door_wield.png diff --git a/mods/ITEMS/mcl_bamboo/textures/backup/mcl_bamboo_door_bottom.png b/mods/ITEMS/mcl_bamboo/textures/backup/mcl_bamboo_door_bottom.png deleted file mode 100644 index 286cdd381a2d74b3af8e38d950bca77b07bb524f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1967 zcmV;g2T=HlP){Hd!N1bTHpHKi>FJ1&qJrb`r2D}9v(e-_{OWl7r*{2 zQ+0CZ@b53*{^nm!R~>%-gHM+WesKHnhd+JoZ;$e4Kl;AUedW3J@zLEo$KQVG^e5l> zBm#Hm>-B@fSO4^%WjgrA_g{YLTc3K@GdKSH>%Sg#&0p`H#h<>&F0B# zU*_jvfr!xZdq1#WpPDmqY{koJ+1|T-{+=fmMjlcX0v+AEx7e$@3n%h7-#oqdV0-`Q ztiRaRP4uzvEa>*w`ir=K@9@^VIr!M>UwH|o>~<*-FBY>sK9{nLtU!n{ZU$VRH92Qh zt%e)##PuiReWIc{J3-B~HcLj{0{ z%&e~K7$Zahxcl~^CrWMGTA$sWtAwHOB&9?|FFd{X!iSz;pJ07*yx%U4&M$VQL;x1Y z7J58pMqqLP9_oj8-+J&Z?ShsCk!~Egy+I|&MCbzry&teKU+tqwtgIL-6T-DDJb|YT`FzOg$Bq9LrPPt#1jXxj2tvoakuTIFP24Hjm=FWV&-uiq|dI^ox=@Afo_-8qKq!$4ES=n+~?wY zL2fL?R5~j|%kMu(i!vL>u@rG8+G__Jn#HWDD$7b<#{_kEvlL8}OW@mwo4b#SjKg}{ z58E>K%0$$4T?iqiB+dekP2G({Z0oDnmP}0up=la-UnsY!iZK$AN4`2^5y4|k(}+mF zgDROB5n;lF%H6|Yvs6(dzs?3Zg zBEpkZL_KIAREg^7DLAX;5Q6m`VoyYTDbt70IH(6jZmk>>!IIdKfqsV_gqZ;_vs=||`l3n@H;W{(5>;hp)e=K_;tECeHsZZ5{D zszXf7A`(K_3_FXAiHNv+nh=pqn7OJd07PVF?jB$vIwtOJW+8;8N<{&IQW?F73r7%u zkz#5SKo*&U66R8Y#4BM04b$i!1etr#S})YbjjUS+G4~a>`-zkuHtNF08ZDB z5Ev7lL?Kt!@{ug8}NCfm(ywLyv002ovPDHLkV1nIC BupIyZ diff --git a/mods/ITEMS/mcl_bamboo/textures/backup/mcl_bamboo_door_top.png b/mods/ITEMS/mcl_bamboo/textures/backup/mcl_bamboo_door_top.png deleted file mode 100644 index 8aba3c825e77c61dc8bcb2603c0f527484932ffd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1990 zcmV;%2RZnOP)^CwQT z^4fV`c;OTeJa&|4fAVP-7D_IhJ5_|9XO- zeff57y?sAt&#v;w!v}fw+!i8gFfp)WC~VEv84XKR4XTR80MLXM6O|BVq?8a5Qr!{_ zETq89*H~-GjYVU^5Wxz@7`*qWM$|%)6aW#S$_h%C;n)^cMO7(^f|L>fDJ4{Ou2e)Z zrUMm1z&VE+Xi1m7aZ#+bgb=XS&d)>yRmC}nwHAq@SR;td+1xT*TNXH%VT>UUJMrlJ07&dc5v>lMV@T8RRK4)4tq%cEci&4cILjsB-qhIBSLJ|-Y z5tDGLN(g~g6OB>&c|J#Z*Jr;73Lm*2tQZQQTE2s~Dcto*xDT)bC5F-NTiJI9VBn&& zmT!S~0WUr9T||T!y3nV8p=GR{51;$ZuSg2sSumifdmyQz z3f>9Y9gvb@MCJfADet}abHut~*0gvFII!x;jK>*=YnldtXbh8$HC(m>H51GwZ2r*w zkG@HO|3RMq&c_s>O*x2SgF%c#QcF`uLYt5*%aBVLGaL@dvg|U#{NJ)|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YxQ4T)MEeu00{s|MNUMnLSTaaLyoWj delta 348 zcmV-i0i*t_0`~%tB!8SxOjJc@aR6*}0Bm;vZgl{0cK~sF0CRZ&bA14KfB<-c0C)1jSPp54Tz8tiH{J8kbe=1kP?fL6N{4+itz^kCqmYm>7_l80001%NklQf z7U?L2?#_Hc9aX7C2ooRU|IQ71p)3bFvWkskyQYq^qxB{f)G@DF$>=?$j?cqL&g;tP u_`Oe;RRj8F6_Ua(EeXc^Y(k8FYLZb$l6j zeHnOt8hU{ldw?2!cN%?q8i9HlgMb;Oo^q$5cBrCvsiJtPqJMd+qIs&Lda9#)s-%0X zqT6FM8!BOYSXa^p(OE<)c=2&3(x88U0jjd>L%#HJe=zBlU|7& zMM#z)wHw%+NPoZ`!yRx(<)uK6J3$U3e6fbSuOZDujolax#@HFQl=CgLRzqVgG*fvj z-+()d|CExdgapwt=^n_nXIARHt_vpkncpxvBRB8E^ucoa4i}k t_bZ52Lkc2qy10CQuC)5N4-c>M2S)WOg>Itv$p8QV00>D%PDHLkV1k!$wV?n2 delta 490 zcmV`CdpcQhG-h)dZgUxHbs1=Q8FhRa zZFm`Ibs2Vn8HI`&c!C;*h8cK+8G(fvdxjZ%h8k;h8i|k^hJ_i5i5Yl(8is}$h=>|! zZy9!g8f$$Sh>00{g&BH<8HkD*d4m~ka~Xw)8HtG*hld%8i+>u0h#Gx*8f$tQfQA`; zh8lc@8H0uyYjYWNd>M<18gX|SdW0E=i5Yi+8F_^nYk3-mh#G@{8Dw!8gM}G-gBgT| z8GnZvad{eSaT#uO8GC>lZE_iXcN%wn8G(8ka(Nnbdl`Cx8Rhvw^8f$<32;bRa{vGi z!Tk07*qoM6N<$f(cv5F#rGn diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_bamboo_plank.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_bamboo_plank.png index a58f4f7d5503f73df52ca03f881434691ca6b37f..93e5d95b8f70273dc907edc30ccbbdcba1819b1f 100644 GIT binary patch delta 172 zcmV;d08{^!0=xl`7=Hu<0002(-QrRJ000|MOjJdon}fW$sJ*(W!@#k`!Lr4|v&F)+ z#>2G6!?lz!TTlQ109;8#K~xA^P03LWgFpZT(E$Z`DM7&n2OI)8b`8)y3ANpirh)l- z$-uv3TUWW|M*m1TbpjK>fE8CO5432v^7~96ZEAY!#$1*%za>;)07k${ud#5_YixAc ayW}t6GbMM706*&h0000f z_R)#<(Te%us`=ro`Qohk;;s7Pt@`4w`s1(q`sKFz z=DGI!6T1Ka0EJ0JK~xx5WzRu!!axv1(MC1_!`SoNs2T2m(ta#LL8`3fTS%plu9BqC zbeSYY-k#5U-+K1Fax+J;U(Ov219-&g+o4HP;KZZ{m@JNvwKoI9X)vLaG)wxCG@qpa za*Tuq9?21w^}a5BZA-f?oox-h^ZD{OTOK$m2weZckyNAba3)Z{(&!C~8LZBC00000 LNkvXXu0mjf5&w<* diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_bamboo_plank_mosaic.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_bamboo_plank_mosaic.png index ea0f2d5658e675e53000fc27def27df706d8dfcd..35cb77648e467c2bc2218726b476deecd5073c1f 100644 GIT binary patch delta 150 zcmV;H0BQe#0;U0w7=Hu<0002(-QrRJ000tDOjJdon}ea7gxt=v+|RV#(6!yrwnY#m zwEzGBPf0{UR0tgf!9f86F%Sf>LBitX9(6$f3~l^dA<4{)?`jTq&yxeytb^ZbUhf&z zfNF46b8)ND-FarByAX9CtGk~|c6FYas6tdBs?PQY40a^d?GN9I%>V!Z07*qoM6N<$ Eg2OaHi2wiq delta 240 zcmV_qlBt)SvAY2BoAPF!#gcHz@Zm1=K&0cm?>mEx+rsLJksUZ4oA z=aK|0>=mcn7|K?ibNj#ms&2&@n!+BGpa3)==_N@D+nP*~b^-xB-uCMY8#K0N-qTdY q*y_yx0}vn#21kMF7qCCDhvE+zfC=Fhva^u@0000830YMM$Mp#kyt5rj=030*Odbg=m~sB`A#$4#dG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MDb1S8_mmTnVdhu;?+0>ItX na)klxW=zCxry64+gE0OFx>+45aGHQ800000NkvXXu0mjfLc6k} diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_door_top.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_door_top.png index 8aba3c825e77c61dc8bcb2603c0f527484932ffd..e8cbcf666fc6f07693eb02f414bfae2ab33510de 100644 GIT binary patch delta 2906 zcmV-g3#IhN58xJ%BYz7gNklcQi|UfeEErIxN+YcpSk~jP98bLnUlx(hv#2m|K97U#XdLR`avE!@C2Xu_?;MKzyn`; znm_!#dwJ{JF|OIYk8eKz5=!a7Qn$D{|Cx;DS_qF zr^(`!s;ua)uYWKc^sx+uP>QA1MGUXT)YLe`;RwsFF*Y&HdUq4Ywy~WW>)mzQ4UZRo z@*_Hp7M)gy(Pod(4=IzFG>IvS0x1MaX-LPiXm_SKwQ!tzbBvYMHKu1KNa7GFHC)R= ze{nAkRjRjbixw$TlpxX5vv9)+mL)0oo> z3pkceQI(WZu(rN}GBn1gFC)$pOv~i#>2sW2US)E22XnI%2u-rO-o-F148y|lYFr@G zAZEPQpno;H4PC2fOkBaX*?F|Wq0k@jWbkLlI01?tx;t;P0J>$3LK|~t_zl5 zdxQ4)H0^esbL%5&wuS51%uhC$x~xt2%sDLE#?S@vFr+L?q|!BXQ(;*qmadV8J@)V4 zkEFygEyB@=?jS|e6as^djXrUuQD_RcHOA6P7k^C|WwyQ z{eVnJHv2v5^(Mn0KuXEPwjF4i#;7-9XUE2J9D-oTSf`1u1XKb8i4u}93`mj;ndb${ zFn=&?8{2W|_4^$C*-I$LrWA@Gj8RfB)~@5ZHAIo4Nt3FA!R7{(g5E}tJj?0!x?HjQ zI&8zjX}Jvi5owmv8Ec_ylC&rYhkeL%!qEt&G*qkAL6$KW^G;ych|(()nTh@PJeWPbuLl!>UdtA!q1qQYE$<-q^J-=AO&Pu zj=KEHdDgm1%+)|ITM)w*1LGcZr#uJ477$g=I|9A8e9EF%wrz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H{z6*=?L1)e{2hIig_8-IKFY5G|Y z5y3gfg|p`wPsX@vG-6}DCia#0->@6RAjTpBY2=6n==1`(h_QmjA-3WCS`D_r(rri^ zCQ#%9cI;nfhcey6^ujvJ3#VzEVc>_9gC6xPV6u|FM5fg)q_q4OsYS${^#tVJ00000 LNkvXXu0mjf@>k9+ diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_door_top_alt.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_door_top_alt.png index 6aa951c2613ad7b78eccb522b6fa5da5ab87c123..8e183256a4696f74501d8319f12370d28e4162a3 100644 GIT binary patch delta 2907 zcmV-h3#9bE58)P&BYz7hNkli&?URxT}g@s*k z-C=iF=6z@G>zsSu=hq?GCT2s^&qw_Fp&5P6+pprl;cI9%e1BeBS>@i(e}!K@bddMm z@JpO{z_5tqtgPTcZg)e^TYus_$$9VFwedR%8Z}QZWKcrRn+3alMdR08vWwW!**u*rBTV*f^n3@{L@~bSbFCmn| zu@r-TkIv>Qy3}NG%F5}}lz?(89C_m3C;(ZjR&X2#txJlcpoj~$x)I+$@&e!gk4H(1 zl70|inTk;y5v4JsC`BrVZZDwOYLjI-Su{lIj69C84SxfXmsA`FDGic%#PrMrtLq!o z8e_b=c!E}Y3eRzn?C|_5mgQhs4(pp8gdv%monUfyp4V2^dF}LBY{w?f62_-5Kv@PG zo2!&kQ0NlRF*&`sNS?+NLQ`q@#6^y2nbaFCoNAScT~oaGH$FgrFyOUUPjd9R|Dwoq zWLcKPgMSg0DR5ku&Y81JUC?4-vQEWwsk#nlHv?L&8m;kZR$l%orYZ2eDw!^5I4(NN zQI#rLo}hF|8fWBL$tcVy3@{3hU9$_+CoaY`G|kyvj92TVVT>$wi4>ANOUbf`t?e#R zk}=k-V_7!JP`tXGp^Jj;P6ug9@}j^{7R#$0Du2x}3PTZVgRQL|0t>@XbowcyAi%R7 zBqfIrA0{1jaZCfpu`z9hG7V&sWQ;~3N=PguXo0B&W9+ab?#x?5c+1^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&6p)! zL2fv))F*`YuvWCgxI=NtpJ*?F%ur|79@Lnp%t!CL6!~JTK@+s49N3d`>yKd z4EiO*)n)SD0K+Mc^}AS`@$3`dXE+)%I<`zv6x{WR?{aag=Eq+>$Li`~vVU&L!(V!g zkKKKaaUJP~9v^@3LC7YYxb=SSIJ3aRcU(jM);1TPdIeYSuxv{38Qw)E-eG?6>%Z~h zbB4{Iy+Tj_lw3Fb>g8QduMKgrMt3d7SfVmm1G(D8s2(vTl7O}aue}L(-o8dJ8UFO- zBOE$8;?&AfUijC4dE$4^lYfk5?W!U3^M`qH_Z^hlCbvW8ssgj4OSX*VXm6goKDf$w zYllC+^#Yx)rK&25qChf(*o-PSEcB`=ooZYY+1}pf=TH8I2kyU(m!5f=wX>^q`vw2J zw2SXJ*5*bWIX%z0^JmGGV7~KvA_JUrjK^ctoN73vY6is)*Prfl)qk+zy(dSM9nD}k z#N>i4b3`k?@Zc?6+?pWSHi)LQ9j-gN#M1Ht-+JV641&Uf7@B56Gmb2V$cf`4l-Wh; zntN}&hN$O|l*nw3IeYdvXO0co*+`HZs;a{Kw`ppqCz0GMe7=YdTU1p=S(fbVOh_r= zoTFcKD30cAY+M2kU4QmJVlbLV+nk~_6h(mwiT}L*DpxNaL+cJoDNHBJsEUHDsOc1u zcXZQ0Wk&Mx4J~=CUlWe4Tt;>o2f}8`_-pT00000NkvXXu0mjf Dd1$sW diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_door_wield.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_door_wield.png index 8fd32398c59d99d3baf95aaed1fcda0b6cfb1f6b..8c9daefc5bdbdc0f5bddb2f34f882362682da510 100644 GIT binary patch delta 1747 zcmV;^1}ypT3gQirBYy^|NklX*(WigMUsKld@wT@pK zFqBFW3yD1R@P8v{;Sj4O8>J)Tg%b>K7$Fw#Wp!?rWFkUOG|JxFHgWyphlsd%zSliq zV#iK&HN=(cm+&N&bYF<59-(Y_WNyx}kX=FyNAXP$#}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r4@0rg8BvOwjs0jC+{y2A>fA$(VN=7Uct!s!S6~?~higrFD7J&l?7x4(Ax(4;rwGQ(jkOy+KAqFf5;;mn*L5rp z$A|=K0+XSE_4I9pwMN%<92$W9ERmo&~ld4qu%E?hOLI{}dpsKjF=wL74EPo7* zGAb!0uFs}~D8#57J${sV+mKQsXe39;5D`Xumq==)-f8C@W`?oAV6n!##0{(HJ7qp^ zS-pFLcRi*;Y!f-kE^Pht-w1&_Dsku&UDwf-kWyl2dmE8NN(m96HAj2Hj4UN1^-fHV zh|u*7ed=(7QXMN7QB|5P$IR%>cz^Es7b#>+Cyo%vQ8GLkcj*xIp5>w>NJ2!gwxKr= zO>A6UNBOS=8`q~aT}$mslgLtbVcr^dSSmo3)c2GFLsd~JNnJoh5E1rRWG+q@fN10> zyD(XvU{NV6C0Pp!PQh%xjl07r0Y*xRdD>z=>j^GsD9KSW8td7d-Xeq=n^!vlCAd-+ z0|vttLI|8Za0KfecW0xoiDo2mwr@|#Q8L6p72J%Z;O>}rhzP#WU?Qw6PHou--7 g1jXIiZf4~C2f?0QA?CyGIsgCw07*qoM6N<$f-=I9`2YX_ diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_fence_bamboo.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_fence_bamboo.png index 1988002757941b2c1ef58a378087491f3a72f917..9870636418c040d75a8f171949212c695e1cc362 100644 GIT binary patch delta 211 zcmV;^04)E_0q+5jB!47OOjJd*tCY8|n8v@X#=ot|z^}-`ugb!)(#pBi%)HjlzSz;h z+0w%>LfP^F004$bL_t&t9Rkpu&YS}OIA}*t!0;H#NYVig;0a9FjRS7P z#KhOBLmBAh{64Ho-=-dd>ajOff^*z`99t|)m%StLdn;chflStJ!PtY0TVNlNR6j#a z2ds6)bGd`;il=k9ou)F6cE5Xn3}NC4OZfIpT%Hp$ez>^lGe N002ovPDHLkV1i=RX7~UA delta 177 zcmV;i08an!0nGuBB!3l9OjJeZu3752bMVWS@z0&|(xmd%tn=BkhS2UD0001UNkli?H9vwM@ME@mt7p`_L^Al(m-w_G6cM>j3e6v{whu5APGtRkOZ@5FP;rf f_CgW>Y69>F59%H_5|4cp00000NkvXXu0mjfH*!tQ diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_fence_gate_bamboo.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_fence_gate_bamboo.png index 76e8dd3e5fb297ae632fcf18ad30b56637c546ab..8dc865cf3830b6a7a0de9b39c8d42fa147832dac 100644 GIT binary patch delta 285 zcmV+&0pkA70jvU$7=H)@0000eEe}%w002}_OjJd}x~0Usr^UUg$G@w`zpTi?t;xZz z%)_zF#InuBv(3h|&BnFP$F|SMx6jD7(8#yZ$+*+Xxzo$L)Xclp&Aiplyw%RW*3Q1x z&%W2szu3{i+0(rDLqVgmw0{_cA!$SO?tf1{Gxbdp zGGa;2+E~H}NI2^m$!40FXm&;rvar=>y8A$rnWK5Di5E24 jZF8+lYKfd$@)q<54s{XineKSS00000NkvXXu0mjfOfQuu delta 190 zcmV;v073t(0?q-D7=Hu<0002(-QrRJ000$GOjJee!hG$=hw#po@z9y^(xCF!sPo#c zm2-B*0001VNklIK2ho|4%qm%xYFE8(yB< z&-aGK@KXk&qY-m5p^sWo97XgHQE=EA2Wnu-jp^HP%Dm3`TsMfD>yfChD-+jIL+LdI slOOlGrfNSHC}G!p8Nfh@VG4xd!r%;Hcrw($7(q~x7Ys`vA|^1!zA(kU z47o7HS6~bmn1OIBoQ03LxLgi&VK7mtzI`|4(i8w=ycXnM$@OLc00008+6~zZp zpGOgY3W>21OY2yOQ7jBLmcECb2tI^`qJ@SPcTKXN#VUySL)OzwbHBNF&TuWeIF?0$ zZtsZpS__gG9-pvK2Up`W>OaHeG~LcFTN~RH=>y)PfbtYcD1T3JMS~(w`3~hNP6?7I z(g!RG*xu^AB(ZaPWsE^*Wlm;>y_Wmef&G0{orGq%eDO5|p3~{Cr>Q|q@{U@wJ zhVS-{kTiDq;8o-hGsCynS|1YCURuV@%$8gC)p|2f+}~nT(;V#Yv9-QgN>rYfUt)$u u0XhG^${vbgc>=OpSy%IA?L-|7GTs0VT7m1q?nMm%0000jSGbK>$fs`d#+vrNiubpE_r8kw#FhBUlK9S;_|cyE%c1$yr1{pV`PR1j(5d>< zu=>}j`q{1e+p%f(1>FDu00MMUPE!E>ES3@@0001&Nklxg_09FRj!6SE)&rPvv1g>wPloB^Z1dl0Eebz$1Q|A})CX@qN z6#;Qa^p=@SW~>%{raP6^DnYhleU5~1upCX!V6aO{U{|%-B;6U)F@>2)RLXzuMRC4y zZsx#OpEbN4t0(h5nk|tPcHMT+g5lx5;s*vSUvY^H9Vb3GO8@`>07*qoM6N<$f_0FM A*8l(j delta 478 zcmV<40U`dr0__8k8Gi-<001BJ|6u?C0kla(K~y-)g_Fx}(@+qGzvEnsh+I`vs?-n?Tm zy8-JR6bjXL0gze~$K9r60<`}g)y4yqf%^Lo$9YaVze3CnwYG~SbE-^qgaQU{m$-P+ zlV8)m#FL(U`Lr(p|BLaYC&{-{Nxr@llG#wqr7tG*1>p1H<4RER-Gnw@2c9jUFGivR zPpXoO_blqblYh)}I`On$nViM((UZJrJndVb^aLGvmeQr4Gsu!x!9@lp^d*@MrA(&^ z^ybkm2FYwFI`C|PVhgtzEWxYo#M8dTWG!SvEF~|&RfA1t!`v~UFXntKCiL(83#;!Y z^iy*_wjaG~2LD>7B1Rp)cqrML?sU6wuZGjuDzEZVNLSe^pN!5BvG@8;w~Mp6#o+j; zBp}tW%8_OVZhquKvr*W4eSlm?)ak4t*AYTW^7A{bMyn(o$8C}7XhoP}G0g>k09-Gu U+m2yr0RR9107*qoM6N<$g5{F#tN;K2 diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_trapdoor_side.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_trapdoor_side.png index 444c54bdd07d6f4103e672ee5e54b33d22b3495a..e53ae5a0fa19e80088cb892d905a25b2efecdc38 100644 GIT binary patch delta 493 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/mcl_bamboo/bamboo_base.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/bamboo_base.lua b/mods/ITEMS/mcl_bamboo/bamboo_base.lua index b8f99787b..7765c4ca9 100644 --- a/mods/ITEMS/mcl_bamboo/bamboo_base.lua +++ b/mods/ITEMS/mcl_bamboo/bamboo_base.lua @@ -200,8 +200,8 @@ local bamboo_def = { local node_above_name = minetest.get_node(pointed_thing.above).name minetest.log("\n\n\nnode_above name: " .. node_above_name) - if node_above_name ~= "mcl_core:water_source" or node_above_name ~= "mcl_core:lava_source" - or node_above_name ~= "mcl_nether:nether_lava_source" then + if node_above_name ~= "mcl_core:water_source" and node_above_name ~= "mcl_core:lava_source" + and node_above_name ~= "mcl_nether:nether_lava_source" then local _, position = minetest.item_place(place_item, placer, pointed_thing, fdir) if not minetest.is_creative_enabled(placer:get_player_name()) then itemstack:take_item(1) @@ -350,6 +350,7 @@ bamboo_one_def.selection_box = { {-0.05, -0.5, 0.285, -0.275, 0.5, 0.06}, } } +bamboo_one_def.groups = {not_in_creative_inventory = 1, handy = 1, axey = 1, choppy = 1, flammable = 3} mcl_bamboo.mcl_log(dump(mcl_bamboo.bamboo_index)) minetest.register_node(mcl_bamboo.bamboo_index[2], bamboo_one_def) local bamboo_two_def = table.copy(bamboo_def) @@ -373,6 +374,7 @@ bamboo_two_def.selection_box = { {0.25, -0.5, 0.325, 0.025, 0.5, 0.100}, } } +bamboo_two_def.groups = {not_in_creative_inventory = 1, handy = 1, axey = 1, choppy = 1, flammable = 3} minetest.register_node(mcl_bamboo.bamboo_index[3], bamboo_two_def) local bamboo_three_def = table.copy(bamboo_def) @@ -395,4 +397,5 @@ bamboo_three_def.selection_box = { {-0.125, -0.5, 0.125, -0.3125, 0.5, 0.3125}, } } +bamboo_three_def.groups = {not_in_creative_inventory = 1, handy = 1, axey = 1, choppy = 1, flammable = 3} minetest.register_node(mcl_bamboo.bamboo_index[4], bamboo_three_def) From 9e76cd963d6cf9e8004a7e8cf9a71cd6f892ab8f Mon Sep 17 00:00:00 2001 From: Michieal Date: Thu, 12 Jan 2023 03:51:42 -0500 Subject: [PATCH 071/105] Adjust bamboo sign color --- mods/ITEMS/mcl_bamboo/bamboo_items.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_bamboo/bamboo_items.lua b/mods/ITEMS/mcl_bamboo/bamboo_items.lua index 31489292f..b28c09823 100644 --- a/mods/ITEMS/mcl_bamboo/bamboo_items.lua +++ b/mods/ITEMS/mcl_bamboo/bamboo_items.lua @@ -193,7 +193,7 @@ if minetest.get_modpath("mcl_signs") then if mcl_signs ~= nil then -- Bamboo Signs... mcl_signs.register_sign_custom("mcl_bamboo", "_bamboo", "mcl_signs_sign_greyscale.png", - "#f6dc91", "default_sign_greyscale.png", "default_sign_greyscale.png", + "#e2cdc1", "default_sign_greyscale.png", "default_sign_greyscale.png", "Bamboo Sign") mcl_signs.register_sign_craft("mcl_bamboo", BAMBOO_PLANK, "_bamboo") minetest.register_alias("bamboo_sign", "mcl_signs:wall_sign_bamboo") From 0079cf807efb27457063d31498a0a74207d1c0ae Mon Sep 17 00:00:00 2001 From: Michieal Date: Thu, 12 Jan 2023 21:06:25 -0500 Subject: [PATCH 072/105] Changed Bamboo Signs to use custom image. --- mods/ITEMS/mcl_bamboo/bamboo_items.lua | 4 ++-- .../mcl_bamboo_bamboo_block_stripped.png | Bin 299 -> 299 bytes .../textures/mcl_bamboo_bamboo_plank.png | Bin 188 -> 165 bytes .../textures/mcl_bamboo_bamboo_plank_mosaic.png | Bin 166 -> 197 bytes .../textures/mcl_bamboo_bamboo_sign.png | Bin 0 -> 820 bytes .../textures/mcl_bamboo_bamboo_sign_wield.png | Bin 0 -> 228 bytes .../textures/mcl_bamboo_fence_bamboo.png | Bin 239 -> 239 bytes .../textures/mcl_bamboo_fence_gate_bamboo.png | Bin 300 -> 316 bytes 8 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_bamboo_sign.png create mode 100644 mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_bamboo_sign_wield.png diff --git a/mods/ITEMS/mcl_bamboo/bamboo_items.lua b/mods/ITEMS/mcl_bamboo/bamboo_items.lua index b28c09823..ff49ca200 100644 --- a/mods/ITEMS/mcl_bamboo/bamboo_items.lua +++ b/mods/ITEMS/mcl_bamboo/bamboo_items.lua @@ -192,8 +192,8 @@ if minetest.get_modpath("mcl_signs") then mcl_bamboo.mcl_log("Signs Section Entrance. Modpath exists.") if mcl_signs ~= nil then -- Bamboo Signs... - mcl_signs.register_sign_custom("mcl_bamboo", "_bamboo", "mcl_signs_sign_greyscale.png", - "#e2cdc1", "default_sign_greyscale.png", "default_sign_greyscale.png", + mcl_signs.register_sign_custom("mcl_bamboo", "_bamboo", "mcl_bamboo_bamboo_sign.png", + "#ffffff", "mcl_bamboo_bamboo_sign_wield.png", "mcl_bamboo_bamboo_sign_wield.png", "Bamboo Sign") mcl_signs.register_sign_craft("mcl_bamboo", BAMBOO_PLANK, "_bamboo") minetest.register_alias("bamboo_sign", "mcl_signs:wall_sign_bamboo") diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_bamboo_block_stripped.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_bamboo_block_stripped.png index 3d89ef07fc8ee90e9ce1ec7d85822486a2ddf9af..f949e51bcf4f670fcb3fc12d2227d0eab41acab7 100644 GIT binary patch delta 110 zcmV-!0FnQz0;>X$DP*6PdZC$oqL_W6nSG<0ex;j$rJRALor0*Jg{h#1siB9ep@^!Y zh^wQCtD}mnq>8Pii>;)Lt)+{urHrnojIXDSucwZ$sE)9xjs*X$DP)|Mex8|tpO}H4nSr31f})#*qMU`Jora~KiKd{6rlE_cp^T@Z zjHsiHsH2Xlq>iejkE*1Qs-=&srID+qk*ueZtf!N#sFSUzldY(guBn!=s+X{>}p`92?*Qelh~{+vs6ss#gWxuHKr43r=-7fDDjOJ=G85 r0gxbrcEjO9sYfll6%w$)&*uh*q9hNwnmWAz0000cTz; delta 160 zcmV;R0AK&50lWc_B!3%FOjJdon}fW$sJ*(W!@#k`!Lr4|v&F)+#>2G6!?lz!TTlQ1 z09;8#K~xA^P03LWgFpZT(E$Z`DM7&n2OI)8b`8)y3ANpirh)l-$-uv3TUWW|M*m1T zbpjK>fE8CO5432v^7~96ZEAY!#$1*%zf@oVM!-t1v2fCBY#DUfyW}t6GbMM706*&h O0000LBitX9(6$f3~l^dA<4{)?`jTq&yxeytb^ZbUhf&zfNF46b8)ND-FarB syAX9CtGk~|c6FYas6tdBs?PQY40a^d?ca*c00000NkvXXt^-0~f;b~S$N&HU diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_bamboo_sign.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_bamboo_sign.png new file mode 100644 index 0000000000000000000000000000000000000000..d688ae0023ae44a0f9be9731782365e6842926e3 GIT binary patch literal 820 zcmV-41Izr0P))U05DSkF;oCDRRc6u05w+tHdp{SSpzs-2RT~>I$H!fTn0K^2RdB_I$sAoUI;y0 z2R&a0JzxnvVhBEA2|i;8K4S?#VhTZH4nbrIL1YX#8BKB&PH`4a zbQe!?8&7c@Qgj|tbRSiBBA&Wnp1WY-$eiNHo#M!zZU48nf@l8duSCHrm)JZ+*uWLQ&{C!{#20XIgJSs$UIL|UgXp#L?H7b z9crYrAWdO4ICVpMQW&OU)p=}jpuO>%Mo1QSnnfSfuv*+{7Khr2T@|K8mUQPz6k$q? zn*K>yvXV(sgjGbaWFeEJDpnEUFIts~DTEZolu~boY6`_rt7%BXf%e)yEwrYmTS1zx zvdK=Xx_h|g^KmK%-QB-@p@P$%UbiM8$^l#j!eS!?ePOYf=-ZYFo y#VGq-ukIC}^ZohRQ{URAUA3FHF5fQxw|)mKdDT6897!?&0000 eFa|S>0R{lvF(0C1l(+u?0000UN*#H0l delta 50 zcmV-20L}mJ0q+5jDJZn7l((;##=oq_zpco?ugJl#%EGbI%DL3cyw=XX*wMk+(!(%9 I+47N5o-j5cY5)KL diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_fence_gate_bamboo.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_fence_gate_bamboo.png index 8dc865cf3830b6a7a0de9b39c8d42fa147832dac..709cd73104a058ad67710e6ef5a43e83e886baa3 100644 GIT binary patch delta 289 zcmV++0p9+s0=xo{B!68{OjJe4x}3?opUb_V%)g_|zogE=q|U*n(Zi_H#HrK8s?)}+ z)5fgS$F0@JuGPq`)yS^a$*$SXw%W?B+sm-q%&*(bu-whD+|j$;&a&Opz245V-p{k& z&$Qstw&Byby_9$>0001*NklF&(So8{4>( z#Xe$VF`a=OkHGg0xi@Dm?MN>oUhyu_7yZ=rDLqVgmv>1dTX+!kxe@{L$^?ywgGGa;2+E~H}NI2^m z$!40FXm&;rvar=>y8A$rnWK5Di5E24ZF8+lYKfd$^7ID| XbrI~D?s&xj015yANkvXXu0mjfTt1Xk From 2fdc8cbdd496aaefa1738a7d737520fd4778e9d7 Mon Sep 17 00:00:00 2001 From: Michieal Date: Thu, 12 Jan 2023 22:12:05 -0500 Subject: [PATCH 073/105] Changed Bamboo Sign's inventory & wield image to match the placed sign. Reduced the number of images that trapdoors need to work. --- mods/ITEMS/mcl_bamboo/bamboo_items.lua | 4 ++-- .../textures/mcl_bamboo_bamboo_plank.png | Bin 165 -> 150 bytes .../textures/mcl_bamboo_bamboo_plank_mosaic.png | Bin 197 -> 165 bytes .../textures/mcl_bamboo_bamboo_sign_wield.png | Bin 228 -> 247 bytes .../textures/mcl_bamboo_fence_bamboo.png | Bin 239 -> 235 bytes .../textures/mcl_bamboo_fence_gate_bamboo.png | Bin 316 -> 297 bytes .../textures/mcl_bamboo_scaffolding_bottom.png | Bin 216 -> 205 bytes .../textures/mcl_bamboo_scaffolding_top.png | Bin 318 -> 284 bytes .../textures/mcl_bamboo_trapdoor_side.png | Bin 518 -> 744 bytes .../textures/mcl_bamboo_trapdoor_top.png | Bin 518 -> 0 bytes .../textures/mcl_bamboo_trapdoor_wield.png | Bin 389 -> 0 bytes 11 files changed, 2 insertions(+), 2 deletions(-) delete mode 100644 mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_trapdoor_top.png delete mode 100644 mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_trapdoor_wield.png diff --git a/mods/ITEMS/mcl_bamboo/bamboo_items.lua b/mods/ITEMS/mcl_bamboo/bamboo_items.lua index ff49ca200..d950f4abe 100644 --- a/mods/ITEMS/mcl_bamboo/bamboo_items.lua +++ b/mods/ITEMS/mcl_bamboo/bamboo_items.lua @@ -80,12 +80,12 @@ if minetest.get_modpath("mcl_doors") then description = S("Bamboo Trapdoor."), inventory_image = "mcl_bamboo_door_complete.png", groups = {}, - tile_front = "mcl_bamboo_trapdoor_top.png", + tile_front = "mcl_bamboo_trapdoor_side.png", tile_side = "mcl_bamboo_trapdoor_side.png", _doc_items_longdesc = S("Wooden trapdoors are horizontal barriers which can be opened and closed by hand or a redstone signal. They occupy the upper or lower part of a block, depending on how they have been placed. When open, they can be climbed like a ladder."), _doc_items_usagehelp = S("To open or close the trapdoor, rightclick it or send a redstone signal to it."), wield_image = "mcl_bamboo_trapdoor_wield.png", - inventory_image = "mcl_bamboo_trapdoor_wield.png", + inventory_image = "mcl_bamboo_trapdoor_side.png", groups = {handy = 1, axey = 1, mesecon_effector_on = 1, material_wood = 1, flammable = -1}, _mcl_hardness = 3, _mcl_blast_resistance = 3, diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_bamboo_plank.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_bamboo_plank.png index f19b513bbe5be0a99ee3b5ad4d4ba3276b8921ba..86653c192a45a14d43523397b472f917c0b933cb 100644 GIT binary patch delta 121 zcmV-<0EYji0hR%fByti^OjJeg$er}tzVzF_^xVPp-NNN`(2!6DI3pAafGPw)su&sIA_ztZgb9%csRQvqf(V9*i>Zr=ai|Me1p^Zh b<2DBXGj$&YnL$zw00000NkvXXu0mjf7ZER% delta 137 zcmV;40CxYD0i^+uB!3uCOjJdrn}652j@P=5;m)n$&#vOouHw+I;?S_ph*bpu002ly zL_t&tTYb#25r7~Rz|i0X>>}p`92?*Qelh~{+vs6ss#gWxuHKr43r=-7fDDjOJ=G85 r0gxbrcEjO9sYfll6%w$)&*uh*q9hNwnmWAz0000pwQ6Z(10KXC?hn0K{W`-2viMVU|?im0E>jeq=1Yd7$XGCFg5_1p}+u9 r2vP@P1c4cGkwFe2$PU_7+|0000YpF_)Dj-RZUy>NG(=)M?*u0&O?C!tpeh%!e hCw6}~c9$bx`~xVp2S5}PIL-h7002ovPDHLkV1jhmTo?cV delta 195 zcmV;!06hQq0ptOY7$XD&0002(-QrRJ001XYOjJbx007agVdTq}<;1UqA{a^fqVCyRjXF-UI0`x=k%)G xyB2_qVlsf5$)W&du);)G;UX{wGmHTS6#(2ZAEINFxBmbD002ovPDHLkV1jzVP9*>U diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_fence_bamboo.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_fence_bamboo.png index 6a45fbf015e98bc71f040e5ac381a44bf26dc867..6428e93ddca855fe33e4dc03ba94be209355bb9a 100644 GIT binary patch delta 207 zcmV;=05JdW0qX&fB!3}LOjJee*1GK0yY1M%?$ovM(XR5;vh&%y^xD4k+`;wU#P#3C z>WzHt0001mNklgJ!2Xh%B1+$(h90ParAI^n7z@v$|e z13jhRheg|Ws)wL@>{FGH5_cc^4)fd=pGf@PDmO`>b*nQrAV|aN*aU2tBbv_j?BNJ%)g_~z@^T?rO?8s*~+fl%&^|hvf$CR z;nKGv8n5vH004$bL_t&t9Rkpu&YS}OIA}*t!0;H#NYVig;0a9FjRS7P z#KhOBLmBAh{64Ho-=-dd>ajOff^*z`99t|)m%StLdn;chflStJ!PtY0TVNlNR6j#a z2ds6)bGd`;il=k9ou)F6cE5Xn3}NC4OZfIpT%Hp$ez>^lGe N002ovPDHLkV1gYhW`zI% diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_fence_gate_bamboo.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_fence_gate_bamboo.png index 709cd73104a058ad67710e6ef5a43e83e886baa3..1a5e866c1db629dd7587f0a6eac1aa80c75584c7 100644 GIT binary patch delta 270 zcmV+p0rCF40;vL!B!5m&OjJee)VJ)_x$M@t?bEdF*17M^rtr?E@XxC7*17Q4y7ADg z@zSsI*SGW6xbxV#^Vz)f+P(DJzVzF_^xMGn+`;tS!u8(7_1?wx-^TUd$6R=hO#lD@ zmPtfGR2Uf*!2v=7K@0@Jpusqx!Na{t^Z$>!R>cF`xQop`<9}c?U4YFQH>xB$>F(qn zKRll*Dyfo)SY9(j<^1CaIWxyK%%Pk_shK z75Dfi-`c3@%tWzRl2M}##mQ_`GaE;IIWrg4?q11zw6#&~rz9e7zHTo0y7}V|mgo;i U_$0EP00000Ne4wvM6N<$f_0001*NklF&(So8{4>( z#Xe$VF`a=OkHGg0xi@Dm?MN>oUhyu_7yZ=-5q%=Y8W z_vFuzs?FH|0004WQchCp8Nfh@VG4xd!r%;Hcrw($7*LTH3`-y)CNRamFg3-#47o7HS6~bmn1OIB qoQ03LxLgi&VK7mtzI`|4(i8w=ycXnM$@OLc0000G diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_scaffolding_top.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_scaffolding_top.png index 8adff6e0c1258f8f2e3849c5fdc8daea5ef05d4b..0c3835690d48bdf2e311cc450d355101dd240b7a 100644 GIT binary patch delta 256 zcmV+b0ssEK0-OSnB!4_mOjJbx008*s)v|Y6vUps?mx0BXg3qj)+P$&m&AsW;!1m+K z_vFv_=F<1()A;Ar_~_R7=-2q^*!b$%`Rdx8#(Zf20007XQchC<{w$UfBLDyZjY&j7 zR2Wx1PyrIdAP8eJb!I7I_y4~RX*W2O+$BhqNhKU4C!v^PA9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Bi$h*|Yyw%CP)yciq%DvXgzShdW*UP}z&B55t!`aWm-qp&YyrU8T0007XQchC< z_f<-&hX4Qo+kZ(!K~xx5HICVGf zudUkAja7n^T-kNS+(Zi$D(F#2M8srn-3iKrCkPBM$cd&;80NmHuN&E*iI>73xo@-C teE#~}-gn+1r8h3K{Ojkt`fa6+@*n6H9g}$`a*Y50002ovPDHLkV1o7r2|54( diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_trapdoor_top.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_trapdoor_top.png deleted file mode 100644 index e53ae5a0fa19e80088cb892d905a25b2efecdc38..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 518 zcmV+h0{Q)kP)%O-L<S#AI&W3Ce>f2n;aDiKb5& z=Dw(}8`+?Vm%<;pZ?oBa{`%bBcithTH!idM>*u@rZKaL!ALtexlX)g`jQ{`u07*qo IM6N<$g4K8kG5`Po diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_trapdoor_wield.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_trapdoor_wield.png deleted file mode 100644 index 3260d2cc36bfdd5bebc4874975a7cc0c74b7d2b2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 389 zcmV;00eb$4P)u-dk;+qkmZxwG55wA{S4+`P8ky|>-IxZc3J z;KID%!@c0dz2L;Y;l#e-#J}Rkz~aWiN~(td z005;)L_t&-S7naL5`sV!13NB&!ieIAI6lVRQS|>m&x6IuKBiKgz#qfwpz(GLM>~}D z1DIWsWI8GGY?8bB4lLS2Ui!%7wojlsr$z@Ie%wT$J*DaltW&Q~{YrXjf!K`YCCQYYE8w|x!oX0`E`WRO`s>MM20ZGr jTCLZc&2m1t4*BB?dm0U Date: Thu, 12 Jan 2023 22:16:02 -0500 Subject: [PATCH 074/105] fixed missed line. --- mods/ITEMS/mcl_bamboo/bamboo_items.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_bamboo/bamboo_items.lua b/mods/ITEMS/mcl_bamboo/bamboo_items.lua index d950f4abe..6aeb19790 100644 --- a/mods/ITEMS/mcl_bamboo/bamboo_items.lua +++ b/mods/ITEMS/mcl_bamboo/bamboo_items.lua @@ -84,7 +84,7 @@ if minetest.get_modpath("mcl_doors") then tile_side = "mcl_bamboo_trapdoor_side.png", _doc_items_longdesc = S("Wooden trapdoors are horizontal barriers which can be opened and closed by hand or a redstone signal. They occupy the upper or lower part of a block, depending on how they have been placed. When open, they can be climbed like a ladder."), _doc_items_usagehelp = S("To open or close the trapdoor, rightclick it or send a redstone signal to it."), - wield_image = "mcl_bamboo_trapdoor_wield.png", + wield_image = "mcl_bamboo_trapdoor_side.png", inventory_image = "mcl_bamboo_trapdoor_side.png", groups = {handy = 1, axey = 1, mesecon_effector_on = 1, material_wood = 1, flammable = -1}, _mcl_hardness = 3, From 3091e85b1ce6cb37da0dba4936d76fad97a3e6b0 Mon Sep 17 00:00:00 2001 From: Michieal Date: Thu, 12 Jan 2023 22:17:26 -0500 Subject: [PATCH 075/105] Optipng textures. --- .../textures/mcl_bamboo_trapdoor_side.png | Bin 744 -> 467 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_trapdoor_side.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_trapdoor_side.png index 5255c30601a2b7d723fa5e91605bdbaf18348dd6..673539c9f6f9bdc24440c27b35e98aeadb133f92 100644 GIT binary patch delta 452 zcmV;#0XzQa1=9nN8Gi!+001a04^sdD0I^U^R7C&)0Ql+Ga9v1(Y*UYSTakEOlzU&A ze`1?}W1NCzor7kbglC?FXP$*OQ=k#?(; ze5{szvYm&vqm8(wkhrChxu%i1rjom_1(ku-o*9a#r5CD_20+!;K=si$@byN_TkF*;>-5p%=Y8W_T$d?q8f>XMgRr_kkOAlh*gq>+^0~*%y4z%(RiLmFC-~c6Y2-CP`kGMV>8lQQI*d zdsUDm`Xwe&^&LXlri=gt$VKB?M5R*-3~-?QVm%&C%^3gynO%L47?q&^fdsnu@+8Ki{Wjc7nCl)*IVDf5LOpjre-v zNCJWmfe}HXXh0ow7I7Vr1k{BQf51Q>u7n^2+{EmZph4USLKY$-h>M7EVMGXKGa4d_ zOtdjCGn0AgneMKB?^RtF-4o&>o>f&*+;i_epA43M(o^r9Rg`3tcudGO&Un0sJ1Zy$dL^XqR*+_P;9h+wTDTUldcy+<+Zqva5- zMgTlCyPN&{pF>sgbq50Po;Z%XeCYyyY8rs1Z}8nWUt+99RWV{vKvM(}L<~j*02I!A zcp7)$&`W&%)qfWdORRMqJbWbdmb-pt`_3@_i3dW+Gw<7-aQ2fAd?+d~hF4#I6N4tE z?rMXv#1sj6=6B33NE-FM@9b&%&K^mlzHiUYOK-XB%d+6^b_+BCibI5__dPaw0N?I} z!PSde3^&+RG2CEq^`e?aD_B?aMHxXsjKhH-u8vj(seh^ndFI=*^TKV~ykB2Dr2Z>&x~;zs@0fIhei;n*DSFr@$F8yzIaYeqZLASc{r&N@+;?cvLBBazW?Dz zZr;c+FlK%w?^CPQ0oXCOAR*5-IcVOVj5QWgWU!u7jYi0)Cy(lZ=MVAwQkP2?zNMT<`z@ From 871c4f24c2cc89127bea4a8139531a82033d8157 Mon Sep 17 00:00:00 2001 From: FossFanatic Date: Sat, 14 Jan 2023 10:20:30 +0000 Subject: [PATCH 076/105] Change some language stuff This adds correct hyphenation and also makes things more concise. --- settingtypes.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/settingtypes.txt b/settingtypes.txt index 58fad1dc3..d68b5793d 100644 --- a/settingtypes.txt +++ b/settingtypes.txt @@ -139,8 +139,8 @@ mcl_mob_active_range (Active mob range) int 48 0 256 # Enable flame sound. flame_sound (Flame sound) bool true -# Enable the in game music. -mcl_game_music (Enable in game music) bool true +# Enable the in-game music. +mcl_game_music (In-game music) bool true [Graphics] # How many vertical animation frames the fire texture (fire_basic_flame_animated.png) has. From 60b19b31ab3b1b0d032dc253164d7a586e83b689 Mon Sep 17 00:00:00 2001 From: FossFanatic Date: Sat, 14 Jan 2023 10:21:35 +0000 Subject: [PATCH 077/105] Add hyphenation This also adds hyphenation to `In-game`. --- mods/PLAYER/mcl_music/init.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mods/PLAYER/mcl_music/init.lua b/mods/PLAYER/mcl_music/init.lua index 07e851f26..cd454593c 100644 --- a/mods/PLAYER/mcl_music/init.lua +++ b/mods/PLAYER/mcl_music/init.lua @@ -102,7 +102,7 @@ local function play() end if music_enabled then - minetest.log("action", "[mcl_music] In game music is activated") + minetest.log("action", "[mcl_music] In-game music is activated") minetest.after(15, play) minetest.register_on_joinplayer(function(player, last_login) @@ -115,5 +115,5 @@ if music_enabled then stop_music_for_listener_name(player_name) end) else - minetest.log("action", "[mcl_music] In game music is deactivated") -end \ No newline at end of file + minetest.log("action", "[mcl_music] In-game music is deactivated") +end From 4457432d325d7b4545640bc5ed83c3be271db886 Mon Sep 17 00:00:00 2001 From: AFCMS Date: Sun, 4 Dec 2022 18:34:15 +0100 Subject: [PATCH 078/105] Format file --- mods/ITEMS/mcl_core/nodes_misc.lua | 46 +++++++++++++++++++----------- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/mods/ITEMS/mcl_core/nodes_misc.lua b/mods/ITEMS/mcl_core/nodes_misc.lua index 5f5b005e2..50c683232 100644 --- a/mods/ITEMS/mcl_core/nodes_misc.lua +++ b/mods/ITEMS/mcl_core/nodes_misc.lua @@ -8,7 +8,14 @@ if mod_screwdriver then on_rotate = screwdriver.rotate_3way end -local alldirs = {{x=0,y=0,z=1}, {x=1,y=0,z=0}, {x=0,y=0,z=-1}, {x=-1,y=0,z=0}, {x=0,y=-1,z=0}, {x=0,y=1,z=0}} +local alldirs = { + {x = 0, y = 0, z = 1}, + {x = 1, y = 0, z = 0}, + {x = 0, y = 0, z = -1}, + {x = -1, y = 0, z = 0}, + {x = 0, y = -1, z = 0}, + {x = 0, y = 1, z = 0}, +} minetest.register_node("mcl_core:bone_block", { description = S("Bone Block"), @@ -17,7 +24,7 @@ minetest.register_node("mcl_core:bone_block", { is_ground_content = false, paramtype2 = "facedir", on_place = mcl_util.rotate_axis, - groups = {pickaxey=1, building_block=1, material_stone=1}, + groups = {pickaxey = 1, building_block = 1, material_stone = 1}, sounds = mcl_sounds.node_sound_stone_defaults(), on_rotate = on_rotate, _mcl_blast_resistance = 2, @@ -46,11 +53,11 @@ minetest.register_node("mcl_core:slimeblock", { -- According to Minecraft Wiki, bouncing off a slime block from a height off 255 blocks should result in a bounce height of 50 blocks -- bouncy=44 makes the player bounce up to 49.6. This value was chosen by experiment. -- bouncy=80 was chosen because it is higher than 66 (bounciness of bed) - groups = {dig_immediate=3, bouncy=80,fall_damage_add_percent=-100,deco_block=1}, + groups = {dig_immediate = 3, bouncy = 80, fall_damage_add_percent = -100, deco_block = 1}, sounds = { - dug = {name="slimenodes_dug", gain=0.6}, - place = {name="slimenodes_place", gain=0.6}, - footstep = {name="slimenodes_step", gain=0.3}, + dug = {name = "slimenodes_dug", gain = 0.6}, + place = {name = "slimenodes_place", gain = 0.6}, + footstep = {name = "slimenodes_step", gain = 0.3}, }, _mcl_blast_resistance = 0, _mcl_hardness = 0, @@ -74,7 +81,8 @@ minetest.register_node("mcl_core:slimeblock", { elseif name == "mesecons_pistons:piston_down_sticky_off" or name == "mesecons_pistons:piston_down_normal_off" then piston, piston_down = true, true end - if not( (piston_side and (n-1==neighbor_node.param2)) or (piston_up and (n==5)) or (piston_down and (n==6)) ) then + if not + ((piston_side and (n - 1 == neighbor_node.param2)) or (piston_up and (n == 5)) or (piston_down and (n == 6))) then if piston and piston_pos then if piston_pos.x == neighbor_pos.x and piston_pos.y == neighbor_pos.y and piston_pos.z == neighbor_pos.z then -- Loopback to the same piston! Preventing unwanted behavior: @@ -109,7 +117,8 @@ minetest.register_node("mcl_core:cobweb", { liquid_renewable = false, liquid_range = 0, walkable = false, - groups = {swordy_cobweb=1, shearsy_cobweb=1, fake_liquid=1, disable_jump=1, deco_block=1, dig_by_piston=1, dig_by_water=1,destroy_by_lava_flow=1,}, + groups = {swordy_cobweb = 1, shearsy_cobweb = 1, fake_liquid = 1, disable_jump = 1, deco_block = 1, dig_by_piston = 1, + dig_by_water = 1, destroy_by_lava_flow = 1,}, drop = "mcl_mobitems:string", _mcl_shears_drop = true, sounds = mcl_sounds.node_sound_leaves_defaults(), @@ -133,7 +142,8 @@ minetest.register_node("mcl_core:deadbush", { walkable = false, stack_max = 64, buildable_to = true, - groups = {handy=1,shearsy=1, flammable=3,attached_node=1,plant=1,non_mycelium_plant=1,dig_by_water=1,destroy_by_lava_flow=1,deco_block=1, fire_encouragement=60, fire_flammability=100}, + groups = {handy = 1, shearsy = 1, flammable = 3, attached_node = 1, plant = 1, non_mycelium_plant = 1, dig_by_water = 1, + destroy_by_lava_flow = 1, deco_block = 1, fire_encouragement = 60, fire_flammability = 100}, drop = { max_items = 1, items = { @@ -151,7 +161,7 @@ minetest.register_node("mcl_core:deadbush", { sounds = mcl_sounds.node_sound_leaves_defaults(), selection_box = { type = "fixed", - fixed = {-5/16, -8/16, -5/16, 5/16, 1/16, 5/16}, + fixed = {-5 / 16, -8 / 16, -5 / 16, 5 / 16, 1 / 16, 5 / 16}, }, _mcl_blast_resistance = 0, _mcl_hardness = 0, @@ -165,11 +175,11 @@ minetest.register_node("mcl_core:barrier", { paramtype = "light", inventory_image = "mcl_core_barrier.png", wield_image = "mcl_core_barrier.png", - tiles = { "blank.png" }, + tiles = {"blank.png"}, stack_max = 64, sunlight_propagates = true, is_ground_content = false, - groups = {creative_breakable=1, not_in_creative_inventory = 1, not_solid = 1 }, + groups = {creative_breakable = 1, not_in_creative_inventory = 1, not_solid = 1}, on_blast = function() end, drop = "", _mcl_blast_resistance = 36000008, @@ -222,14 +232,14 @@ minetest.register_node("mcl_core:realm_barrier", { paramtype = "light", inventory_image = "mcl_core_barrier.png^[colorize:#FF00FF:127^[transformFX", wield_image = "mcl_core_barrier.png^[colorize:#FF00FF:127^[transformFX", - tiles = { "blank.png" }, + tiles = {"blank.png"}, stack_max = 64, -- To avoid players getting stuck forever between realms damage_per_second = 8, sunlight_propagates = true, is_ground_content = false, pointable = false, - groups = {not_in_creative_inventory = 1, not_solid = 1 }, + groups = {not_in_creative_inventory = 1, not_solid = 1}, on_blast = function() end, drop = "", _mcl_blast_resistance = 36000008, @@ -237,7 +247,8 @@ minetest.register_node("mcl_core:realm_barrier", { -- Prevent placement to protect player from screwing up the world, because the node is not pointable and hard to get rid of. node_placement_prediction = "", on_place = function(pos, placer, itemstack, pointed_thing) - minetest.chat_send_player(placer:get_player_name(), minetest.colorize(mcl_colors.RED, "You can't just place a realm barrier by hand!")) + minetest.chat_send_player(placer:get_player_name(), + minetest.colorize(mcl_colors.RED, "You can't just place a realm barrier by hand!")) return end, }) @@ -262,12 +273,13 @@ minetest.register_node("mcl_core:void", { stack_max = 64, sunlight_propagates = true, is_ground_content = false, - groups = { not_in_creative_inventory = 1 }, + groups = {not_in_creative_inventory = 1}, on_blast = function() end, -- Prevent placement to protect player from screwing up the world, because the node is not pointable and hard to get rid of. node_placement_prediction = "", on_place = function(pos, placer, itemstack, pointed_thing) - minetest.chat_send_player(placer:get_player_name(), minetest.colorize(mcl_colors.RED, "You can't just place the void by hand!")) + minetest.chat_send_player(placer:get_player_name(), + minetest.colorize(mcl_colors.RED, "You can't just place the void by hand!")) return end, drop = "", From 1e31e383d4dac1cbe9d96ca1152922e91c61b453 Mon Sep 17 00:00:00 2001 From: AFCMS Date: Sun, 4 Dec 2022 18:36:54 +0100 Subject: [PATCH 079/105] Fix invalid function signature for `on_place` callbacks + handling of possible nil value --- mods/ITEMS/mcl_core/nodes_misc.lua | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/mods/ITEMS/mcl_core/nodes_misc.lua b/mods/ITEMS/mcl_core/nodes_misc.lua index 50c683232..81a2fab32 100644 --- a/mods/ITEMS/mcl_core/nodes_misc.lua +++ b/mods/ITEMS/mcl_core/nodes_misc.lua @@ -246,9 +246,11 @@ minetest.register_node("mcl_core:realm_barrier", { _mcl_hardness = -1, -- Prevent placement to protect player from screwing up the world, because the node is not pointable and hard to get rid of. node_placement_prediction = "", - on_place = function(pos, placer, itemstack, pointed_thing) - minetest.chat_send_player(placer:get_player_name(), - minetest.colorize(mcl_colors.RED, "You can't just place a realm barrier by hand!")) + on_place = function(_, placer, _) + if placer then + minetest.chat_send_player(placer:get_player_name(), + minetest.colorize(mcl_colors.RED, "You can't just place a realm barrier by hand!")) + end return end, }) @@ -277,9 +279,11 @@ minetest.register_node("mcl_core:void", { on_blast = function() end, -- Prevent placement to protect player from screwing up the world, because the node is not pointable and hard to get rid of. node_placement_prediction = "", - on_place = function(pos, placer, itemstack, pointed_thing) - minetest.chat_send_player(placer:get_player_name(), - minetest.colorize(mcl_colors.RED, "You can't just place the void by hand!")) + on_place = function(_, placer, _) + if placer then + minetest.chat_send_player(placer:get_player_name(), + minetest.colorize(mcl_colors.RED, "You can't just place the void by hand!")) + end return end, drop = "", From 92261e5fb5e5929d1a112e99f95968aa6ed967f3 Mon Sep 17 00:00:00 2001 From: AFCMS Date: Sun, 4 Dec 2022 18:37:45 +0100 Subject: [PATCH 080/105] Remove `stack_max` fields duplicated with default value --- mods/ITEMS/mcl_core/nodes_misc.lua | 6 ------ 1 file changed, 6 deletions(-) diff --git a/mods/ITEMS/mcl_core/nodes_misc.lua b/mods/ITEMS/mcl_core/nodes_misc.lua index 81a2fab32..719f6efad 100644 --- a/mods/ITEMS/mcl_core/nodes_misc.lua +++ b/mods/ITEMS/mcl_core/nodes_misc.lua @@ -49,7 +49,6 @@ minetest.register_node("mcl_core:slimeblock", { }, tiles = {"mcl_core_slime.png"}, use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "blend" or true, - stack_max = 64, -- According to Minecraft Wiki, bouncing off a slime block from a height off 255 blocks should result in a bounce height of 50 blocks -- bouncy=44 makes the player bounce up to 49.6. This value was chosen by experiment. -- bouncy=80 was chosen because it is higher than 66 (bounciness of bed) @@ -106,7 +105,6 @@ minetest.register_node("mcl_core:cobweb", { drawtype = "plantlike", paramtype2 = "degrotate", visual_scale = 1.1, - stack_max = 64, tiles = {"mcl_core_web.png"}, inventory_image = "mcl_core_web.png", paramtype = "light", @@ -140,7 +138,6 @@ minetest.register_node("mcl_core:deadbush", { paramtype = "light", sunlight_propagates = true, walkable = false, - stack_max = 64, buildable_to = true, groups = {handy = 1, shearsy = 1, flammable = 3, attached_node = 1, plant = 1, non_mycelium_plant = 1, dig_by_water = 1, destroy_by_lava_flow = 1, deco_block = 1, fire_encouragement = 60, fire_flammability = 100}, @@ -176,7 +173,6 @@ minetest.register_node("mcl_core:barrier", { inventory_image = "mcl_core_barrier.png", wield_image = "mcl_core_barrier.png", tiles = {"blank.png"}, - stack_max = 64, sunlight_propagates = true, is_ground_content = false, groups = {creative_breakable = 1, not_in_creative_inventory = 1, not_solid = 1}, @@ -233,7 +229,6 @@ minetest.register_node("mcl_core:realm_barrier", { inventory_image = "mcl_core_barrier.png^[colorize:#FF00FF:127^[transformFX", wield_image = "mcl_core_barrier.png^[colorize:#FF00FF:127^[transformFX", tiles = {"blank.png"}, - stack_max = 64, -- To avoid players getting stuck forever between realms damage_per_second = 8, sunlight_propagates = true, @@ -272,7 +267,6 @@ minetest.register_node("mcl_core:void", { buildable_to = false, inventory_image = "mcl_core_void.png", wield_image = "mcl_core_void.png", - stack_max = 64, sunlight_propagates = true, is_ground_content = false, groups = {not_in_creative_inventory = 1}, From bf25fca47d39820e48d18491729fe835850b7222 Mon Sep 17 00:00:00 2001 From: AFCMS Date: Sun, 4 Dec 2022 18:38:29 +0100 Subject: [PATCH 081/105] Remove support for `use_texture_alpha` bool values (mt 5.3) --- .vscode/settings.json | 5 +++++ mods/ITEMS/mcl_core/nodes_misc.lua | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000..4fa2764d6 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "Lua.format.defaultConfig": { + "keep_one_space_between_table_and_bracket": "false" + } +} diff --git a/mods/ITEMS/mcl_core/nodes_misc.lua b/mods/ITEMS/mcl_core/nodes_misc.lua index 719f6efad..612ec5bdf 100644 --- a/mods/ITEMS/mcl_core/nodes_misc.lua +++ b/mods/ITEMS/mcl_core/nodes_misc.lua @@ -48,7 +48,7 @@ minetest.register_node("mcl_core:slimeblock", { type = "regular", }, tiles = {"mcl_core_slime.png"}, - use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "blend" or true, + use_texture_alpha = "blend", -- According to Minecraft Wiki, bouncing off a slime block from a height off 255 blocks should result in a bounce height of 50 blocks -- bouncy=44 makes the player bounce up to 49.6. This value was chosen by experiment. -- bouncy=80 was chosen because it is higher than 66 (bounciness of bed) From b9238b40696aa2d119ee1b4f083b15edb17ab32e Mon Sep 17 00:00:00 2001 From: AFCMS Date: Sun, 4 Dec 2022 18:41:42 +0100 Subject: [PATCH 082/105] Use new vectors --- mods/ITEMS/mcl_core/nodes_misc.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mods/ITEMS/mcl_core/nodes_misc.lua b/mods/ITEMS/mcl_core/nodes_misc.lua index 612ec5bdf..d6120f665 100644 --- a/mods/ITEMS/mcl_core/nodes_misc.lua +++ b/mods/ITEMS/mcl_core/nodes_misc.lua @@ -9,12 +9,12 @@ if mod_screwdriver then end local alldirs = { - {x = 0, y = 0, z = 1}, - {x = 1, y = 0, z = 0}, - {x = 0, y = 0, z = -1}, - {x = -1, y = 0, z = 0}, - {x = 0, y = -1, z = 0}, - {x = 0, y = 1, z = 0}, + vector.new(0, 0, 1), + vector.new(1, 0, 0), + vector.new(0, 0, -1), + vector.new(-1, 0, 0), + vector.new(0, -1, 0), + vector.new(0, 1, 0), } minetest.register_node("mcl_core:bone_block", { From 79876635af48a23a1f2383718a7355b467552828 Mon Sep 17 00:00:00 2001 From: AFCMS Date: Sun, 4 Dec 2022 18:45:05 +0100 Subject: [PATCH 083/105] Use `mcl_util.call_on_rightclick` in `on_place` callback for barrier block --- mods/ITEMS/mcl_core/nodes_misc.lua | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/mods/ITEMS/mcl_core/nodes_misc.lua b/mods/ITEMS/mcl_core/nodes_misc.lua index d6120f665..32f4a4f4d 100644 --- a/mods/ITEMS/mcl_core/nodes_misc.lua +++ b/mods/ITEMS/mcl_core/nodes_misc.lua @@ -199,11 +199,9 @@ minetest.register_node("mcl_core:barrier", { end -- Use pointed node's on_rightclick function first, if present - local node = minetest.get_node(pointed_thing.under) - if placer and not placer:get_player_control().sneak then - if minetest.registered_nodes[node.name] and minetest.registered_nodes[node.name].on_rightclick then - return minetest.registered_nodes[node.name].on_rightclick(pointed_thing.under, node, placer, itemstack) or itemstack - end + local new_stack = mcl_util.call_on_rightclick(itemstack, placer, pointed_thing) + if new_stack then + return new_stack end local name = placer:get_player_name() From 302970d22030020b3494d3c48258cbf7e4cb3c4a Mon Sep 17 00:00:00 2001 From: AFCMS Date: Tue, 6 Dec 2022 20:35:13 +0100 Subject: [PATCH 084/105] Basic light blocks --- mods/ITEMS/mcl_core/nodes_misc.lua | 27 ++++++++++++++++++ .../mcl_core/textures/mcl_core_light_0.png | Bin 0 -> 210 bytes .../mcl_core/textures/mcl_core_light_1.png | Bin 0 -> 220 bytes .../mcl_core/textures/mcl_core_light_10.png | Bin 0 -> 291 bytes .../mcl_core/textures/mcl_core_light_11.png | Bin 0 -> 287 bytes .../mcl_core/textures/mcl_core_light_12.png | Bin 0 -> 291 bytes .../mcl_core/textures/mcl_core_light_13.png | Bin 0 -> 267 bytes .../mcl_core/textures/mcl_core_light_14.png | Bin 0 -> 249 bytes .../mcl_core/textures/mcl_core_light_2.png | Bin 0 -> 211 bytes .../mcl_core/textures/mcl_core_light_3.png | Bin 0 -> 212 bytes .../mcl_core/textures/mcl_core_light_4.png | Bin 0 -> 214 bytes .../mcl_core/textures/mcl_core_light_5.png | Bin 0 -> 370 bytes .../mcl_core/textures/mcl_core_light_6.png | Bin 0 -> 354 bytes .../mcl_core/textures/mcl_core_light_7.png | Bin 0 -> 310 bytes .../mcl_core/textures/mcl_core_light_8.png | Bin 0 -> 310 bytes .../mcl_core/textures/mcl_core_light_9.png | Bin 0 -> 314 bytes 16 files changed, 27 insertions(+) create mode 100644 mods/ITEMS/mcl_core/textures/mcl_core_light_0.png create mode 100644 mods/ITEMS/mcl_core/textures/mcl_core_light_1.png create mode 100644 mods/ITEMS/mcl_core/textures/mcl_core_light_10.png create mode 100644 mods/ITEMS/mcl_core/textures/mcl_core_light_11.png create mode 100644 mods/ITEMS/mcl_core/textures/mcl_core_light_12.png create mode 100644 mods/ITEMS/mcl_core/textures/mcl_core_light_13.png create mode 100644 mods/ITEMS/mcl_core/textures/mcl_core_light_14.png create mode 100644 mods/ITEMS/mcl_core/textures/mcl_core_light_2.png create mode 100644 mods/ITEMS/mcl_core/textures/mcl_core_light_3.png create mode 100644 mods/ITEMS/mcl_core/textures/mcl_core_light_4.png create mode 100644 mods/ITEMS/mcl_core/textures/mcl_core_light_5.png create mode 100644 mods/ITEMS/mcl_core/textures/mcl_core_light_6.png create mode 100644 mods/ITEMS/mcl_core/textures/mcl_core_light_7.png create mode 100644 mods/ITEMS/mcl_core/textures/mcl_core_light_8.png create mode 100644 mods/ITEMS/mcl_core/textures/mcl_core_light_9.png diff --git a/mods/ITEMS/mcl_core/nodes_misc.lua b/mods/ITEMS/mcl_core/nodes_misc.lua index 32f4a4f4d..270c3fb33 100644 --- a/mods/ITEMS/mcl_core/nodes_misc.lua +++ b/mods/ITEMS/mcl_core/nodes_misc.lua @@ -249,6 +249,33 @@ minetest.register_node("mcl_core:realm_barrier", { }) +--- Light blocks + +for i = 0, 14 do --minetest.LIGHT_MAX + minetest.register_node("mcl_core:light_" .. i, { + description = S("Light"), + _doc_items_longdesc = S("Lights are invisble blocks. They are used to light up adventure maps and the like."), + _doc_items_usagehelp = S("When you hold a light in hand, you reveal all placed lights in a short distance around you."), + drawtype = "airlike", + paramtype = "light", + light_source = i, + drop = "", + inventory_image = "mcl_core_light_" .. i .. ".png", + wield_image = "mcl_core_light_" .. i .. ".png", + sunlight_propagates = true, + is_ground_content = false, + groups = {creative_breakable = 1, not_solid = 1}, + on_blast = function() end, + on_use = function(itemstack, user, pointed_thing) + itemstack:set_name("mcl_core:light_" .. ((i == 14) and 0 or i + 1)) + return itemstack + end, + _mcl_blast_resistance = 36000008, + _mcl_hardness = -1, + }) +end + + -- The void below the bedrock. Void damage is handled in mcl_playerplus. diff --git a/mods/ITEMS/mcl_core/textures/mcl_core_light_0.png b/mods/ITEMS/mcl_core/textures/mcl_core_light_0.png new file mode 100644 index 0000000000000000000000000000000000000000..ba7b78474f9de47cab2053ddc37b0b6f2ce17076 GIT binary patch literal 210 zcmV;@04@KCP)fVp=PEO8$WEx$bpdsCDZ74KRnqeTMe%t@qvuA@ffM^h(XwArmfSga3W)SeM z+6*=TM3ZFz$m#V(MgNmxW63iB6nOq_ZeUE70U+BcasddCZ95?V0OJLgF`>o6?EnA( M07*qoM6N<$f?jA*&Hw-a literal 0 HcmV?d00001 diff --git a/mods/ITEMS/mcl_core/textures/mcl_core_light_1.png b/mods/ITEMS/mcl_core/textures/mcl_core_light_1.png new file mode 100644 index 0000000000000000000000000000000000000000..9d3aed2166148741f237cec3a4c0ef74c93b771e GIT binary patch literal 220 zcmV<203-j2P)#aP5=AY2>)jw2Y@u=GoW(*+5c%XZ@@8#kJS)t27okRGZaG{n*msD!X^*%0=gl% zY$sNpVef*5|CGoxoSPH~S5TRg^Z$CK=zkE6O&%w>++hJ$)ZNyGLc_#~0+(C#|IeO1 z8>|6DgZLz;6`1ouG+Bv_Vgo=}51 WtB8Ag1eyZ?0000*w%VHhTc7oaN!v5^h^dS&7NcZX}?7{teF2rdKOo}Tjm|Fxd~cUDA! z@r?yOn1)5rkvt|ItXWhVHgDu#-VFi2r|IAYsjLLkjwQ&2U5Zd4iq)e~%mKn!yI_f`r5Wect350CIYLQPKaT*jVxm00o}E pn;RIDWdO)_id+B!WZO;%002)}4_^%0nw0)k*0(3rJ08)&s0iFN#%EJHe4%fmlh>z6}Y%TyPetUY#|EI^MqhJg} z@EHKoaDQ(%9Ag*)b23a5I{)qZkpFL11;H`QAgo?N1|X-u+K~&^^mC;x9E12E@&Bib z@Ed@vxiTl`|FhMxU>d}KzsMSF2*DWoe>4)Tp}VaO>|_uP;{V?lNL&ic%1+M literal 0 HcmV?d00001 diff --git a/mods/ITEMS/mcl_core/textures/mcl_core_light_12.png b/mods/ITEMS/mcl_core/textures/mcl_core_light_12.png new file mode 100644 index 0000000000000000000000000000000000000000..4b7bc671ff2304b60a4d6bb52dd5d4e70a5d9dfe GIT binary patch literal 291 zcmV+;0o?wHP)*w%VHhTc7vNG16MJ|6`2V*zccai)4Z-Dtx2LE4e|mBr1Rt9YrZEgb zHvq&2Dg1h6Az0J>z1?t(VFV<1qp}$`@G3B0Oa)gqN4vvv9aVC017;R pH#aaQ%K(t=6uAHd$hMsj003VF8ecFNnsxvH002ovPDHLkV1nO*fFu9_ literal 0 HcmV?d00001 diff --git a/mods/ITEMS/mcl_core/textures/mcl_core_light_13.png b/mods/ITEMS/mcl_core/textures/mcl_core_light_13.png new file mode 100644 index 0000000000000000000000000000000000000000..66c617e2acf9fc71a3a2caa34319aabcd11886df GIT binary patch literal 267 zcmV+m0rdWfP)*w%VHhTc7vNG16Z`P`F$TtJ2rd`AJw4_B)06Wc_}FwXjbR8r7l1U~ z-`fqx7>1zRh~a|uA^+d33W8&pL2qyF#veX^?kxQOYDX?u)7LGra17#u#Q&czB5VLm zb7fA>|7WWqG>HFxk@bI&Ji!?Hf3E!h&y}|SyW86Sf4#C0LIVu|i4)X}Y{=}{v%v;| zXp%G|8v=4ZS(>S00Lba}MMeLUVq?iO02FxsZf;;qmH{B!DRKb_kZn65003Oi7-1%^ R#V7y(002ovPDHLkV1h^&a;pFU literal 0 HcmV?d00001 diff --git a/mods/ITEMS/mcl_core/textures/mcl_core_light_14.png b/mods/ITEMS/mcl_core/textures/mcl_core_light_14.png new file mode 100644 index 0000000000000000000000000000000000000000..47828a0d67772395808b50e7d841e4b90199bb5b GIT binary patch literal 249 zcmV*w%(Z%orkV1S0e0cpB17kG=*#KliKRvth|M``ja17#O7=q2YFfov( z`+K|L7{d^B8_^ATd!Y6Io4s{#jBE(rumLG}wIdg->FbtQ6q;xQV76E0K-PZR1>y?FInrO|)hRmKl`~Ua-C19E)%`ou)TsheJAev;&R51YL^!lQr z|4Fg2yjJgBCR_S00000NkvXXu0mjfBr$Aa literal 0 HcmV?d00001 diff --git a/mods/ITEMS/mcl_core/textures/mcl_core_light_2.png b/mods/ITEMS/mcl_core/textures/mcl_core_light_2.png new file mode 100644 index 0000000000000000000000000000000000000000..692f7a5fa3a2b048f06aad2ae061657e33780e76 GIT binary patch literal 211 zcmV;^04)EBP)7sKUox!~H;D7*#` zl4rOw-}^r$@+b-_b8`OQnymgGL=$ZQ2;7=w30BnI)`mjE#EAkR#j|J625SJ(Bx!~l z0(Cx!CRsC83;;R3zNqMbQfw@F27m(3-^~q-$uab%707*qoM6N<$f&%zb@&Et; literal 0 HcmV?d00001 diff --git a/mods/ITEMS/mcl_core/textures/mcl_core_light_5.png b/mods/ITEMS/mcl_core/textures/mcl_core_light_5.png new file mode 100644 index 0000000000000000000000000000000000000000..a1c8c9a2fb09c30f4af3763b8ca327b00e96baa8 GIT binary patch literal 370 zcmV-&0ge8NP)Fz1nY1++#cgn>=Fv1QK~a(BCQUx1BCUVm zE4AajS6qpWjRS{S&D=S2Zl-lMg729dA3|nOBneyRBI4U6bnmlxy_&_Noy8A>-x74} zWi%ZXzEwh4Jw#-e;M+%N8#72u@??nc%p!VZ6@jgQm{e>YP?pfNWIR|a=$qgr*yN(9 zehSYhBC4rWD4}t&1HV$nb7Q@KUvK^fh*btLBm`9zq@o~XCM=DDF* zhpl`bu`|j!bdC|yE;`nH^2Knsz}HY@8Q$eCXF?5Qck1uw#cO2%XTYLw7YbO*<S6ovZ^K8riSg-`?)L5Y7*6zwvr>P8UUb>nZ9T1@mAM3b1tQWOT6*D;9Y{%z-wZPSEcLeD6$iR3MM z-g5Gb@w}qf*ejQ5-yG;EB#`FZ-=CX@d2HJzZd~Ze<3jqsLUXFWMq@I)SObFbKA<_1 z4WOd$mP)J_3fTbac(eJu?o0sX{;ve8GP@_$7tme?VIA&ojQ{`u07*qoM6N<$g5Jrb AF8}}l literal 0 HcmV?d00001 diff --git a/mods/ITEMS/mcl_core/textures/mcl_core_light_7.png b/mods/ITEMS/mcl_core/textures/mcl_core_light_7.png new file mode 100644 index 0000000000000000000000000000000000000000..2adfc272986560b6dd280f77b801c5b224c58762 GIT binary patch literal 310 zcmV-60m=S}P)L&PqgL_+Y|m@+}8geWXQ4A zO<*<%zuyx6pP&IBw}gTf|38%jra=b4Fo^$VYw~}*2K+x=16B;O{p})KIEESW|3oqV z@cMtMC3SHCN{3{C~1K4ot%g`LH#TaE$#w5(U=K z-PQ&+07QfM|MvzFAKm{C1pl8sd-ng&vlPJe|3hJ$ zzT_DIa(aDH(f_2_Sn>=21)jf~8yJ&i0LXTVTmS-O+fE1o0La$xy+WV%`v3p{07*qo IM6N<$f(Ve7Q2+n{ literal 0 HcmV?d00001 diff --git a/mods/ITEMS/mcl_core/textures/mcl_core_light_8.png b/mods/ITEMS/mcl_core/textures/mcl_core_light_8.png new file mode 100644 index 0000000000000000000000000000000000000000..bf11f8384414ba834b195842b9824e9d82eb6592 GIT binary patch literal 310 zcmV-60m=S}P)ON+jc?#0IKr>5r$l5UjP6A07*qo IM6N<$f_aRY3;+NC literal 0 HcmV?d00001 diff --git a/mods/ITEMS/mcl_core/textures/mcl_core_light_9.png b/mods/ITEMS/mcl_core/textures/mcl_core_light_9.png new file mode 100644 index 0000000000000000000000000000000000000000..12c4ee769d9f109b57955346c3b68169f8d1842e GIT binary patch literal 314 zcmV-A0mc4_P)C3SHCN{3{C~1K4ot%g`LH#TaE$#w z5(U=K-PQ&+07QfM|MvzFAKm{C1pl8sd-ng&vlPJe|3hJr0*iAg9+C75z_&jU~?jP~iEyxq&fR27qj*$ORxkw(W!f0Ng$Qs-4y)IRF3v M07*qoM6N<$g0*v(DF6Tf literal 0 HcmV?d00001 From cd70dd5b8867cb07bd23a5f5d255a24b185e82a2 Mon Sep 17 00:00:00 2001 From: AFCMS Date: Tue, 6 Dec 2022 20:40:31 +0100 Subject: [PATCH 085/105] Spawn particle then placing light blocks --- mods/ITEMS/mcl_core/nodes_misc.lua | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_core/nodes_misc.lua b/mods/ITEMS/mcl_core/nodes_misc.lua index 270c3fb33..54c6b1ec2 100644 --- a/mods/ITEMS/mcl_core/nodes_misc.lua +++ b/mods/ITEMS/mcl_core/nodes_misc.lua @@ -266,10 +266,23 @@ for i = 0, 14 do --minetest.LIGHT_MAX is_ground_content = false, groups = {creative_breakable = 1, not_solid = 1}, on_blast = function() end, - on_use = function(itemstack, user, pointed_thing) + on_use = function(itemstack, _, _) itemstack:set_name("mcl_core:light_" .. ((i == 14) and 0 or i + 1)) return itemstack end, + after_place_node = function(pos, placer, _, _) + if placer == nil then + return + end + minetest.add_particle({ + pos = pos, + expirationtime = 1, + size = 8, + texture = "mcl_core_light_" .. i .. ".png", + glow = 14, + playername = placer:get_player_name() + }) + end, _mcl_blast_resistance = 36000008, _mcl_hardness = -1, }) From 7c20896d5eb71b6b4f6e77c332e9d13921f09e30 Mon Sep 17 00:00:00 2001 From: AFCMS Date: Tue, 6 Dec 2022 20:46:51 +0100 Subject: [PATCH 086/105] Make light blocks not walkable --- mods/ITEMS/mcl_core/nodes_misc.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/mods/ITEMS/mcl_core/nodes_misc.lua b/mods/ITEMS/mcl_core/nodes_misc.lua index 54c6b1ec2..abe86879e 100644 --- a/mods/ITEMS/mcl_core/nodes_misc.lua +++ b/mods/ITEMS/mcl_core/nodes_misc.lua @@ -258,6 +258,7 @@ for i = 0, 14 do --minetest.LIGHT_MAX _doc_items_usagehelp = S("When you hold a light in hand, you reveal all placed lights in a short distance around you."), drawtype = "airlike", paramtype = "light", + walkable = false, light_source = i, drop = "", inventory_image = "mcl_core_light_" .. i .. ".png", From 7c497d960406968fd002331c7d0ed4d7b65dfdd0 Mon Sep 17 00:00:00 2001 From: AFCMS Date: Tue, 6 Dec 2022 20:53:33 +0100 Subject: [PATCH 087/105] Remove config file --- .vscode/settings.json | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 4fa2764d6..000000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "Lua.format.defaultConfig": { - "keep_one_space_between_table_and_bracket": "false" - } -} From 33e2b79b2b6d8c7072235ed0f420d7bc89bfc4c3 Mon Sep 17 00:00:00 2001 From: AFCMS Date: Tue, 6 Dec 2022 21:14:05 +0100 Subject: [PATCH 088/105] Make nearby light blocks spawn particles when player wield one --- mods/ITEMS/mcl_core/nodes_misc.lua | 3 ++- mods/PLAYER/mcl_playerplus/init.lua | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/mods/ITEMS/mcl_core/nodes_misc.lua b/mods/ITEMS/mcl_core/nodes_misc.lua index abe86879e..ceee50004 100644 --- a/mods/ITEMS/mcl_core/nodes_misc.lua +++ b/mods/ITEMS/mcl_core/nodes_misc.lua @@ -250,6 +250,7 @@ minetest.register_node("mcl_core:realm_barrier", { --- Light blocks +--- TODO: make node only pointable when wielding it for i = 0, 14 do --minetest.LIGHT_MAX minetest.register_node("mcl_core:light_" .. i, { @@ -265,7 +266,7 @@ for i = 0, 14 do --minetest.LIGHT_MAX wield_image = "mcl_core_light_" .. i .. ".png", sunlight_propagates = true, is_ground_content = false, - groups = {creative_breakable = 1, not_solid = 1}, + groups = {creative_breakable = 1, not_solid = 1, light_block = i + 1}, on_blast = function() end, on_use = function(itemstack, _, _) itemstack:set_name("mcl_core:light_" .. ((i == 14) and 0 or i + 1)) diff --git a/mods/PLAYER/mcl_playerplus/init.lua b/mods/PLAYER/mcl_playerplus/init.lua index 0faa9c53f..28822d1bc 100644 --- a/mods/PLAYER/mcl_playerplus/init.lua +++ b/mods/PLAYER/mcl_playerplus/init.lua @@ -627,7 +627,7 @@ minetest.register_globalstep(function(dtime) -- Show positions of barriers when player is wielding a barrier local wi = player:get_wielded_item():get_name() - if wi == "mcl_core:barrier" or wi == "mcl_core:realm_barrier" then + if wi == "mcl_core:barrier" or wi == "mcl_core:realm_barrier" or minetest.get_item_group(wi, "light_block") ~= 0 then local pos = vector.round(player:get_pos()) local r = 8 local vm = get_voxel_manip() @@ -642,11 +642,15 @@ minetest.register_globalstep(function(dtime) for z=pos.z-r, pos.z+r do local vi = area:indexp({x=x, y=y, z=z}) local nodename = get_name_from_content_id(data[vi]) + local light_block_group = minetest.get_item_group(nodename, "light_block") + local tex if nodename == "mcl_core:barrier" then tex = "mcl_core_barrier.png" elseif nodename == "mcl_core:realm_barrier" then tex = "mcl_core_barrier.png^[colorize:#FF00FF:127^[transformFX" + elseif light_block_group ~= 0 then + tex = "mcl_core_light_" .. (light_block_group - 1) .. ".png" end if tex then add_particle({ From eb5f5678d6cac4f7765e44de40b753d89aa8c710 Mon Sep 17 00:00:00 2001 From: AFCMS Date: Wed, 7 Dec 2022 19:01:44 +0100 Subject: [PATCH 089/105] Fix typo in barrier help text --- mods/ITEMS/mcl_core/locale/mcl_core.de.tr | 2 +- mods/ITEMS/mcl_core/locale/mcl_core.es.tr | 2 +- mods/ITEMS/mcl_core/locale/mcl_core.fr.tr | 2 +- mods/ITEMS/mcl_core/locale/mcl_core.pl.tr | 2 +- mods/ITEMS/mcl_core/locale/mcl_core.ru.tr | 2 +- mods/ITEMS/mcl_core/locale/mcl_core.zh_TW.tr | 2 +- mods/ITEMS/mcl_core/locale/template.txt | 2 +- mods/ITEMS/mcl_core/nodes_misc.lua | 4 ++-- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/mods/ITEMS/mcl_core/locale/mcl_core.de.tr b/mods/ITEMS/mcl_core/locale/mcl_core.de.tr index f8a441fdc..4f9071825 100644 --- a/mods/ITEMS/mcl_core/locale/mcl_core.de.tr +++ b/mods/ITEMS/mcl_core/locale/mcl_core.de.tr @@ -24,7 +24,7 @@ Andesite is an igneous rock.=Andesit ist ein magmatisches Gestein. Apple=Apfel Apples are food items which can be eaten.=Äpfel sind essbare Gegenstände. Barrier=Barriere -Barriers are invisble walkable blocks. They are used to create boundaries of adventure maps and the like. Monsters and animals won't appear on barriers, and fences do not connect to barriers. Other blocks can be built on barriers like on any other block.=Barrieren sind unsichtbare feste Blöcke. Sie sind nützlich, um Grenzen für Abenteuerkarten und ähnliches zu bauen. Monster und Tiere werden auf Barrieren nicht auftauchen, und Zäune verbinden sich nicht mit Barrieren. Andere Blöcke können an Barrieren gebaut werden, wie bei allen anderen Blöcken. +Barriers are invisible walkable blocks. They are used to create boundaries of adventure maps and the like. Monsters and animals won't appear on barriers, and fences do not connect to barriers. Other blocks can be built on barriers like on any other block.=Barrieren sind unsichtbare feste Blöcke. Sie sind nützlich, um Grenzen für Abenteuerkarten und ähnliches zu bauen. Monster und Tiere werden auf Barrieren nicht auftauchen, und Zäune verbinden sich nicht mit Barrieren. Andere Blöcke können an Barrieren gebaut werden, wie bei allen anderen Blöcken. Bedrock=Grundgestein Bedrock is a very hard type of rock. It can not be broken, destroyed, collected or moved by normal means, unless in Creative Mode.=Grundgestein ist ein sehr harter Gesteinstyp. Er kann unter normalen Umständen nicht abgebaut, zerstört, aufgesammelt oder verschoben werden, außer im Kreativmodus. Birch Bark=Birkenrinde diff --git a/mods/ITEMS/mcl_core/locale/mcl_core.es.tr b/mods/ITEMS/mcl_core/locale/mcl_core.es.tr index 0f8656520..cf16e5bda 100644 --- a/mods/ITEMS/mcl_core/locale/mcl_core.es.tr +++ b/mods/ITEMS/mcl_core/locale/mcl_core.es.tr @@ -24,7 +24,7 @@ Andesite is an igneous rock.=La andesita es una roca ígnea. Apple=Manzana Apples are food items which can be eaten.=Las manzanas son alimentos que se pueden comer. Barrier=Barrera -Barriers are invisble walkable blocks. They are used to create boundaries of adventure maps and the like. Monsters and animals won't appear on barriers, and fences do not connect to barriers. Other blocks can be built on barriers like on any other block.=Las barreras son bloques transitables invisibles. Se utilizan para crear límites de mapas de aventura y similares. Los monstruos y los animales no aparecerán en las barreras, y las cercas no se conectan a las barreras. Otros bloques pueden construirse sobre barreras como en cualquier otro bloque. +Barriers are invisible walkable blocks. They are used to create boundaries of adventure maps and the like. Monsters and animals won't appear on barriers, and fences do not connect to barriers. Other blocks can be built on barriers like on any other block.=Las barreras son bloques transitables invisibles. Se utilizan para crear límites de mapas de aventura y similares. Los monstruos y los animales no aparecerán en las barreras, y las cercas no se conectan a las barreras. Otros bloques pueden construirse sobre barreras como en cualquier otro bloque. Bedrock=Lecho de roca Bedrock is a very hard type of rock. It can not be broken, destroyed, collected or moved by normal means, unless in Creative Mode.=El lecho de roca es un tipo de roca muy duro. No se puede romper, destruir, recoger o mover por medios normales, a menos que esté en modo creativo. Birch Bark=Madera de abedul sin corteza diff --git a/mods/ITEMS/mcl_core/locale/mcl_core.fr.tr b/mods/ITEMS/mcl_core/locale/mcl_core.fr.tr index ad6c09b08..c6a4d84ad 100644 --- a/mods/ITEMS/mcl_core/locale/mcl_core.fr.tr +++ b/mods/ITEMS/mcl_core/locale/mcl_core.fr.tr @@ -24,7 +24,7 @@ Andesite is an igneous rock.=L'andésite est une roche ignée. Apple=Pomme Apples are food items which can be eaten.=Les pommes sont des aliments qui peuvent être consommés. Barrier=Barrière invisible -Barriers are invisble walkable blocks. They are used to create boundaries of adventure maps and the like. Monsters and animals won't appear on barriers, and fences do not connect to barriers. Other blocks can be built on barriers like on any other block.=Les barrières sont des blocs accessibles à pied. Ils sont utilisés pour créer des limites de cartes d'aventure et similaires. Les monstres et les animaux n'apparaissent pas sur les barrières, et les clôtures ne se connectent pas aux barrières. D'autres blocs peuvent être construits sur des barrières comme sur n'importe quel autre bloc. +Barriers are invisible walkable blocks. They are used to create boundaries of adventure maps and the like. Monsters and animals won't appear on barriers, and fences do not connect to barriers. Other blocks can be built on barriers like on any other block.=Les barrières sont des blocs accessibles à pied. Ils sont utilisés pour créer des limites de cartes d'aventure et similaires. Les monstres et les animaux n'apparaissent pas sur les barrières, et les clôtures ne se connectent pas aux barrières. D'autres blocs peuvent être construits sur des barrières comme sur n'importe quel autre bloc. Bedrock=Bedrock Bedrock is a very hard type of rock. It can not be broken, destroyed, collected or moved by normal means, unless in Creative Mode.=Le bedrock est un type de roche très dur. Il ne peut pas être brisé, détruit, collecté ou déplacé par des moyens normaux, sauf en mode créatif. Birch Bark=Bois de Bouleau diff --git a/mods/ITEMS/mcl_core/locale/mcl_core.pl.tr b/mods/ITEMS/mcl_core/locale/mcl_core.pl.tr index 8e9d7cf8f..669e4bc9b 100644 --- a/mods/ITEMS/mcl_core/locale/mcl_core.pl.tr +++ b/mods/ITEMS/mcl_core/locale/mcl_core.pl.tr @@ -24,7 +24,7 @@ Andesite is an igneous rock.=Andezyt jest skałą pochodzenia wulkanicznego. Apple=Jabłko Apples are food items which can be eaten.=Jabłka to przedmioty które można zjeść. Barrier=Bariera -Barriers are invisble walkable blocks. They are used to create boundaries of adventure maps and the like. Monsters and animals won't appear on barriers, and fences do not connect to barriers. Other blocks can be built on barriers like on any other block.=Bariery to niewidzialne bloki po których można chodzić. Są użyteczne do tworzenia ograniczeń na mapach przygodowych i im podobnych. Potwory i zwierzęta nie pojawiają się na barierach, a płoty się z nimi nie łączą. Inne bloki mogą być na nich budowane podobnie jak na innych blokach. +Barriers are invisible walkable blocks. They are used to create boundaries of adventure maps and the like. Monsters and animals won't appear on barriers, and fences do not connect to barriers. Other blocks can be built on barriers like on any other block.=Bariery to niewidzialne bloki po których można chodzić. Są użyteczne do tworzenia ograniczeń na mapach przygodowych i im podobnych. Potwory i zwierzęta nie pojawiają się na barierach, a płoty się z nimi nie łączą. Inne bloki mogą być na nich budowane podobnie jak na innych blokach. Bedrock=Skała macierzysta Bedrock is a very hard type of rock. It can not be broken, destroyed, collected or moved by normal means, unless in Creative Mode.=Skała macierzysta jest rodzajem bardzo twardej skały. Nie może być ona zniszczona, zebrana lub przesunięta normalnymi metodami, jeśli nie jesteś w trybie kreatywnym. Birch Bark=Brzozowa kora diff --git a/mods/ITEMS/mcl_core/locale/mcl_core.ru.tr b/mods/ITEMS/mcl_core/locale/mcl_core.ru.tr index 831795792..bf8ce9e4f 100644 --- a/mods/ITEMS/mcl_core/locale/mcl_core.ru.tr +++ b/mods/ITEMS/mcl_core/locale/mcl_core.ru.tr @@ -24,7 +24,7 @@ Andesite is an igneous rock.=Андезит это камень вулканич Apple=Яблоко Apples are food items which can be eaten.=Яблоки относятся к продуктовым предметам, которые можно есть. Barrier=Барьер -Barriers are invisble walkable blocks. They are used to create boundaries of adventure maps and the like. Monsters and animals won't appear on barriers, and fences do not connect to barriers. Other blocks can be built on barriers like on any other block.=Барьеры это невидимые блоки-препятствия. Они могут использоваться, например, для создания границ карты. Монстры и животные не будут появляться на барьерах. Заборы с барьерами визуально не связываются. Другие блоки могут строиться на барьерах, как на любых других блоках. +Barriers are invisible walkable blocks. They are used to create boundaries of adventure maps and the like. Monsters and animals won't appear on barriers, and fences do not connect to barriers. Other blocks can be built on barriers like on any other block.=Барьеры это невидимые блоки-препятствия. Они могут использоваться, например, для создания границ карты. Монстры и животные не будут появляться на барьерах. Заборы с барьерами визуально не связываются. Другие блоки могут строиться на барьерах, как на любых других блоках. Bedrock=Бедрок Bedrock is a very hard type of rock. It can not be broken, destroyed, collected or moved by normal means, unless in Creative Mode.=Бедрок это очень твёрдый камень. Его невозможно сломать, выкопать или сдвинуть обычным способом, за исключением творческого режима. Birch Bark=Кора берёзы diff --git a/mods/ITEMS/mcl_core/locale/mcl_core.zh_TW.tr b/mods/ITEMS/mcl_core/locale/mcl_core.zh_TW.tr index 0e8280c6e..74f3297a1 100644 --- a/mods/ITEMS/mcl_core/locale/mcl_core.zh_TW.tr +++ b/mods/ITEMS/mcl_core/locale/mcl_core.zh_TW.tr @@ -23,7 +23,7 @@ Andesite is an igneous rock.=安山岩是一種火成岩。 Apple=蘋果 Apples are food items which can be eaten.=蘋果是一種可以被食用的食物 Barrier=屏障 -Barriers are invisble walkable blocks. They are used to create boundaries of adventure maps and the like. Monsters and animals won't appear on barriers, and fences do not connect to barriers. Other blocks can be built on barriers like on any other block.=屏障是看不見但可行走的方塊。它們通常被用來創建冒險地圖的邊界。怪物和動物不會出現在屏障上,柵欄也不會連接到屏障上。其他方塊可以像在其他方塊上一樣被放置在屏障上。 +Barriers are invisible walkable blocks. They are used to create boundaries of adventure maps and the like. Monsters and animals won't appear on barriers, and fences do not connect to barriers. Other blocks can be built on barriers like on any other block.=屏障是看不見但可行走的方塊。它們通常被用來創建冒險地圖的邊界。怪物和動物不會出現在屏障上,柵欄也不會連接到屏障上。其他方塊可以像在其他方塊上一樣被放置在屏障上。 Bedrock=基岩 Bedrock is a very hard type of rock. It can not be broken, destroyed, collected or moved by normal means, unless in Creative Mode.=基岩是一種堅實無比的石頭。除了創造模式的玩家,沒有人可以以正常方式破壞、銷毀、收集或移動它。 Birch Bark=白樺樹皮 diff --git a/mods/ITEMS/mcl_core/locale/template.txt b/mods/ITEMS/mcl_core/locale/template.txt index a7798b9cd..69ca8b77f 100644 --- a/mods/ITEMS/mcl_core/locale/template.txt +++ b/mods/ITEMS/mcl_core/locale/template.txt @@ -24,7 +24,7 @@ Andesite is an igneous rock.= Apple= Apples are food items which can be eaten.= Barrier= -Barriers are invisble walkable blocks. They are used to create boundaries of adventure maps and the like. Monsters and animals won't appear on barriers, and fences do not connect to barriers. Other blocks can be built on barriers like on any other block.= +Barriers are invisible walkable blocks. They are used to create boundaries of adventure maps and the like. Monsters and animals won't appear on barriers, and fences do not connect to barriers. Other blocks can be built on barriers like on any other block.= Bedrock= Bedrock is a very hard type of rock. It can not be broken, destroyed, collected or moved by normal means, unless in Creative Mode.= Birch Bark= diff --git a/mods/ITEMS/mcl_core/nodes_misc.lua b/mods/ITEMS/mcl_core/nodes_misc.lua index ceee50004..6225bd611 100644 --- a/mods/ITEMS/mcl_core/nodes_misc.lua +++ b/mods/ITEMS/mcl_core/nodes_misc.lua @@ -166,7 +166,7 @@ minetest.register_node("mcl_core:deadbush", { minetest.register_node("mcl_core:barrier", { description = S("Barrier"), - _doc_items_longdesc = S("Barriers are invisble walkable blocks. They are used to create boundaries of adventure maps and the like. Monsters and animals won't appear on barriers, and fences do not connect to barriers. Other blocks can be built on barriers like on any other block."), + _doc_items_longdesc = S("Barriers are invisible walkable blocks. They are used to create boundaries of adventure maps and the like. Monsters and animals won't appear on barriers, and fences do not connect to barriers. Other blocks can be built on barriers like on any other block."), _doc_items_usagehelp = S("When you hold a barrier in hand, you reveal all placed barriers in a short distance around you."), drawtype = "airlike", paramtype = "light", @@ -255,7 +255,7 @@ minetest.register_node("mcl_core:realm_barrier", { for i = 0, 14 do --minetest.LIGHT_MAX minetest.register_node("mcl_core:light_" .. i, { description = S("Light"), - _doc_items_longdesc = S("Lights are invisble blocks. They are used to light up adventure maps and the like."), + _doc_items_longdesc = S("Lights are invisible blocks. They are used to light up adventure maps and the like."), _doc_items_usagehelp = S("When you hold a light in hand, you reveal all placed lights in a short distance around you."), drawtype = "airlike", paramtype = "light", From 515204d296189f97decb0e650ad12ff7f60e40fc Mon Sep 17 00:00:00 2001 From: AFCMS Date: Wed, 7 Dec 2022 19:07:35 +0100 Subject: [PATCH 090/105] Update translation template and add french translation --- mods/ITEMS/mcl_core/locale/mcl_core.fr.tr | 3 +++ mods/ITEMS/mcl_core/locale/template.txt | 3 +++ 2 files changed, 6 insertions(+) diff --git a/mods/ITEMS/mcl_core/locale/mcl_core.fr.tr b/mods/ITEMS/mcl_core/locale/mcl_core.fr.tr index c6a4d84ad..7dbe3b55a 100644 --- a/mods/ITEMS/mcl_core/locale/mcl_core.fr.tr +++ b/mods/ITEMS/mcl_core/locale/mcl_core.fr.tr @@ -286,3 +286,6 @@ Stackable=Empilable Crying Obsidian=Obsidienne pleureuse Crying obsidian is a luminous obsidian that can generate as part of ruined portals.=L'obsidienne pleureuse est une obsidienne luminause qui peut être générée dans les portails en ruine. Enchanted Golden Apple=Pomme dorée enchantée +Light=Lumière +Lights are invisible blocks. They are used to light up adventure maps and the like.=Les lumières sont des blocs invisibles. Ils sont utilisés pour éclairer les cartes d'aventure. +When you hold a light in hand, you reveal all placed lights in a short distance around you.=Lorsque vous tenez une lumière en main, vous révélez toutes les lumières placées à une courte distance autour de vous. diff --git a/mods/ITEMS/mcl_core/locale/template.txt b/mods/ITEMS/mcl_core/locale/template.txt index 69ca8b77f..911746699 100644 --- a/mods/ITEMS/mcl_core/locale/template.txt +++ b/mods/ITEMS/mcl_core/locale/template.txt @@ -286,3 +286,6 @@ Stackable= Crying Obsidian= Crying obsidian is a luminous obsidian that can generate as part of ruined portals.= Enchanted Golden Apple= +Light= +Lights are invisible blocks. They are used to light up adventure maps and the like.= +When you hold a light in hand, you reveal all placed lights in a short distance around you.= From 726358da4bf105e3061d81a078dd6b2f10ca3e86 Mon Sep 17 00:00:00 2001 From: AFCMS Date: Fri, 6 Jan 2023 16:37:35 +0100 Subject: [PATCH 091/105] Rename callbacks parameters to match Minetest documentation --- mods/ITEMS/mcl_core/nodes_misc.lua | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/mods/ITEMS/mcl_core/nodes_misc.lua b/mods/ITEMS/mcl_core/nodes_misc.lua index 6225bd611..5b589332b 100644 --- a/mods/ITEMS/mcl_core/nodes_misc.lua +++ b/mods/ITEMS/mcl_core/nodes_misc.lua @@ -176,7 +176,7 @@ minetest.register_node("mcl_core:barrier", { sunlight_propagates = true, is_ground_content = false, groups = {creative_breakable = 1, not_in_creative_inventory = 1, not_solid = 1}, - on_blast = function() end, + on_blast = function(pos, intensity) end, drop = "", _mcl_blast_resistance = 36000008, _mcl_hardness = -1, @@ -233,13 +233,13 @@ minetest.register_node("mcl_core:realm_barrier", { is_ground_content = false, pointable = false, groups = {not_in_creative_inventory = 1, not_solid = 1}, - on_blast = function() end, + on_blast = function(pos, intensity) end, drop = "", _mcl_blast_resistance = 36000008, _mcl_hardness = -1, -- Prevent placement to protect player from screwing up the world, because the node is not pointable and hard to get rid of. node_placement_prediction = "", - on_place = function(_, placer, _) + on_place = function(itemstack, placer, pointed_thing) if placer then minetest.chat_send_player(placer:get_player_name(), minetest.colorize(mcl_colors.RED, "You can't just place a realm barrier by hand!")) @@ -267,12 +267,12 @@ for i = 0, 14 do --minetest.LIGHT_MAX sunlight_propagates = true, is_ground_content = false, groups = {creative_breakable = 1, not_solid = 1, light_block = i + 1}, - on_blast = function() end, - on_use = function(itemstack, _, _) + on_blast = function(pos, intensity) end, + on_use = function(itemstack, user, pointed_thing) itemstack:set_name("mcl_core:light_" .. ((i == 14) and 0 or i + 1)) return itemstack end, - after_place_node = function(pos, placer, _, _) + after_place_node = function(pos, placer, itemstack, pointed_thing) if placer == nil then return end @@ -310,10 +310,10 @@ minetest.register_node("mcl_core:void", { sunlight_propagates = true, is_ground_content = false, groups = {not_in_creative_inventory = 1}, - on_blast = function() end, + on_blast = function(pos, intensity) end, -- Prevent placement to protect player from screwing up the world, because the node is not pointable and hard to get rid of. node_placement_prediction = "", - on_place = function(_, placer, _) + on_place = function(itemstack, placer, pointed_thing) if placer then minetest.chat_send_player(placer:get_player_name(), minetest.colorize(mcl_colors.RED, "You can't just place the void by hand!")) From fb8262bf57d636684a688f0959066a04586a7911 Mon Sep 17 00:00:00 2001 From: AFCMS Date: Fri, 6 Jan 2023 23:27:15 +0100 Subject: [PATCH 092/105] Make light blocks `buildable_to` --- mods/CORE/mcl_util/init.lua | 362 ++++++++++++++++++++++++----- mods/ITEMS/mcl_core/nodes_misc.lua | 5 + 2 files changed, 305 insertions(+), 62 deletions(-) diff --git a/mods/CORE/mcl_util/init.lua b/mods/CORE/mcl_util/init.lua index a79c970cd..f37b34444 100644 --- a/mods/CORE/mcl_util/init.lua +++ b/mods/CORE/mcl_util/init.lua @@ -2,8 +2,8 @@ mcl_util = {} -- Updates all values in t using values from to*. function table.update(t, ...) - for _, to in ipairs{...} do - for k,v in pairs(to) do + for _, to in ipairs {...} do + for k, v in pairs(to) do t[k] = v end end @@ -12,8 +12,8 @@ end -- Updates nil values in t using values from to*. function table.update_nil(t, ...) - for _, to in ipairs{...} do - for k,v in pairs(to) do + for _, to in ipairs {...} do + for k, v in pairs(to) do if t[k] == nil then t[k] = v end @@ -22,9 +22,9 @@ function table.update_nil(t, ...) return t end -local LOGGING_ON = minetest.settings:get_bool("mcl_logging_default",false) +local LOGGING_ON = minetest.settings:get_bool("mcl_logging_default", false) local LOG_MODULE = "[MCL2]" -function mcl_util.mcl_log (message, module, bypass_default_logger) +function mcl_util.mcl_log(message, module, bypass_default_logger) local selected_module = LOG_MODULE if module then selected_module = module @@ -34,7 +34,6 @@ function mcl_util.mcl_log (message, module, bypass_default_logger) end end - function mcl_util.file_exists(name) if type(name) ~= "string" then return end local f = io.open(name) @@ -69,7 +68,7 @@ function mcl_util.rotate_axis_and_place(itemstack, placer, pointed_thing, infini local undef = minetest.registered_nodes[unode.name] if undef and undef.on_rightclick then undef.on_rightclick(pointed_thing.under, unode, placer, - itemstack, pointed_thing) + itemstack, pointed_thing) return end local fdir = minetest.dir_to_facedir(placer:get_look_dir()) @@ -151,23 +150,23 @@ end function mcl_util.get_double_container_neighbor_pos(pos, param2, side) if side == "right" then if param2 == 0 then - return {x=pos.x-1, y=pos.y, z=pos.z} + return {x = pos.x - 1, y = pos.y, z = pos.z} elseif param2 == 1 then - return {x=pos.x, y=pos.y, z=pos.z+1} + return {x = pos.x, y = pos.y, z = pos.z + 1} elseif param2 == 2 then - return {x=pos.x+1, y=pos.y, z=pos.z} + return {x = pos.x + 1, y = pos.y, z = pos.z} elseif param2 == 3 then - return {x=pos.x, y=pos.y, z=pos.z-1} + return {x = pos.x, y = pos.y, z = pos.z - 1} end else if param2 == 0 then - return {x=pos.x+1, y=pos.y, z=pos.z} + return {x = pos.x + 1, y = pos.y, z = pos.z} elseif param2 == 1 then - return {x=pos.x, y=pos.y, z=pos.z-1} + return {x = pos.x, y = pos.y, z = pos.z - 1} elseif param2 == 2 then - return {x=pos.x-1, y=pos.y, z=pos.z} + return {x = pos.x - 1, y = pos.y, z = pos.z} elseif param2 == 3 then - return {x=pos.x, y=pos.y, z=pos.z+1} + return {x = pos.x, y = pos.y, z = pos.z + 1} end end end @@ -185,7 +184,7 @@ end function mcl_util.get_eligible_transfer_item_slot(src_inventory, src_list, dst_inventory, dst_list, condition) local size = src_inventory:get_size(src_list) local stack - for i=1, size do + for i = 1, size do stack = src_inventory:get_stack(src_list, i) if not stack:is_empty() and (condition == nil or condition(stack, src_inventory, src_list, dst_inventory, dst_list)) then return i @@ -288,10 +287,10 @@ function mcl_util.move_item_container(source_pos, destination_pos, source_list, -- Main inventory for most container types if sctype == 2 or sctype == 3 or sctype == 5 or sctype == 6 or sctype == 7 then source_list = "main" - -- Furnace: output + -- Furnace: output elseif sctype == 4 then source_list = "dst" - -- Unknown source container type. Bail out + -- Unknown source container type. Bail out else return false end @@ -344,7 +343,7 @@ function mcl_util.move_item_container(source_pos, destination_pos, source_list, -- Main inventory for most container types if dctype == 2 or dctype == 3 or dctype == 5 or dctype == 6 or dctype == 7 then destination_list = "main" - -- Furnace source slot + -- Furnace source slot elseif dctype == 4 then destination_list = "src" end @@ -409,7 +408,7 @@ end -- Returns true if item (itemstring or ItemStack) can be used as a furnace fuel. -- Returns false otherwise function mcl_util.is_fuel(item) - return minetest.get_craft_result({method="fuel", width=1, items={item}}).time ~= 0 + return minetest.get_craft_result({method = "fuel", width = 1, items = {item}}).time ~= 0 end -- Returns a on_place function for plants @@ -456,7 +455,7 @@ function mcl_util.generate_on_place_plant_function(condition) if success then if idef.sounds and idef.sounds.place then - minetest.sound_play(idef.sounds.place, {pos=pointed_thing.above, gain=1}, true) + minetest.sound_play(idef.sounds.place, {pos = pointed_thing.above, gain = 1}, true) end end itemstack = new_itemstack @@ -643,78 +642,80 @@ end local function roundN(n, d) if type(n) ~= "number" then return n end - local m = 10^d - return math.floor(n * m + 0.5) / m + local m = 10 ^ d + return math.floor(n * m + 0.5) / m end -local function close_enough(a,b) - local rt=true +local function close_enough(a, b) + local rt = true if type(a) == "table" and type(b) == "table" then - for k,v in pairs(a) do - if roundN(v,2) ~= roundN(b[k],2) then - rt=false + for k, v in pairs(a) do + if roundN(v, 2) ~= roundN(b[k], 2) then + rt = false break end end else - rt = roundN(a,2) == roundN(b,2) + rt = roundN(a, 2) == roundN(b, 2) end return rt end -local function props_changed(props,oldprops) - local changed=false - local p={} - for k,v in pairs(props) do - if not close_enough(v,oldprops[k]) then - p[k]=v - changed=true +local function props_changed(props, oldprops) + local changed = false + local p = {} + for k, v in pairs(props) do + if not close_enough(v, oldprops[k]) then + p[k] = v + changed = true end end - return changed,p + return changed, p end --tests for roundN -local test_round1=15 -local test_round2=15.00199999999 -local test_round3=15.00111111 -local test_round4=15.00999999 +local test_round1 = 15 +local test_round2 = 15.00199999999 +local test_round3 = 15.00111111 +local test_round4 = 15.00999999 -assert(roundN(test_round1,2)==roundN(test_round1,2)) -assert(roundN(test_round1,2)==roundN(test_round2,2)) -assert(roundN(test_round1,2)==roundN(test_round3,2)) -assert(roundN(test_round1,2)~=roundN(test_round4,2)) +assert(roundN(test_round1, 2) == roundN(test_round1, 2)) +assert(roundN(test_round1, 2) == roundN(test_round2, 2)) +assert(roundN(test_round1, 2) == roundN(test_round3, 2)) +assert(roundN(test_round1, 2) ~= roundN(test_round4, 2)) -- tests for close_enough -local test_cb = {-0.35,0,-0.35,0.35,0.8,0.35} --collisionboxes -local test_cb_close = {-0.351213,0,-0.35,0.35,0.8,0.351212} -local test_cb_diff = {-0.35,0,-1.35,0.35,0.8,0.35} +local test_cb = {-0.35, 0, -0.35, 0.35, 0.8, 0.35} --collisionboxes +local test_cb_close = {-0.351213, 0, -0.35, 0.35, 0.8, 0.351212} +local test_cb_diff = {-0.35, 0, -1.35, 0.35, 0.8, 0.35} local test_eh = 1.65 --eye height local test_eh_close = 1.65123123 local test_eh_diff = 1.35 -local test_nt = { r = 225, b = 225, a = 225, g = 225 } --nametag -local test_nt_diff = { r = 225, b = 225, a = 0, g = 225 } +local test_nt = {r = 225, b = 225, a = 225, g = 225} --nametag +local test_nt_diff = {r = 225, b = 225, a = 0, g = 225} -assert(close_enough(test_cb,test_cb_close)) -assert(not close_enough(test_cb,test_cb_diff)) -assert(close_enough(test_eh,test_eh_close)) -assert(not close_enough(test_eh,test_eh_diff)) -assert(not close_enough(test_nt,test_nt_diff)) --no floats involved here +assert(close_enough(test_cb, test_cb_close)) +assert(not close_enough(test_cb, test_cb_diff)) +assert(close_enough(test_eh, test_eh_close)) +assert(not close_enough(test_eh, test_eh_diff)) +assert(not close_enough(test_nt, test_nt_diff)) --no floats involved here --tests for properties_changed -local test_properties_set1={collisionbox = {-0.35,0,-0.35,0.35,0.8,0.35}, eye_height = 0.65, nametag_color = { r = 225, b = 225, a = 225, g = 225 }} -local test_properties_set2={collisionbox = {-0.35,0,-0.35,0.35,0.8,0.35}, eye_height = 1.35, nametag_color = { r = 225, b = 225, a = 225, g = 225 }} +local test_properties_set1 = {collisionbox = {-0.35, 0, -0.35, 0.35, 0.8, 0.35}, eye_height = 0.65, + nametag_color = {r = 225, b = 225, a = 225, g = 225}} +local test_properties_set2 = {collisionbox = {-0.35, 0, -0.35, 0.35, 0.8, 0.35}, eye_height = 1.35, + nametag_color = {r = 225, b = 225, a = 225, g = 225}} -local test_p1,_=props_changed(test_properties_set1,test_properties_set1) -local test_p2,_=props_changed(test_properties_set1,test_properties_set2) +local test_p1, _ = props_changed(test_properties_set1, test_properties_set1) +local test_p2, _ = props_changed(test_properties_set1, test_properties_set2) assert(not test_p1) assert(test_p2) -function mcl_util.set_properties(obj,props) - local changed,p=props_changed(props,obj:get_properties()) +function mcl_util.set_properties(obj, props) + local changed, p = props_changed(props, obj:get_properties()) if changed then obj:set_properties(p) end @@ -729,6 +730,243 @@ function mcl_util.set_bone_position(obj, bone, pos, rot) end end +---Return a function to use in `on_place`. +--- +---Allow to bypass the `buildable_to` node field in a `on_place` callback. +--- +---You have to make sure that the nodes you return true for have `buildable_to = true`. +---@param func fun(node_name: string): boolean Return `true` if node must not replace the buildable_to node which have `node_name` +---@return fun(itemstack: ItemStack, placer: ObjectRef, pointed_thing: pointed_thing, param2: integer): ItemStack? +function mcl_util.bypass_buildable_to(func) + -------------------------- + -- MINETEST CODE: UTILS -- + -------------------------- + + local function copy_pointed_thing(pointed_thing) + return { + type = pointed_thing.type, + above = pointed_thing.above and vector.copy(pointed_thing.above), + under = pointed_thing.under and vector.copy(pointed_thing.under), + ref = pointed_thing.ref, + } + end + + local function user_name(user) + return user and user:get_player_name() or "" + end + + -- Returns a logging function. For empty names, does not log. + local function make_log(name) + return name ~= "" and minetest.log or function() end + end + + local function check_attached_node(p, n, group_rating) + local def = core.registered_nodes[n.name] + local d = vector.zero() + if group_rating == 3 then + -- always attach to floor + d.y = -1 + elseif group_rating == 4 then + -- always attach to ceiling + d.y = 1 + elseif group_rating == 2 then + -- attach to facedir or 4dir direction + if (def.paramtype2 == "facedir" or + def.paramtype2 == "colorfacedir") then + -- Attach to whatever facedir is "mounted to". + -- For facedir, this is where tile no. 5 point at. + + -- The fallback vector here is in case 'facedir to dir' is nil due + -- to voxelmanip placing a wallmounted node without resetting a + -- pre-existing param2 value that is out-of-range for facedir. + -- The fallback vector corresponds to param2 = 0. + d = core.facedir_to_dir(n.param2) or vector.new(0, 0, 1) + elseif (def.paramtype2 == "4dir" or + def.paramtype2 == "color4dir") then + -- Similar to facedir handling + d = core.fourdir_to_dir(n.param2) or vector.new(0, 0, 1) + end + elseif def.paramtype2 == "wallmounted" or + def.paramtype2 == "colorwallmounted" then + -- Attach to whatever this node is "mounted to". + -- This where tile no. 2 points at. + + -- The fallback vector here is used for the same reason as + -- for facedir nodes. + d = core.wallmounted_to_dir(n.param2) or vector.new(0, 1, 0) + else + d.y = -1 + end + local p2 = vector.add(p, d) + local nn = core.get_node(p2).name + local def2 = core.registered_nodes[nn] + if def2 and not def2.walkable then + return false + end + return true + end + + return function(itemstack, placer, pointed_thing, param2) + ------------------- + -- MINETEST CODE -- + ------------------- + local def = itemstack:get_definition() + if def.type ~= "node" or pointed_thing.type ~= "node" then + return itemstack + end + + local under = pointed_thing.under + local oldnode_under = minetest.get_node_or_nil(under) + local above = pointed_thing.above + local oldnode_above = minetest.get_node_or_nil(above) + local playername = user_name(placer) + local log = make_log(playername) + + if not oldnode_under or not oldnode_above then + log("info", playername .. " tried to place" + .. " node in unloaded position " .. minetest.pos_to_string(above)) + return itemstack + end + + local olddef_under = minetest.registered_nodes[oldnode_under.name] + olddef_under = olddef_under or minetest.nodedef_default + local olddef_above = minetest.registered_nodes[oldnode_above.name] + olddef_above = olddef_above or minetest.nodedef_default + + if not olddef_above.buildable_to and not olddef_under.buildable_to then + log("info", playername .. " tried to place" + .. " node in invalid position " .. minetest.pos_to_string(above) + .. ", replacing " .. oldnode_above.name) + return itemstack + end + + --------------------- + -- CUSTOMIZED CODE -- + --------------------- + + -- Place above pointed node + local place_to = vector.copy(above) + + -- If node under is buildable_to, check for callback result and place into it instead + if olddef_under.buildable_to and not func(oldnode_under.name) then + log("info", "node under is buildable to") + place_to = vector.copy(under) + end + + ------------------- + -- MINETEST CODE -- + ------------------- + + if minetest.is_protected(place_to, playername) then + log("action", playername + .. " tried to place " .. def.name + .. " at protected position " + .. minetest.pos_to_string(place_to)) + minetest.record_protection_violation(place_to, playername) + return itemstack + end + + local oldnode = minetest.get_node(place_to) + local newnode = {name = def.name, param1 = 0, param2 = param2 or 0} + + -- Calculate direction for wall mounted stuff like torches and signs + if def.place_param2 ~= nil then + newnode.param2 = def.place_param2 + elseif (def.paramtype2 == "wallmounted" or + def.paramtype2 == "colorwallmounted") and not param2 then + local dir = vector.subtract(under, above) + newnode.param2 = minetest.dir_to_wallmounted(dir) + -- Calculate the direction for furnaces and chests and stuff + elseif (def.paramtype2 == "facedir" or + def.paramtype2 == "colorfacedir" or + def.paramtype2 == "4dir" or + def.paramtype2 == "color4dir") and not param2 then + local placer_pos = placer and placer:get_pos() + if placer_pos then + local dir = vector.subtract(above, placer_pos) + newnode.param2 = minetest.dir_to_facedir(dir) + log("info", "facedir: " .. newnode.param2) + end + end + + local metatable = itemstack:get_meta():to_table().fields + + -- Transfer color information + if metatable.palette_index and not def.place_param2 then + local color_divisor = nil + if def.paramtype2 == "color" then + color_divisor = 1 + elseif def.paramtype2 == "colorwallmounted" then + color_divisor = 8 + elseif def.paramtype2 == "colorfacedir" then + color_divisor = 32 + elseif def.paramtype2 == "color4dir" then + color_divisor = 4 + elseif def.paramtype2 == "colordegrotate" then + color_divisor = 32 + end + if color_divisor then + local color = math.floor(metatable.palette_index / color_divisor) + local other = newnode.param2 % color_divisor + newnode.param2 = color * color_divisor + other + end + end + + -- Check if the node is attached and if it can be placed there + local an = minetest.get_item_group(def.name, "attached_node") + if an ~= 0 and + not check_attached_node(place_to, newnode, an) then + log("action", "attached node " .. def.name .. + " cannot be placed at " .. minetest.pos_to_string(place_to)) + return itemstack + end + + log("action", playername .. " places node " + .. def.name .. " at " .. minetest.pos_to_string(place_to)) + + -- Add node and update + minetest.add_node(place_to, newnode) + + -- Play sound if it was done by a player + if playername ~= "" and def.sounds and def.sounds.place then + minetest.sound_play(def.sounds.place, { + pos = place_to, + exclude_player = playername, + }, true) + end + + local take_item = true + + -- Run callback + if def.after_place_node then + -- Deepcopy place_to and pointed_thing because callback can modify it + local place_to_copy = vector.copy(place_to) + local pointed_thing_copy = copy_pointed_thing(pointed_thing) + if def.after_place_node(place_to_copy, placer, itemstack, + pointed_thing_copy) then + take_item = false + end + end + + -- Run script hook + for _, callback in ipairs(minetest.registered_on_placenodes) do + -- Deepcopy pos, node and pointed_thing because callback can modify them + local place_to_copy = vector.copy(place_to) + local newnode_copy = {name = newnode.name, param1 = newnode.param1, param2 = newnode.param2} + local oldnode_copy = {name = oldnode.name, param1 = oldnode.param1, param2 = oldnode.param2} + local pointed_thing_copy = copy_pointed_thing(pointed_thing) + if callback(place_to_copy, newnode_copy, placer, oldnode_copy, itemstack, pointed_thing_copy) then + take_item = false + end + end + + if take_item then + itemstack:take_item() + end + return itemstack + end +end + --[[Check for a protection violation in a given area. -- -- Applies is_protected() to a 3D lattice of points in the defined volume. The points are spaced diff --git a/mods/ITEMS/mcl_core/nodes_misc.lua b/mods/ITEMS/mcl_core/nodes_misc.lua index 5b589332b..bf5300510 100644 --- a/mods/ITEMS/mcl_core/nodes_misc.lua +++ b/mods/ITEMS/mcl_core/nodes_misc.lua @@ -262,6 +262,8 @@ for i = 0, 14 do --minetest.LIGHT_MAX walkable = false, light_source = i, drop = "", + buildable_to = true, + node_placement_prediction = "", inventory_image = "mcl_core_light_" .. i .. ".png", wield_image = "mcl_core_light_" .. i .. ".png", sunlight_propagates = true, @@ -272,6 +274,9 @@ for i = 0, 14 do --minetest.LIGHT_MAX itemstack:set_name("mcl_core:light_" .. ((i == 14) and 0 or i + 1)) return itemstack end, + on_place = mcl_util.bypass_buildable_to(function(node_name) + return string.match(node_name, "^mcl_core:light_(%d+)$") + end), after_place_node = function(pos, placer, itemstack, pointed_thing) if placer == nil then return From e9c9f151de8d922f20c77e7fbfd2cc978c6f6512 Mon Sep 17 00:00:00 2001 From: AFCMS Date: Sat, 14 Jan 2023 09:56:24 +0100 Subject: [PATCH 093/105] Let user dig light blocks when wielding a light block --- mods/ITEMS/mcl_core/nodes_misc.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_core/nodes_misc.lua b/mods/ITEMS/mcl_core/nodes_misc.lua index bf5300510..679810a5e 100644 --- a/mods/ITEMS/mcl_core/nodes_misc.lua +++ b/mods/ITEMS/mcl_core/nodes_misc.lua @@ -252,6 +252,9 @@ minetest.register_node("mcl_core:realm_barrier", { --- Light blocks --- TODO: make node only pointable when wielding it +local light_block_pattern = "^mcl_core:light_(%d+)$" + + for i = 0, 14 do --minetest.LIGHT_MAX minetest.register_node("mcl_core:light_" .. i, { description = S("Light"), @@ -271,11 +274,15 @@ for i = 0, 14 do --minetest.LIGHT_MAX groups = {creative_breakable = 1, not_solid = 1, light_block = i + 1}, on_blast = function(pos, intensity) end, on_use = function(itemstack, user, pointed_thing) + if pointed_thing.type == "node" and string.match(minetest.get_node(pointed_thing.under).name, light_block_pattern) and not user:get_player_control().sneak then + minetest.dig_node(pointed_thing.under) + return + end itemstack:set_name("mcl_core:light_" .. ((i == 14) and 0 or i + 1)) return itemstack end, on_place = mcl_util.bypass_buildable_to(function(node_name) - return string.match(node_name, "^mcl_core:light_(%d+)$") + return string.match(node_name, light_block_pattern) end), after_place_node = function(pos, placer, itemstack, pointed_thing) if placer == nil then From 302796531486d12f6f2d19486793108e276e08ca Mon Sep 17 00:00:00 2001 From: AFCMS Date: Sat, 14 Jan 2023 10:06:23 +0100 Subject: [PATCH 094/105] Add comment --- mods/ITEMS/mcl_core/nodes_misc.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_core/nodes_misc.lua b/mods/ITEMS/mcl_core/nodes_misc.lua index 679810a5e..47949057c 100644 --- a/mods/ITEMS/mcl_core/nodes_misc.lua +++ b/mods/ITEMS/mcl_core/nodes_misc.lua @@ -274,6 +274,7 @@ for i = 0, 14 do --minetest.LIGHT_MAX groups = {creative_breakable = 1, not_solid = 1, light_block = i + 1}, on_blast = function(pos, intensity) end, on_use = function(itemstack, user, pointed_thing) + -- user:get_player_control() returns {} for non players, so we don't need user:is_player() if pointed_thing.type == "node" and string.match(minetest.get_node(pointed_thing.under).name, light_block_pattern) and not user:get_player_control().sneak then minetest.dig_node(pointed_thing.under) return @@ -285,7 +286,7 @@ for i = 0, 14 do --minetest.LIGHT_MAX return string.match(node_name, light_block_pattern) end), after_place_node = function(pos, placer, itemstack, pointed_thing) - if placer == nil then + if not placer then return end minetest.add_particle({ From a7fac7c550e3a9f8554cf1e464cbde07cb6a3bcb Mon Sep 17 00:00:00 2001 From: b3nderman Date: Sat, 14 Jan 2023 19:32:32 -0700 Subject: [PATCH 095/105] Fix tamed ocelot textures not being set correctly --- mods/ENTITIES/mobs_mc/ocelot.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/ENTITIES/mobs_mc/ocelot.lua b/mods/ENTITIES/mobs_mc/ocelot.lua index 8a7ea7545..65181a581 100644 --- a/mods/ENTITIES/mobs_mc/ocelot.lua +++ b/mods/ENTITIES/mobs_mc/ocelot.lua @@ -164,7 +164,7 @@ cat.on_spawn = function(self) if not self._texture then self._texture = cat.textures[math.random(#cat.textures)] end - self.object:set_properties({textures = {self._texture}}) + self.object:set_properties({textures = self._texture}) end mcl_mobs.register_mob("mobs_mc:cat", cat) From 0c61035df08eec1f94e0fd6390ff188c66c00924 Mon Sep 17 00:00:00 2001 From: Michieal Date: Sun, 15 Jan 2023 14:30:12 -0500 Subject: [PATCH 096/105] Missing files from the optipng commit. (not exactly sure what happened.) --- .../textures/mcl_bamboo_fence_bamboo.png | Bin 235 -> 235 bytes .../textures/mcl_bamboo_fence_gate_bamboo.png | Bin 297 -> 297 bytes .../textures/mcl_bamboo_scaffolding_bottom.png | Bin 205 -> 187 bytes .../textures/mcl_bamboo_scaffolding_top.png | Bin 284 -> 308 bytes .../textures/mcl_bamboo_trapdoor_side.png | Bin 467 -> 463 bytes 5 files changed, 0 insertions(+), 0 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_fence_bamboo.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_fence_bamboo.png index 6428e93ddca855fe33e4dc03ba94be209355bb9a..21adb17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6Ed?J Date: Sun, 15 Jan 2023 15:30:34 -0500 Subject: [PATCH 097/105] Added Bamboo Biomes to spawning.lua. --- mods/ENTITIES/mcl_mobs/spawning.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mods/ENTITIES/mcl_mobs/spawning.lua b/mods/ENTITIES/mcl_mobs/spawning.lua index 075659bee..6fc600605 100644 --- a/mods/ENTITIES/mcl_mobs/spawning.lua +++ b/mods/ENTITIES/mcl_mobs/spawning.lua @@ -169,6 +169,8 @@ local list_of_all_biomes = { "MushroomIslandShore", "JungleM_shore", "Jungle_shore", + "BambooJungleM_shore", + "BambooJungle_shore", "MangroveSwamp_shore", -- dimension biome: @@ -216,6 +218,10 @@ local list_of_all_biomes = { "JungleEdge", "SavannaM", "MangroveSwamp", + "BambooJungle", + "BambooJungleEdge", + "BambooJungleEdgeM", + "BambooJungleM", } -- count how many mobs are in an area From 8f6c932e883d356501fe8c0e6e1482be259b3010 Mon Sep 17 00:00:00 2001 From: ancientmarinerdev Date: Sun, 15 Jan 2023 00:53:43 +0000 Subject: [PATCH 098/105] Allow blaze spawners to be deactivated --- mods/MAPGEN/mcl_nether_fortresses/init.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mods/MAPGEN/mcl_nether_fortresses/init.lua b/mods/MAPGEN/mcl_nether_fortresses/init.lua index bf8f9c599..b736ff133 100644 --- a/mods/MAPGEN/mcl_nether_fortresses/init.lua +++ b/mods/MAPGEN/mcl_nether_fortresses/init.lua @@ -3,6 +3,8 @@ local S = minetest.get_translator(modname) local modpath = minetest.get_modpath(modname) local peaceful = minetest.settings:get_bool("only_peaceful_mobs", false) +local BLAZE_SPAWNER_MAX_LIGHT = 11 + mcl_structures.register_structure("nether_outpost",{ place_on = {"mcl_nether:netherrack","mcl_crimson:crimson_nylium","mcl_crimson:warped_nylium","mcl_blackstone:basalt","mcl_blackstone:soul_soil","mcl_blackstone:blackstone","mcl_nether:soul_sand"}, fill_ratio = 0.01, @@ -19,7 +21,7 @@ mcl_structures.register_structure("nether_outpost",{ after_place = function(pos) local sp = minetest.find_nodes_in_area(pos,vector.offset(pos,0,20,0),{"mcl_mobspawners:spawner"}) if not sp[1] then return end - mcl_mobspawners.setup_spawner(sp[1], "mobs_mc:blaze", 0, minetest.LIGHT_MAX+1, 10, 8, 0) + mcl_mobspawners.setup_spawner(sp[1], "mobs_mc:blaze", 0, BLAZE_SPAWNER_MAX_LIGHT, 10, 8, 0) end }) local nbridges = { @@ -83,7 +85,7 @@ mcl_structures.register_structure("nether_outpost_with_bridges",{ after_place = function(pos,def,pr) local sp = minetest.find_nodes_in_area(pos,vector.offset(pos,0,20,0),{"mcl_mobspawners:spawner"}) if not sp[1] then return end - mcl_mobspawners.setup_spawner(sp[1], "mobs_mc:blaze", 0, minetest.LIGHT_MAX+1, 10, 8, 0) + mcl_mobspawners.setup_spawner(sp[1], "mobs_mc:blaze", 0, BLAZE_SPAWNER_MAX_LIGHT, 10, 8, 0) local legs = minetest.find_nodes_in_area(vector.offset(pos,-45,-2,-45),vector.offset(pos,45,0,45), "mcl_nether:nether_brick") local bricks = {} From 38732e801d7a0cd16f1efbdba2a429c9151886f1 Mon Sep 17 00:00:00 2001 From: ancientmarinerdev Date: Fri, 13 Jan 2023 00:25:52 +0000 Subject: [PATCH 099/105] Fix geode crash --- mods/MAPGEN/mcl_structures/geode.lua | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/mods/MAPGEN/mcl_structures/geode.lua b/mods/MAPGEN/mcl_structures/geode.lua index 95f9b0e81..56453ee60 100644 --- a/mods/MAPGEN/mcl_structures/geode.lua +++ b/mods/MAPGEN/mcl_structures/geode.lua @@ -7,7 +7,8 @@ local adjacents = { vector.new(0,-1,0) } -local function set_node_no_bedrock(pos,node) +local function set_node_no_bedrock(pos, node) + if not pos then return end local n = minetest.get_node(pos) if n.name == "mcl_core:bedrock" then return end return minetest.set_node(pos,node) @@ -21,12 +22,18 @@ local function makegeode(pos,def,pr) if calls_remaining ~= 0 then return end local calcite = {} local nn = minetest.find_nodes_in_area(p1,p2,{"group:material_stone","group:dirt","mcl_core:gravel"}) + + if not nn or #nn < 2 then + minetest.log("action", "Not enough valid space to generate geode at pos: " .. minetest.pos_to_string(pos)) + return + end + table.sort(nn,function(a, b) return vector.distance(pos, a) < vector.distance(pos, b) end) - if not nn[1] then return end + --if not nn[1] then return end - for i=1,pr:next(1,math.max(2,#nn - math.ceil(#nn/5) )) do + for i=1,pr:next(1, math.max(2, #nn - math.ceil(#nn/5) )) do set_node_no_bedrock(nn[i],{name="mcl_amethyst:amethyst_block"}) end From f9b021e4c6514b02c4133d11f774dda215a54931 Mon Sep 17 00:00:00 2001 From: b3nderman Date: Sat, 14 Jan 2023 18:52:42 -0700 Subject: [PATCH 100/105] Fix animals jumping way too high upon growing up --- mods/ENTITIES/mcl_mobs/breeding.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/ENTITIES/mcl_mobs/breeding.lua b/mods/ENTITIES/mcl_mobs/breeding.lua index 33e05f23b..b7c608c04 100644 --- a/mods/ENTITIES/mcl_mobs/breeding.lua +++ b/mods/ENTITIES/mcl_mobs/breeding.lua @@ -178,7 +178,7 @@ function mob_class:check_breeding() -- jump when fully grown so as not to fall into ground self.object:set_velocity({ x = 0, - y = self.jump_height*3, + y = self.jump_height, z = 0 }) end From 9b28baaad635f0acbff6ba98b88dcd21b3e68fd2 Mon Sep 17 00:00:00 2001 From: ancientmarinerdev Date: Wed, 11 Jan 2023 23:25:37 +0000 Subject: [PATCH 101/105] Give longer to breed mobs. 1.5s is not enough --- mods/ENTITIES/mcl_mobs/breeding.lua | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/mods/ENTITIES/mcl_mobs/breeding.lua b/mods/ENTITIES/mcl_mobs/breeding.lua index b7c608c04..67424d2b8 100644 --- a/mods/ENTITIES/mcl_mobs/breeding.lua +++ b/mods/ENTITIES/mcl_mobs/breeding.lua @@ -1,8 +1,8 @@ local math, vector, minetest, mcl_mobs = math, vector, minetest, mcl_mobs local mob_class = mcl_mobs.mob_class -local HORNY_TIME = 30 -local HORNY_AGAIN_TIME = 300 +local HORNY_TIME = 30*20 +local HORNY_AGAIN_TIME = 30*20 -- was 300 or 15*20 local CHILD_GROW_TIME = 60*20 local LOGGING_ON = minetest.settings:get_bool("mcl_logging_mobs_villager",false) @@ -190,18 +190,16 @@ function mob_class:check_breeding() end return - end + else + -- horny animal can mate for HORNY_TIME seconds, + -- afterwards horny animal cannot mate again for HORNY_AGAIN_TIME seconds + if self.horny == true then + self.hornytimer = self.hornytimer + 1 - -- horny animal can mate for HORNY_TIME seconds, - -- afterwards horny animal cannot mate again for HORNY_AGAIN_TIME seconds - if self.horny == true - and self.hornytimer < HORNY_TIME + HORNY_AGAIN_TIME then - - self.hornytimer = self.hornytimer + 1 - - if self.hornytimer >= HORNY_TIME + HORNY_AGAIN_TIME then - self.hornytimer = 0 - self.horny = false + if self.hornytimer >= HORNY_TIME + HORNY_AGAIN_TIME then + self.hornytimer = 0 + self.horny = false + end end end From 6e6c11cde294d42f07922923974ed34513d2fd18 Mon Sep 17 00:00:00 2001 From: Johannes Fritz Date: Sat, 14 Jan 2023 14:53:52 -0600 Subject: [PATCH 102/105] Fix undeclared global variable in mcl_buckets --- mods/ITEMS/mcl_buckets/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_buckets/init.lua b/mods/ITEMS/mcl_buckets/init.lua index 0851c3757..f7acddf4b 100644 --- a/mods/ITEMS/mcl_buckets/init.lua +++ b/mods/ITEMS/mcl_buckets/init.lua @@ -139,7 +139,7 @@ local function bucket_get_pointed_thing(user) local start = user:get_pos() start.y = start.y + user:get_properties().eye_height local look_dir = user:get_look_dir() - _end = vector.add(start, vector.multiply(look_dir, 5)) + local _end = vector.add(start, vector.multiply(look_dir, 5)) local ray = raycast(start, _end, false, true) for pointed_thing in ray do From b805ae99267ee8d561f264d7cc1afe51da8d6d80 Mon Sep 17 00:00:00 2001 From: Michieal Date: Mon, 16 Jan 2023 15:01:38 -0500 Subject: [PATCH 103/105] Adjust bamboo growth rates to be close to the MC wiki. --- mods/ITEMS/mcl_bamboo/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/init.lua b/mods/ITEMS/mcl_bamboo/init.lua index fe97c19d4..6b952e443 100644 --- a/mods/ITEMS/mcl_bamboo/init.lua +++ b/mods/ITEMS/mcl_bamboo/init.lua @@ -27,8 +27,8 @@ dofile(minetest.get_modpath(modname) .. "/recipes.lua") --ABMs minetest.register_abm({ nodenames = mcl_bamboo.bamboo_index, - interval = 31.5, - chance = 40, + interval = 10, + chance = 20, action = function(pos, _) mcl_bamboo.grow_bamboo(pos, false) end, From 55bb9800f44daffddaf69d8357635c70fde6f73c Mon Sep 17 00:00:00 2001 From: Michieal Date: Mon, 16 Jan 2023 15:07:57 -0500 Subject: [PATCH 104/105] removed errant logging line. --- mods/ITEMS/mcl_bamboo/bamboo_base.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_bamboo/bamboo_base.lua b/mods/ITEMS/mcl_bamboo/bamboo_base.lua index 7765c4ca9..4c67a48c5 100644 --- a/mods/ITEMS/mcl_bamboo/bamboo_base.lua +++ b/mods/ITEMS/mcl_bamboo/bamboo_base.lua @@ -199,7 +199,7 @@ local bamboo_def = { end local node_above_name = minetest.get_node(pointed_thing.above).name - minetest.log("\n\n\nnode_above name: " .. node_above_name) + mcl_bamboo.mcl_log("\n\n\nnode_above name: " .. node_above_name) if node_above_name ~= "mcl_core:water_source" and node_above_name ~= "mcl_core:lava_source" and node_above_name ~= "mcl_nether:nether_lava_source" then local _, position = minetest.item_place(place_item, placer, pointed_thing, fdir) From ac30e25065eeba51d39a8820c29066a1f1b47d5a Mon Sep 17 00:00:00 2001 From: Michieal Date: Mon, 16 Jan 2023 19:40:07 -0500 Subject: [PATCH 105/105] Remove "mcl_farming:beetroot_item" from fortune drop, so Fortune only gives seeds. --- mods/ITEMS/mcl_farming/beetroot.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_farming/beetroot.lua b/mods/ITEMS/mcl_farming/beetroot.lua index c562a2558..042af9e59 100644 --- a/mods/ITEMS/mcl_farming/beetroot.lua +++ b/mods/ITEMS/mcl_farming/beetroot.lua @@ -118,7 +118,7 @@ minetest.register_node("mcl_farming:beetroot", { _mcl_fortune_drop = { discrete_uniform_distribution = true, - items = {"mcl_farming:beetroot_item", "mcl_farming:beetroot_seeds"}, + items = {"mcl_farming:beetroot_seeds"}, min_count = 1, max_count = 3, cap = 5,