From 1f97cbbe0053a5c1751cce143e88b6031fe331f7 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Sat, 4 Nov 2023 07:56:55 +0000 Subject: [PATCH 1/6] fix hemp fibre recipe (thx fluxionary) --- crops/hemp.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crops/hemp.lua b/crops/hemp.lua index ac2b1dc..972ed4d 100644 --- a/crops/hemp.lua +++ b/crops/hemp.lua @@ -91,7 +91,7 @@ minetest.register_craft( { {"farming:hemp_leaf", "group:water_bucket", "farming:hemp_leaf"}, {"farming:hemp_leaf", "farming:hemp_leaf", "farming:hemp_leaf"} }, - replacements = {{a.bucket_water, a.bucket_empty}} + replacements = {{"group:water_bucket", a.bucket_empty}} }) if minetest.get_modpath("bucket_wooden") then From 12eb5579a19f9108f8e99be772d2a00a063da880 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Sat, 25 Nov 2023 12:05:21 +0000 Subject: [PATCH 2/6] added handy=1 group to seeds, hemp block and hemp rope (thx usrib) --- crops/barley.lua | 5 ++++- crops/cotton.lua | 4 +++- crops/hemp.lua | 8 ++++++-- crops/mint.lua | 2 +- crops/rice.lua | 2 +- crops/sunflower.lua | 2 +- crops/wheat.lua | 4 +++- init.lua | 4 ++-- 8 files changed, 21 insertions(+), 10 deletions(-) diff --git a/crops/barley.lua b/crops/barley.lua index 9114b17..76eb963 100644 --- a/crops/barley.lua +++ b/crops/barley.lua @@ -9,7 +9,10 @@ minetest.register_node("farming:seed_barley", { inventory_image = "farming_barley_seed.png", wield_image = "farming_barley_seed.png", drawtype = "signlike", - groups = {compostability = 48, seed = 1, snappy = 3, attached_node = 1, growing = 1}, + groups = { + handy = 1, compostability = 48, seed = 1, snappy = 3, attached_node = 1, + growing = 1 + }, paramtype = "light", paramtype2 = "wallmounted", walkable = false, diff --git a/crops/cotton.lua b/crops/cotton.lua index c0dac62..e09381f 100644 --- a/crops/cotton.lua +++ b/crops/cotton.lua @@ -14,7 +14,9 @@ minetest.register_node("farming:cotton_wild", { sunlight_propagates = true, walkable = false, buildable_to = true, - groups = {handy = 1, snappy = 3, attached_node = 1, flammable = 4, compostability = 60}, + groups = { + handy = 1, snappy = 3, attached_node = 1, flammable = 4, compostability = 60 + }, drop = { items = { {items = {"farming:cotton"}, rarity = 2}, diff --git a/crops/hemp.lua b/crops/hemp.lua index 972ed4d..cc41638 100644 --- a/crops/hemp.lua +++ b/crops/hemp.lua @@ -9,7 +9,10 @@ minetest.register_node("farming:seed_hemp", { inventory_image = "farming_hemp_seed.png", wield_image = "farming_hemp_seed.png", drawtype = "signlike", - groups = {compostability = 38, seed = 1, snappy = 3, attached_node = 1, growing = 1}, + groups = { + handy = 1, compostability = 38, seed = 1, snappy = 3, attached_node = 1, + growing = 1 + }, paramtype = "light", paramtype2 = "wallmounted", walkable = false, @@ -178,7 +181,8 @@ minetest.register_node("farming:hemp_rope", { inventory_image = "farming_hemp_rope.png", drawtype = "plantlike", groups = { - flammable = 2, choppy = 3, oddly_breakable_by_hand = 3, compostability = 55 + handy = 1, axey = 1, flammable = 2, choppy = 3, oddly_breakable_by_hand = 3, + compostability = 55 }, sounds = farming.sounds.node_sound_leaves_defaults(), selection_box = { diff --git a/crops/mint.lua b/crops/mint.lua index eeed4c7..f8afebb 100644 --- a/crops/mint.lua +++ b/crops/mint.lua @@ -11,7 +11,7 @@ minetest.register_node("farming:seed_mint", { drawtype = "signlike", groups = { compostability = 48, seed = 1, snappy = 3, attached_node = 1, growing = 1, - flammable = 2 + handy = 1, flammable = 2 }, paramtype = "light", paramtype2 = "wallmounted", diff --git a/crops/rice.lua b/crops/rice.lua index 1e831f3..372b2f4 100644 --- a/crops/rice.lua +++ b/crops/rice.lua @@ -10,7 +10,7 @@ minetest.register_node("farming:seed_rice", { wield_image = "farming_rice_seed.png", drawtype = "signlike", groups = { - compostability = 48, seed = 1, snappy = 3, attached_node = 1, + handy = 1, compostability = 48, seed = 1, snappy = 3, attached_node = 1, flammable = 4, growing = 1 }, paramtype = "light", diff --git a/crops/sunflower.lua b/crops/sunflower.lua index df7f43a..15c62e0 100644 --- a/crops/sunflower.lua +++ b/crops/sunflower.lua @@ -18,7 +18,7 @@ minetest.register_node("farming:seed_sunflower", { drawtype = "signlike", groups = { compostability = 48, seed = 1, snappy = 3, attached_node = 1, growing = 1, - food_sunflower_seeds = 1, flammable = 2 + handy = 1, food_sunflower_seeds = 1, flammable = 2 }, paramtype = "light", paramtype2 = "wallmounted", diff --git a/crops/wheat.lua b/crops/wheat.lua index 7d62db0..0b070d8 100644 --- a/crops/wheat.lua +++ b/crops/wheat.lua @@ -9,7 +9,9 @@ minetest.register_node("farming:seed_wheat", { inventory_image = "farming_wheat_seed.png", wield_image = "farming_wheat_seed.png", drawtype = "signlike", - groups = {seed = 1, snappy = 3, attached_node = 1, flammable = 4, growing = 1}, + groups = { + handy = 1, seed = 1, snappy = 3, attached_node = 1, flammable = 4, growing = 1 + }, paramtype = "light", paramtype2 = "wallmounted", walkable = false, diff --git a/init.lua b/init.lua index 5d76a64..f968b59 100644 --- a/init.lua +++ b/init.lua @@ -7,7 +7,7 @@ farming = { mod = "redo", - version = "20230915", + version = "20231125", path = minetest.get_modpath("farming"), select = { type = "fixed", @@ -586,7 +586,7 @@ farming.register_plant = function(name, def) drawtype = "signlike", groups = { seed = 1, snappy = 3, attached_node = 1, flammable = 2, growing = 1, - compostability = 65 + compostability = 65, handy = 1 }, paramtype = "light", paramtype2 = "wallmounted", From a0dd3db65f8921d355c5fd784fcdd6439f026dc8 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Sat, 25 Nov 2023 14:07:05 +0000 Subject: [PATCH 3/6] better mineclone/mineclonia support --- crops/hemp.lua | 10 +++++++--- crops/melon.lua | 4 +++- crops/pumpkin.lua | 18 +++++++++++++----- crops/wheat.lua | 6 ++++-- food.lua | 12 ++++++++---- 5 files changed, 35 insertions(+), 15 deletions(-) diff --git a/crops/hemp.lua b/crops/hemp.lua index cc41638..bc15e0c 100644 --- a/crops/hemp.lua +++ b/crops/hemp.lua @@ -115,10 +115,12 @@ minetest.register_node("farming:hemp_block", { tiles = {"farming_hemp_block.png"}, paramtype = "light", groups = { - handy = 1, snappy = 2, oddly_breakable_by_hand = 1, flammable = 2, + axey = 1, handy = 1, snappy = 2, oddly_breakable_by_hand = 1, flammable = 2, compostability = 85 }, - sounds = farming.sounds.node_sound_leaves_defaults() + sounds = farming.sounds.node_sound_leaves_defaults(), + _mcl_hardness = 0.8, + _mcl_blast_resistance = 1 }) minetest.register_craft( { @@ -188,7 +190,9 @@ minetest.register_node("farming:hemp_rope", { selection_box = { type = "fixed", fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7} - } + }, + _mcl_hardness = 0.8, + _mcl_blast_resistance = 1 }) -- string diff --git a/crops/melon.lua b/crops/melon.lua index 5d4e6b1..85a1af9 100644 --- a/crops/melon.lua +++ b/crops/melon.lua @@ -86,7 +86,9 @@ minetest.register_node("farming:melon_8", { drop = "farming:melon_8", sounds = farming.sounds.node_sound_wood_defaults(), paramtype2 = "facedir", - on_place = minetest.rotate_node + on_place = minetest.rotate_node, + _mcl_hardness = 0.8, + _mcl_blast_resistance = 1 }) -- add to registered_plants diff --git a/crops/pumpkin.lua b/crops/pumpkin.lua index 3f4d95a..617fb1c 100644 --- a/crops/pumpkin.lua +++ b/crops/pumpkin.lua @@ -49,7 +49,9 @@ minetest.register_node("farming:jackolantern", { if minetest.is_protected(pos, name) then return end node.name = "farming:jackolantern_on" minetest.swap_node(pos, node) - end + end, + _mcl_hardness = 0.8, + _mcl_blast_resistance = 1 }) minetest.register_node("farming:jackolantern_on", { @@ -74,7 +76,9 @@ minetest.register_node("farming:jackolantern_on", { if minetest.is_protected(pos, name) then return end node.name = "farming:jackolantern" minetest.swap_node(pos, node) - end + end, + _mcl_hardness = 0.8, + _mcl_blast_resistance = 1 }) minetest.register_craft({ @@ -100,7 +104,9 @@ minetest.register_node("farming:scarecrow_bottom", { {-12/16, 4/16, -1/16, 12/16, 2/16, 1/16}, } }, - groups = {handy = 1, snappy = 3, flammable = 2} + groups = {axey = 1, handy = 1, snappy = 3, flammable = 2}, + _mcl_hardness = 0.8, + _mcl_blast_resistance = 1 }) minetest.register_craft({ @@ -194,12 +200,14 @@ minetest.register_node("farming:pumpkin_8", { }, groups = { food_pumpkin = 1, snappy = 3, choppy = 3, oddly_breakable_by_hand = 2, - flammable = 2, plant = 1 + flammable = 2, plant = 1, handy = 1 }, drop = "farming:pumpkin_8", sounds = farming.sounds.node_sound_wood_defaults(), paramtype2 = "facedir", - on_place = minetest.rotate_node + on_place = minetest.rotate_node, + _mcl_hardness = 0.8, + _mcl_blast_resistance = 1 }) minetest.register_alias("farming:pumpkin", "farming:pumpkin_8") diff --git a/crops/wheat.lua b/crops/wheat.lua index 0b070d8..8770c70 100644 --- a/crops/wheat.lua +++ b/crops/wheat.lua @@ -38,8 +38,10 @@ minetest.register_node("farming:straw", { description = S("Straw"), tiles = {"farming_straw.png"}, is_ground_content = false, - groups = {snappy = 3, flammable = 4, fall_damage_add_percent = -30}, - sounds = farming.sounds.node_sound_leaves_defaults() + groups = {handy = 1, snappy = 3, flammable = 4, fall_damage_add_percent = -30}, + sounds = farming.sounds.node_sound_leaves_defaults(), + _mcl_hardness = 0.8, + _mcl_blast_resistance = 1 }) minetest.register_craft({ diff --git a/food.lua b/food.lua index 15728e5..494408e 100644 --- a/food.lua +++ b/food.lua @@ -135,9 +135,11 @@ end minetest.register_node("farming:sugar_cube", { description = S("Sugar Cube"), tiles = {"farming_sugar_cube.png"}, - groups = {crumbly = 2}, + groups = {pickaxey = 1, crumbly = 2}, floodable = true, - sounds = farming.sounds.node_sound_gravel_defaults() + sounds = farming.sounds.node_sound_gravel_defaults(), + _mcl_hardness = 0.8, + _mcl_blast_resistance = 1 }) minetest.register_craft({ @@ -248,12 +250,14 @@ minetest.register_node("farming:salt_crystal", { paramtype = "light", light_source = 1, tiles = {"farming_salt_crystal.png"}, - groups = { dig_immediate = 3, attached_node = 1}, + groups = {dig_immediate = 3, attached_node = 1}, sounds = farming.sounds.node_sound_defaults(), selection_box = { type = "fixed", fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25} - } + }, + _mcl_hardness = 0.8, + _mcl_blast_resistance = 1 }) minetest.register_craft({ From 9247121b14a7c9c2ab04533b0af3dd7b74fc15bd Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Sat, 25 Nov 2023 16:51:34 +0000 Subject: [PATCH 4/6] mcl group tweaks --- crops/hemp.lua | 4 ++-- food.lua | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crops/hemp.lua b/crops/hemp.lua index bc15e0c..6cf2671 100644 --- a/crops/hemp.lua +++ b/crops/hemp.lua @@ -183,8 +183,8 @@ minetest.register_node("farming:hemp_rope", { inventory_image = "farming_hemp_rope.png", drawtype = "plantlike", groups = { - handy = 1, axey = 1, flammable = 2, choppy = 3, oddly_breakable_by_hand = 3, - compostability = 55 + handy = 1, axey = 1, swordy = 1, flammable = 2, choppy = 3, + oddly_breakable_by_hand = 3, compostability = 55 }, sounds = farming.sounds.node_sound_leaves_defaults(), selection_box = { diff --git a/food.lua b/food.lua index 494408e..9e8c523 100644 --- a/food.lua +++ b/food.lua @@ -135,7 +135,7 @@ end minetest.register_node("farming:sugar_cube", { description = S("Sugar Cube"), tiles = {"farming_sugar_cube.png"}, - groups = {pickaxey = 1, crumbly = 2}, + groups = {shovely = 1, handy = 1, crumbly = 2}, floodable = true, sounds = farming.sounds.node_sound_gravel_defaults(), _mcl_hardness = 0.8, From 51d5132708d4d5f11cbf662ab127adc4a76c2389 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Mon, 4 Dec 2023 22:31:12 +0000 Subject: [PATCH 5/6] tweak default compatibility --- compatibility.lua | 6 +++--- init.lua | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/compatibility.lua b/compatibility.lua index 3b1fe2b..e718ee5 100644 --- a/compatibility.lua +++ b/compatibility.lua @@ -31,7 +31,7 @@ else }, groups = {food_banana = 1, fleshy = 3, dig_immediate = 3, flammable = 2}, on_use = minetest.item_eat(2), - sounds = default.node_sound_leaves_defaults() + sounds = farming.sounds.node_sound_leaves_defaults() }) minetest.register_node(":ethereal:bananaleaves", { @@ -42,7 +42,7 @@ else paramtype = "light", waving = 1, groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2}, - sounds = default.node_sound_leaves_defaults() + sounds = farming.sounds.node_sound_leaves_defaults() }) alias("farming_plus:banana_sapling", "default:sapling") @@ -89,7 +89,7 @@ else }, groups = {food_orange = 1, fleshy = 3, dig_immediate = 3, flammable = 2}, on_use = minetest.item_eat(4), - sounds = default.node_sound_leaves_defaults() + sounds = farming.sounds.node_sound_leaves_defaults() }) alias("farming_plus:orange_item", "ethereal:orange") diff --git a/init.lua b/init.lua index f968b59..42e483a 100644 --- a/init.lua +++ b/init.lua @@ -7,7 +7,7 @@ farming = { mod = "redo", - version = "20231125", + version = "20231204", path = minetest.get_modpath("farming"), select = { type = "fixed", @@ -755,7 +755,7 @@ end dofile(farming.path .. "/items.lua") -- important items -if not farming.mcl then +if minetest.get_modpath("default") then dofile(farming.path .. "/soil.lua") dofile(farming.path .. "/hoes.lua") end From 612aea3d312763947f7b9b8cf399ed5536a2d28c Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Wed, 6 Dec 2023 17:29:50 +0000 Subject: [PATCH 6/6] add missing stone sounds to farming.sounds --- init.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/init.lua b/init.lua index 42e483a..225ce51 100644 --- a/init.lua +++ b/init.lua @@ -7,7 +7,7 @@ farming = { mod = "redo", - version = "20231204", + version = "20231206", path = minetest.get_modpath("farming"), select = { type = "fixed", @@ -29,10 +29,11 @@ farming = { -- default sound functions just incase function farming.sounds.node_sound_defaults() end -function farming.sounds.node_sound_leaves_defaults() end function farming.sounds.node_sound_glass_defaults() end -function farming.sounds.node_sound_wood_defaults() end function farming.sounds.node_sound_gravel_defaults() end +function farming.sounds.node_sound_leaves_defaults() end +function farming.sounds.node_sound_stone_defaults() end +function farming.sounds.node_sound_wood_defaults() end -- sounds check if farming.mtg then farming.sounds = default end