mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2025-12-21 17:15:32 +01:00
[farming] Update from Skyblock
This commit is contained in:
@@ -5,7 +5,9 @@ minetest.register_craftitem("farming:grapes", {
|
||||
inventory_image = "farming_grapes.png",
|
||||
on_use = minetest.item_eat(2),
|
||||
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:trellis" then
|
||||
minetest.set_node(pointed_thing.under, {name="farming:grapes_1"})
|
||||
@@ -54,12 +56,12 @@ minetest.register_node("farming:trellis", {
|
||||
}
|
||||
},
|
||||
selection_box = farming.select,
|
||||
groups = {
|
||||
snappy = 3, flammable = 2, attached_node = 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
|
||||
|
||||
Reference in New Issue
Block a user