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/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 ac2b1dc..6cf2671 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, @@ -91,7 +94,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 @@ -112,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( { @@ -178,13 +183,16 @@ 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, swordy = 1, flammable = 2, choppy = 3, + oddly_breakable_by_hand = 3, compostability = 55 }, sounds = farming.sounds.node_sound_leaves_defaults(), 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/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/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/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..8770c70 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, @@ -36,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..9e8c523 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 = {shovely = 1, handy = 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({ diff --git a/init.lua b/init.lua index 9b8c84c..689dff6 100644 --- a/init.lua +++ b/init.lua @@ -7,7 +7,7 @@ farming = { mod = "redo", - version = "20230915", + 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 @@ -586,7 +587,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", @@ -755,7 +756,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