diff --git a/crops/artichoke.lua b/crops/artichoke.lua index 71fee98..7b5f037 100644 --- a/crops/artichoke.lua +++ b/crops/artichoke.lua @@ -27,6 +27,7 @@ local def = { handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1, not_in_creative_inventory = 1, growing = 1 }, + _mcl_hardness = farming.mcl_hardness, is_ground_content = false, sounds = farming.sounds.node_sound_leaves_defaults() } diff --git a/crops/asparagus.lua b/crops/asparagus.lua index 0d60eeb..ed4f74f 100644 --- a/crops/asparagus.lua +++ b/crops/asparagus.lua @@ -29,6 +29,7 @@ local def = { handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1, not_in_creative_inventory = 1, growing = 1 }, + _mcl_hardness = farming.mcl_hardness, is_ground_content = false, sounds = farming.sounds.node_sound_leaves_defaults() } diff --git a/crops/barley.lua b/crops/barley.lua index b0a5ada..ec189e9 100644 --- a/crops/barley.lua +++ b/crops/barley.lua @@ -13,6 +13,7 @@ minetest.register_node("farming:seed_barley", { handy = 1, compostability = 48, seed = 1, snappy = 3, attached_node = 1, growing = 1 }, + _mcl_hardness = farming.mcl_hardness, is_ground_content = false, paramtype = "light", paramtype2 = "wallmounted", @@ -62,6 +63,7 @@ local def = { handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1, not_in_creative_inventory = 1, growing = 1 }, + _mcl_hardness = farming.mcl_hardness, is_ground_content = false, sounds = farming.sounds.node_sound_leaves_defaults() } diff --git a/crops/beans.lua b/crops/beans.lua index 7f63d33..d36eb9b 100644 --- a/crops/beans.lua +++ b/crops/beans.lua @@ -191,6 +191,7 @@ local def = { handy = 1, snappy = 3, flammable = 3, not_in_creative_inventory = 1, attached_node = 1, growing = 1, plant = 1 }, + _mcl_hardness = farming.mcl_hardness, is_ground_content = false, sounds = farming.sounds.node_sound_leaves_defaults() } diff --git a/crops/beetroot.lua b/crops/beetroot.lua index b0de0d4..d13bdd1 100644 --- a/crops/beetroot.lua +++ b/crops/beetroot.lua @@ -49,6 +49,7 @@ local def = { handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1, not_in_creative_inventory = 1, growing = 1 }, + _mcl_hardness = farming.mcl_hardness, is_ground_content = false, sounds = farming.sounds.node_sound_leaves_defaults() } diff --git a/crops/blackberry.lua b/crops/blackberry.lua index 1613acf..5fa761d 100644 --- a/crops/blackberry.lua +++ b/crops/blackberry.lua @@ -28,6 +28,7 @@ local def = { handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1, not_in_creative_inventory = 1, growing = 1 }, + _mcl_hardness = farming.mcl_hardness, is_ground_content = false, sounds = farming.sounds.node_sound_leaves_defaults() } diff --git a/crops/blueberry.lua b/crops/blueberry.lua index 59e76a9..3e51086 100644 --- a/crops/blueberry.lua +++ b/crops/blueberry.lua @@ -68,6 +68,7 @@ local def = { handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1, not_in_creative_inventory = 1, growing = 1 }, + _mcl_hardness = farming.mcl_hardness, is_ground_content = false, sounds = farming.sounds.node_sound_leaves_defaults() } diff --git a/crops/cabbage.lua b/crops/cabbage.lua index f9f2248..8df4390 100644 --- a/crops/cabbage.lua +++ b/crops/cabbage.lua @@ -26,6 +26,7 @@ local def = { handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1, not_in_creative_inventory = 1, growing = 1 }, + _mcl_hardness = farming.mcl_hardness, is_ground_content = false, sounds = farming.sounds.node_sound_leaves_defaults() } diff --git a/crops/carrot.lua b/crops/carrot.lua index 89be97c..505be22 100644 --- a/crops/carrot.lua +++ b/crops/carrot.lua @@ -65,6 +65,7 @@ local def = { handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1, not_in_creative_inventory = 1, growing = 1 }, + _mcl_hardness = farming.mcl_hardness, is_ground_content = false, sounds = farming.sounds.node_sound_leaves_defaults() } diff --git a/crops/chili.lua b/crops/chili.lua index 081523e..db6764e 100644 --- a/crops/chili.lua +++ b/crops/chili.lua @@ -67,6 +67,7 @@ local def = { handy = 1, snappy = 3, flammable = 4, plant = 1, attached_node = 1, not_in_creative_inventory = 1, growing = 1 }, + _mcl_hardness = farming.mcl_hardness, is_ground_content = false, sounds = farming.sounds.node_sound_leaves_defaults() } diff --git a/crops/cocoa.lua b/crops/cocoa.lua index e67ad1d..b252c55 100644 --- a/crops/cocoa.lua +++ b/crops/cocoa.lua @@ -158,6 +158,7 @@ local def = { handy = 1, snappy = 3, flammable = 2, plant = 1, growing = 1, not_in_creative_inventory = 1, leafdecay = 1, leafdecay_drop = 1 }, + _mcl_hardness = farming.mcl_hardness, is_ground_content = false, sounds = farming.sounds.node_sound_leaves_defaults(), diff --git a/crops/coffee.lua b/crops/coffee.lua index f598f8f..460fefb 100644 --- a/crops/coffee.lua +++ b/crops/coffee.lua @@ -60,6 +60,7 @@ local def = { handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1, not_in_creative_inventory = 1, growing = 1 }, + _mcl_hardness = farming.mcl_hardness, is_ground_content = false, sounds = farming.sounds.node_sound_leaves_defaults() } diff --git a/crops/corn.lua b/crops/corn.lua index 2fda30e..302e42b 100644 --- a/crops/corn.lua +++ b/crops/corn.lua @@ -120,6 +120,7 @@ local def = { handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1, not_in_creative_inventory = 1, growing = 1 }, + _mcl_hardness = farming.mcl_hardness, is_ground_content = false, sounds = farming.sounds.node_sound_leaves_defaults() } diff --git a/crops/cotton.lua b/crops/cotton.lua index 47d803d..9a83d3e 100644 --- a/crops/cotton.lua +++ b/crops/cotton.lua @@ -17,6 +17,7 @@ minetest.register_node("farming:cotton_wild", { groups = { handy = 1, snappy = 3, attached_node = 1, flammable = 4, compostability = 60 }, + _mcl_hardness = farming.mcl_hardness, is_ground_content = false, drop = { items = { @@ -42,6 +43,7 @@ minetest.register_node("farming:seed_cotton", { compostability = 48, seed = 1, snappy = 3, attached_node = 1, flammable = 4, growing = 1 }, + _mcl_hardness = farming.mcl_hardness, is_ground_content = false, paramtype = "light", paramtype2 = "wallmounted", @@ -120,6 +122,7 @@ local def = { handy = 1, snappy = 3, flammable = 4, plant = 1, attached_node = 1, not_in_creative_inventory = 1, growing = 1 }, + _mcl_hardness = farming.mcl_hardness, is_ground_content = false, sounds = farming.sounds.node_sound_leaves_defaults() } diff --git a/crops/cucumber.lua b/crops/cucumber.lua index 87df299..a9b5b80 100644 --- a/crops/cucumber.lua +++ b/crops/cucumber.lua @@ -30,6 +30,7 @@ local def = { handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1, not_in_creative_inventory = 1, growing = 1 }, + _mcl_hardness = farming.mcl_hardness, is_ground_content = false, sounds = farming.sounds.node_sound_leaves_defaults() } diff --git a/crops/eggplant.lua b/crops/eggplant.lua index 5a9417f..29279a4 100644 --- a/crops/eggplant.lua +++ b/crops/eggplant.lua @@ -28,6 +28,7 @@ local def = { handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1, not_in_creative_inventory = 1, growing = 1 }, + _mcl_hardness = farming.mcl_hardness, is_ground_content = false, sounds = farming.sounds.node_sound_leaves_defaults() } diff --git a/crops/garlic.lua b/crops/garlic.lua index bbf40ff..81d94de 100644 --- a/crops/garlic.lua +++ b/crops/garlic.lua @@ -93,6 +93,7 @@ local def = { handy = 1, snappy = 3, flammable = 3, plant = 1, attached_node = 1, not_in_creative_inventory = 1, growing = 1 }, + _mcl_hardness = farming.mcl_hardness, is_ground_content = false, sounds = farming.sounds.node_sound_leaves_defaults() } diff --git a/crops/ginger.lua b/crops/ginger.lua index 77d1094..3534314 100644 --- a/crops/ginger.lua +++ b/crops/ginger.lua @@ -27,6 +27,7 @@ local def = { handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1, not_in_creative_inventory = 1, growing = 1 }, + _mcl_hardness = farming.mcl_hardness, is_ground_content = false, sounds = farming.sounds.node_sound_leaves_defaults() } diff --git a/crops/grapes.lua b/crops/grapes.lua index 84ad853..f13226e 100644 --- a/crops/grapes.lua +++ b/crops/grapes.lua @@ -186,6 +186,7 @@ local def = { handy = 1, snappy = 3, flammable = 3, not_in_creative_inventory = 1, attached_node = 1, growing = 1, plant = 1 }, + _mcl_hardness = farming.mcl_hardness, is_ground_content = false, sounds = farming.sounds.node_sound_leaves_defaults() } diff --git a/crops/hemp.lua b/crops/hemp.lua index 3b965ee..6b6bbcf 100644 --- a/crops/hemp.lua +++ b/crops/hemp.lua @@ -13,6 +13,7 @@ minetest.register_node("farming:seed_hemp", { handy = 1, compostability = 38, seed = 1, snappy = 3, attached_node = 1, growing = 1 }, + _mcl_hardness = farming.mcl_hardness, is_ground_content = false, paramtype = "light", paramtype2 = "wallmounted", @@ -223,6 +224,7 @@ local def = { handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1, not_in_creative_inventory = 1, growing = 1 }, + _mcl_hardness = farming.mcl_hardness, is_ground_content = false, sounds = farming.sounds.node_sound_leaves_defaults() } diff --git a/crops/lettuce.lua b/crops/lettuce.lua index ed871b7..92b1b9e 100644 --- a/crops/lettuce.lua +++ b/crops/lettuce.lua @@ -25,6 +25,7 @@ local def = { handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1, not_in_creative_inventory = 1, growing = 1 }, + _mcl_hardness = farming.mcl_hardness, is_ground_content = false, sounds = farming.sounds.node_sound_leaves_defaults() } diff --git a/crops/melon.lua b/crops/melon.lua index a6a5672..a3d31ea 100644 --- a/crops/melon.lua +++ b/crops/melon.lua @@ -41,6 +41,7 @@ local def = { handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1, not_in_creative_inventory = 1, growing = 1 }, + _mcl_hardness = farming.mcl_hardness, is_ground_content = false, sounds = farming.sounds.node_sound_leaves_defaults() } diff --git a/crops/mint.lua b/crops/mint.lua index 69fc0dd..9c0ff2d 100644 --- a/crops/mint.lua +++ b/crops/mint.lua @@ -13,6 +13,7 @@ minetest.register_node("farming:seed_mint", { compostability = 48, seed = 1, snappy = 3, attached_node = 1, growing = 1, handy = 1, flammable = 2 }, + _mcl_hardness = farming.mcl_hardness, is_ground_content = false, paramtype = "light", paramtype2 = "wallmounted", @@ -69,6 +70,7 @@ local def = { handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1, not_in_creative_inventory = 1, growing = 1 }, + _mcl_hardness = farming.mcl_hardness, is_ground_content = false, sounds = farming.sounds.node_sound_leaves_defaults() } diff --git a/crops/onion.lua b/crops/onion.lua index fc8ece3..9042aab 100644 --- a/crops/onion.lua +++ b/crops/onion.lua @@ -61,6 +61,7 @@ local def = { handy = 1, snappy = 3, flammable = 3, plant = 1, attached_node = 1, not_in_creative_inventory = 1, growing = 1 }, + _mcl_hardness = farming.mcl_hardness, is_ground_content = false, sounds = farming.sounds.node_sound_leaves_defaults() } diff --git a/crops/parsley.lua b/crops/parsley.lua index bb397de..58cb572 100644 --- a/crops/parsley.lua +++ b/crops/parsley.lua @@ -26,6 +26,7 @@ local def = { handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1, not_in_creative_inventory = 1, growing = 1 }, + _mcl_hardness = farming.mcl_hardness, is_ground_content = false, sounds = farming.sounds.node_sound_leaves_defaults() } diff --git a/crops/peas.lua b/crops/peas.lua index 8274c1a..511037d 100644 --- a/crops/peas.lua +++ b/crops/peas.lua @@ -53,6 +53,7 @@ local def = { handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1, not_in_creative_inventory = 1, growing = 1 }, + _mcl_hardness = farming.mcl_hardness, is_ground_content = false, sounds = farming.sounds.node_sound_leaves_defaults() } diff --git a/crops/pepper.lua b/crops/pepper.lua index f42dd13..7e99fc7 100644 --- a/crops/pepper.lua +++ b/crops/pepper.lua @@ -95,6 +95,7 @@ local def = { handy = 1, snappy = 3, flammable = 3, plant = 1, attached_node = 1, not_in_creative_inventory = 1, growing = 1 }, + _mcl_hardness = farming.mcl_hardness, is_ground_content = false, sounds = farming.sounds.node_sound_leaves_defaults() } diff --git a/crops/pineapple.lua b/crops/pineapple.lua index 7fe6979..5a5f9a4 100644 --- a/crops/pineapple.lua +++ b/crops/pineapple.lua @@ -30,6 +30,7 @@ minetest.register_node("farming:pineapple", { food_pineapple = 1, fleshy = 3, dig_immediate = 3, flammable = 2, compostability = 65 }, + _mcl_hardness = farming.mcl_hardness, is_ground_content = false }) @@ -95,6 +96,7 @@ local def = { handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1, not_in_creative_inventory = 1, growing = 1 }, + _mcl_hardness = farming.mcl_hardness, is_ground_content = false, sounds = farming.sounds.node_sound_leaves_defaults() } diff --git a/crops/potato.lua b/crops/potato.lua index fe7a20c..3de9678 100644 --- a/crops/potato.lua +++ b/crops/potato.lua @@ -71,6 +71,7 @@ local def = { handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1, not_in_creative_inventory = 1, growing = 1 }, + _mcl_hardness = farming.mcl_hardness, is_ground_content = false, sounds = farming.sounds.node_sound_leaves_defaults() } diff --git a/crops/pumpkin.lua b/crops/pumpkin.lua index 971e1be..26611c8 100644 --- a/crops/pumpkin.lua +++ b/crops/pumpkin.lua @@ -163,6 +163,7 @@ local def = { handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1, not_in_creative_inventory = 1, growing = 1 }, + _mcl_hardness = farming.mcl_hardness, is_ground_content = false, sounds = farming.sounds.node_sound_leaves_defaults() } diff --git a/crops/raspberry.lua b/crops/raspberry.lua index 45e1c81..3bf543c 100644 --- a/crops/raspberry.lua +++ b/crops/raspberry.lua @@ -45,6 +45,7 @@ local def = { handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1, not_in_creative_inventory = 1, growing = 1 }, + _mcl_hardness = farming.mcl_hardness, is_ground_content = false, sounds = farming.sounds.node_sound_leaves_defaults() } diff --git a/crops/rhubarb.lua b/crops/rhubarb.lua index 4af2ab8..8933b3f 100644 --- a/crops/rhubarb.lua +++ b/crops/rhubarb.lua @@ -46,6 +46,7 @@ local def = { handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1, not_in_creative_inventory = 1, growing = 1 }, + _mcl_hardness = farming.mcl_hardness, is_ground_content = false, sounds = farming.sounds.node_sound_leaves_defaults(), minlight = 10, diff --git a/crops/rice.lua b/crops/rice.lua index 433fbcf..b6bc098 100644 --- a/crops/rice.lua +++ b/crops/rice.lua @@ -13,6 +13,7 @@ minetest.register_node("farming:seed_rice", { handy = 1, compostability = 48, seed = 1, snappy = 3, attached_node = 1, flammable = 4, growing = 1 }, + _mcl_hardness = farming.mcl_hardness, is_ground_content = false, paramtype = "light", paramtype2 = "wallmounted", @@ -90,6 +91,7 @@ local def = { handy = 1, snappy = 3, flammable = 4, plant = 1, attached_node = 1, not_in_creative_inventory = 1, growing = 1 }, + _mcl_hardness = farming.mcl_hardness, is_ground_content = false, sounds = farming.sounds.node_sound_leaves_defaults() } diff --git a/crops/soy.lua b/crops/soy.lua index 770e29e..babc65a 100644 --- a/crops/soy.lua +++ b/crops/soy.lua @@ -133,6 +133,7 @@ local def = { handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1, not_in_creative_inventory = 1, growing = 1 }, + _mcl_hardness = farming.mcl_hardness, is_ground_content = false, sounds = farming.sounds.node_sound_leaves_defaults() } diff --git a/crops/spinach.lua b/crops/spinach.lua index 9e2a4cc..e58a764 100644 --- a/crops/spinach.lua +++ b/crops/spinach.lua @@ -27,6 +27,7 @@ local def = { handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1, not_in_creative_inventory = 1, growing = 1 }, + _mcl_hardness = farming.mcl_hardness, is_ground_content = false, sounds = farming.sounds.node_sound_leaves_defaults() } diff --git a/crops/strawberry.lua b/crops/strawberry.lua index 1a664a2..a31d063 100644 --- a/crops/strawberry.lua +++ b/crops/strawberry.lua @@ -32,6 +32,7 @@ local def = { handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1, not_in_creative_inventory = 1, growing = 1 }, + _mcl_hardness = farming.mcl_hardness, is_ground_content = false, sounds = farming.sounds.node_sound_leaves_defaults() } diff --git a/crops/sunflower.lua b/crops/sunflower.lua index 1322b8b..7c46afb 100644 --- a/crops/sunflower.lua +++ b/crops/sunflower.lua @@ -20,6 +20,7 @@ minetest.register_node("farming:seed_sunflower", { compostability = 48, seed = 1, snappy = 3, attached_node = 1, growing = 1, handy = 1, food_sunflower_seeds = 1, flammable = 2 }, + _mcl_hardness = farming.mcl_hardness, is_ground_content = false, paramtype = "light", paramtype2 = "wallmounted", @@ -128,6 +129,7 @@ local def = { handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1, not_in_creative_inventory = 1, growing = 1 }, + _mcl_hardness = farming.mcl_hardness, is_ground_content = false, sounds = farming.sounds.node_sound_leaves_defaults() } diff --git a/crops/tomato.lua b/crops/tomato.lua index 23fc5c0..0bcddea 100644 --- a/crops/tomato.lua +++ b/crops/tomato.lua @@ -49,6 +49,7 @@ local def = { handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1, not_in_creative_inventory = 1, growing = 1 }, + _mcl_hardness = farming.mcl_hardness, is_ground_content = false, sounds = farming.sounds.node_sound_leaves_defaults() } diff --git a/crops/vanilla.lua b/crops/vanilla.lua index 421a92a..0f557ce 100644 --- a/crops/vanilla.lua +++ b/crops/vanilla.lua @@ -28,6 +28,7 @@ local def = { handy = 1, snappy = 3, flammable = 2, plant = 1, attached_node = 1, not_in_creative_inventory = 1, growing = 1 }, + _mcl_hardness = farming.mcl_hardness, is_ground_content = false, sounds = farming.sounds.node_sound_leaves_defaults() } diff --git a/crops/wheat.lua b/crops/wheat.lua index db83bf2..0566ced 100644 --- a/crops/wheat.lua +++ b/crops/wheat.lua @@ -12,6 +12,7 @@ minetest.register_node("farming:seed_wheat", { groups = { handy = 1, seed = 1, snappy = 3, attached_node = 1, flammable = 4, growing = 1 }, + _mcl_hardness = farming.mcl_hardness, is_ground_content = false, paramtype = "light", paramtype2 = "wallmounted", @@ -128,6 +129,7 @@ local def = { snappy = 3, flammable = 4, plant = 1, attached_node = 1, not_in_creative_inventory = 1, growing = 1 }, + _mcl_hardness = farming.mcl_hardness, is_ground_content = false, sounds = farming.sounds.node_sound_leaves_defaults() } diff --git a/init.lua b/init.lua index 491e429..bdeb4f6 100644 --- a/init.lua +++ b/init.lua @@ -7,7 +7,7 @@ farming = { mod = "redo", - version = "20240624", + version = "20240625", path = minetest.get_modpath("farming"), select = { type = "fixed", @@ -24,7 +24,8 @@ farming = { use_utensils = minetest.settings:get_bool("farming_use_utensils") ~= false, mtg = minetest.get_modpath("default"), mcl = minetest.get_modpath("mcl_core"), - sounds = {} + sounds = {}, + mcl_hardness = 0.01 } -- default sound functions just incase @@ -599,6 +600,7 @@ farming.register_plant = function(name, def) seed = 1, snappy = 3, attached_node = 1, flammable = 2, growing = 1, compostability = 65, handy = 1 }, + _mcl_hardness = farming.mcl_hardness, is_ground_content = false, paramtype = "light", paramtype2 = "wallmounted", @@ -685,6 +687,7 @@ farming.register_plant = function(name, def) drop = drop, selection_box = sel, groups = g, + _mcl_hardness = farming.mcl_hardness, is_ground_content = false, sounds = farming.sounds.node_sound_leaves_defaults(), minlight = def.minlight,