From f5249f1f310e7bab7043a5023a19501c66f1db67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikita=20Wi=C5=9Bniewski?= Date: Sat, 3 Aug 2024 14:25:47 +0700 Subject: [PATCH] Patch mcl_farming for pickblock --- mods/ITEMS/mcl_farming/beetroot.lua | 4 ++++ mods/ITEMS/mcl_farming/carrots.lua | 4 +++- mods/ITEMS/mcl_farming/melon.lua | 2 ++ mods/ITEMS/mcl_farming/potatoes.lua | 4 +++- mods/ITEMS/mcl_farming/pumpkin.lua | 2 ++ mods/ITEMS/mcl_farming/wheat.lua | 4 +++- 6 files changed, 17 insertions(+), 3 deletions(-) diff --git a/mods/ITEMS/mcl_farming/beetroot.lua b/mods/ITEMS/mcl_farming/beetroot.lua index f32b2bf8e..ad4f16e28 100644 --- a/mods/ITEMS/mcl_farming/beetroot.lua +++ b/mods/ITEMS/mcl_farming/beetroot.lua @@ -36,6 +36,7 @@ minetest.register_node("mcl_farming:beetroot_0", { groups = {dig_immediate=3, not_in_creative_inventory=1,plant=1,attached_node=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1}, sounds = mcl_sounds.node_sound_leaves_defaults(), _mcl_blast_resistance = 0, + _vl_pickblock = "mcl_farming:beetroot_seeds", }) minetest.register_node("mcl_farming:beetroot_1", { @@ -60,6 +61,7 @@ minetest.register_node("mcl_farming:beetroot_1", { groups = {dig_immediate=3, not_in_creative_inventory=1,plant=1,attached_node=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1}, sounds = mcl_sounds.node_sound_leaves_defaults(), _mcl_blast_resistance = 0, + _vl_pickblock = "mcl_farming:beetroot_seeds", }) minetest.register_node("mcl_farming:beetroot_2", { @@ -84,6 +86,7 @@ minetest.register_node("mcl_farming:beetroot_2", { groups = {dig_immediate=3, not_in_creative_inventory=1,plant=1,attached_node=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1}, sounds = mcl_sounds.node_sound_leaves_defaults(), _mcl_blast_resistance = 0, + _vl_pickblock = "mcl_farming:beetroot_seeds", }) minetest.register_node("mcl_farming:beetroot", { @@ -135,6 +138,7 @@ minetest.register_node("mcl_farming:beetroot", { groups = {dig_immediate=3, not_in_creative_inventory=1,plant=1,attached_node=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1,beetroot=4}, sounds = mcl_sounds.node_sound_leaves_defaults(), _mcl_blast_resistance = 0, + _vl_pickblock = "mcl_farming:beetroot_seeds", }) minetest.register_craftitem("mcl_farming:beetroot_item", { diff --git a/mods/ITEMS/mcl_farming/carrots.lua b/mods/ITEMS/mcl_farming/carrots.lua index e8e295d8b..d2cb0c83b 100644 --- a/mods/ITEMS/mcl_farming/carrots.lua +++ b/mods/ITEMS/mcl_farming/carrots.lua @@ -45,6 +45,7 @@ for i=1, 7 do groups = {dig_immediate=3, not_in_creative_inventory=1,plant=1,attached_node=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1}, sounds = mcl_sounds.node_sound_leaves_defaults(), _mcl_blast_resistance = 0, + _vl_pickblock = "mcl_farming:carrot_item", }) end @@ -84,7 +85,8 @@ minetest.register_node("mcl_farming:carrot", { min_count = 2, max_count = 4, cap = 5, - } + }, + _vl_pickblock = "mcl_farming:carrot_item", }) minetest.register_craftitem("mcl_farming:carrot_item", { diff --git a/mods/ITEMS/mcl_farming/melon.lua b/mods/ITEMS/mcl_farming/melon.lua index d62288333..80eaf0e2b 100644 --- a/mods/ITEMS/mcl_farming/melon.lua +++ b/mods/ITEMS/mcl_farming/melon.lua @@ -109,6 +109,7 @@ for s=1,7 do groups = {dig_immediate=3, not_in_creative_inventory=1, plant=1,attached_node=1, dig_by_water=1,destroy_by_lava_flow=1, plant_melon_stem=s}, sounds = mcl_sounds.node_sound_leaves_defaults(), _mcl_blast_resistance = 0, + _vl_pickblock = "mcl_farming:melon_seeds", }) end @@ -120,6 +121,7 @@ local stem_def = { tiles = {"mcl_farming_melon_stem_disconnected.png^[colorize:#FFA800:127"}, wield_image = "mcl_farming_melon_stem_disconnected.png^[colorize:#FFA800:127", inventory_image = "mcl_farming_melon_stem_disconnected.png^[colorize:#FFA800:127", + _vl_pickblock = "mcl_farming:melon_seeds", } -- Register stem growth diff --git a/mods/ITEMS/mcl_farming/potatoes.lua b/mods/ITEMS/mcl_farming/potatoes.lua index 66c5169c4..73acc4a39 100644 --- a/mods/ITEMS/mcl_farming/potatoes.lua +++ b/mods/ITEMS/mcl_farming/potatoes.lua @@ -49,6 +49,7 @@ for i=1, 7 do groups = {dig_immediate=3, not_in_creative_inventory=1,plant=1,attached_node=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1}, sounds = mcl_sounds.node_sound_leaves_defaults(), _mcl_blast_resistance = 0, + _vl_pickblock = "mcl_farming:potato_item", }) end @@ -89,7 +90,8 @@ minetest.register_node("mcl_farming:potato", { min_count = 2, max_count = 4, cap = 5 - } + }, + _vl_pickblock = "mcl_farming:potato_item", }) minetest.register_craftitem("mcl_farming:potato_item", { diff --git a/mods/ITEMS/mcl_farming/pumpkin.lua b/mods/ITEMS/mcl_farming/pumpkin.lua index fe437f5cf..32a41503e 100644 --- a/mods/ITEMS/mcl_farming/pumpkin.lua +++ b/mods/ITEMS/mcl_farming/pumpkin.lua @@ -79,6 +79,7 @@ for s=1,7 do groups = {dig_immediate=3, not_in_creative_inventory=1, plant=1,attached_node=1, dig_by_water=1,destroy_by_lava_flow=1,}, sounds = mcl_sounds.node_sound_leaves_defaults(), _mcl_blast_resistance = 0, + _vl_pickblock = "mcl_farming:pumpkin_seeds", }) end @@ -89,6 +90,7 @@ local stem_def = { tiles = {"mcl_farming_pumpkin_stem_disconnected.png^[colorize:#FFA800:127"}, wield_image = "mcl_farming_pumpkin_stem_disconnected.png^[colorize:#FFA800:127", inventory_image = "mcl_farming_pumpkin_stem_disconnected.png^[colorize:#FFA800:127", + _vl_pickblock = "mcl_farming:pumpkin_seeds", } -- Template for pumpkin diff --git a/mods/ITEMS/mcl_farming/wheat.lua b/mods/ITEMS/mcl_farming/wheat.lua index 676cc1301..f149adb8e 100644 --- a/mods/ITEMS/mcl_farming/wheat.lua +++ b/mods/ITEMS/mcl_farming/wheat.lua @@ -60,6 +60,7 @@ for i=1,7 do dig_by_water=1,destroy_by_lava_flow=1, dig_by_piston=1}, sounds = mcl_sounds.node_sound_leaves_defaults(), _mcl_blast_resistance = 0, + _vl_pickblock = "mcl_farming:wheat_seeds", }) end @@ -95,7 +96,8 @@ minetest.register_node("mcl_farming:wheat", { min_count = 1, max_count = 6, cap = 7 - } + }, + _vl_pickblock = "mcl_farming:wheat_seeds", }) mcl_farming:add_plant("plant_wheat", "mcl_farming:wheat", {"mcl_farming:wheat_1", "mcl_farming:wheat_2", "mcl_farming:wheat_3", "mcl_farming:wheat_4", "mcl_farming:wheat_5", "mcl_farming:wheat_6", "mcl_farming:wheat_7"}, 25, 20)