1
0
mirror of https://codeberg.org/tenplus1/farming.git synced 2025-06-29 23:01:00 +02:00

add helper function to add {eatable}

This commit is contained in:
tenplus1
2024-07-26 16:30:53 +01:00
parent 648bae7517
commit 75e3f9fb42
41 changed files with 387 additions and 205 deletions

View File

@ -70,15 +70,17 @@ end
-- beans
minetest.register_craftitem("farming:beans", {
description = S("Green Beans" .. " (♥1)"),
description = S("Green Beans"),
inventory_image = "farming_beans.png",
groups = {compostability = 48, seed = 2, food_beans = 1, flammable = 2, eatable = 1},
groups = {compostability = 48, seed = 2, food_beans = 1, flammable = 2},
on_use = minetest.item_eat(1),
on_place = function(itemstack, placer, pointed_thing)
return place_beans(itemstack, placer, pointed_thing, "farming:beanpole_1")
end
})
farming.add_eatable("farming:beans", 1)
-- beans can be used for green dye
minetest.register_craft({
output = a.dye_green,