mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2025-12-15 14:55:22 +01:00
[farming] Update from Skyblock
This commit is contained in:
@@ -9,7 +9,9 @@ minetest.register_craftitem("farming:beans", {
|
||||
inventory_image = "farming_beans.png",
|
||||
on_use = minetest.item_eat(1),
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
if minetest.is_protected(pointed_thing.above, placer:get_player_name()) then return end
|
||||
if minetest.is_protected(pointed_thing.under, placer:get_player_name()) then
|
||||
return
|
||||
end
|
||||
local nod = minetest.get_node_or_nil(pointed_thing.under)
|
||||
if nod and nod.name == "farming:beanpole" then
|
||||
minetest.set_node(pointed_thing.under, {name="farming:beanpole_1"})
|
||||
@@ -58,13 +60,12 @@ minetest.register_node("farming:beanpole", {
|
||||
}
|
||||
},
|
||||
selection_box = farming.select,
|
||||
groups = {
|
||||
snappy = 3, flammable = 2, attached_node = 1,
|
||||
not_in_creative_inventory = 1
|
||||
},
|
||||
groups = {snappy = 3, flammable = 2, attached_node = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
if minetest.is_protected(pointed_thing.above, placer:get_player_name()) then return end
|
||||
if minetest.is_protected(pointed_thing.under, placer:get_player_name()) then
|
||||
return
|
||||
end
|
||||
local nod = minetest.get_node_or_nil(pointed_thing.under)
|
||||
if nod and minetest.get_item_group(nod.name, "soil") < 2 then
|
||||
return
|
||||
@@ -235,4 +236,4 @@ minetest.register_node("farming:beanbush", {
|
||||
not_in_creative_inventory=1
|
||||
},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user