Patch mcl_farming for pickblock

This commit is contained in:
Mikita Wiśniewski 2024-08-03 14:25:47 +07:00
parent 8846648384
commit 353cc12175
6 changed files with 15 additions and 3 deletions

View file

@ -41,6 +41,7 @@ for i = 0, 2 do
},
sounds = mcl_sounds.node_sound_leaves_defaults(),
_mcl_blast_resistance = 0,
_vl_pickblock = "mcl_farming:beetroot_seeds",
_on_bone_meal = function(itemstack, placer, pointed_thing)
local pos = pointed_thing.under
local n = minetest.get_node(pos)
@ -102,6 +103,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", {

View file

@ -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",
_on_bone_meal = function(itemstack, placer, pointed_thing)
local pos = pointed_thing.under
local n = minetest.get_node(pos)
@ -90,7 +91,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", {

View file

@ -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",
_on_bone_meal = function(itemstack, placer, pointed_thing)
local pos = pointed_thing.under
local n = minetest.get_node(pos)
@ -126,6 +127,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

View file

@ -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",
_on_bone_meal = function(itemstack, placer, pointed_thing)
local pos = pointed_thing.under
local n = minetest.get_node(pos)
@ -95,7 +96,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", {

View file

@ -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",
_on_bone_meal = function(itemstack, placer, pointed_thing)
local pos = pointed_thing.under
local n = minetest.get_node(pos)
@ -95,6 +96,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

View file

@ -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",
_on_bone_meal = function(itemstack, placer, pointed_thing)
local pos = pointed_thing.under
local n = minetest.get_node(pos)
@ -102,7 +103,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"}, 5.8020, 35)