MineClone2/mods/ITEMS/mcl_farming/beetroot.lua

120 lines
3.4 KiB
Lua
Raw Normal View History

2017-02-01 14:27:49 +02:00
minetest.register_craftitem("mcl_farming:beetroot_seeds", {
description = "Beetroot Seeds",
groups = { craftitem=1 },
inventory_image = "mcl_farming_beetroot_seeds.png",
wield_image = "mcl_farming_beetroot_seeds.png",
on_place = function(itemstack, placer, pointed_thing)
2017-02-06 19:29:13 +02:00
return mcl_farming:place_seed(itemstack, placer, pointed_thing, "mcl_farming:beetroot_0")
2017-02-01 14:27:49 +02:00
end
})
2017-02-06 19:29:13 +02:00
minetest.register_node("mcl_farming:beetroot_0", {
2017-02-01 14:27:49 +02:00
paramtype = "light",
walkable = false,
drawtype = "plantlike",
drop = "",
2017-02-06 19:29:13 +02:00
tiles = {"mcl_farming_beetroot_0.png"},
2017-02-01 14:27:49 +02:00
selection_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.125, 0.5}
},
},
2017-02-06 19:29:13 +02:00
groups = {dig_immediate=3, not_in_creative_inventory=1,dig_by_water=1},
sounds = mcl_sounds.node_sound_leaves_defaults(),
2017-02-01 14:27:49 +02:00
})
2017-02-06 19:29:13 +02:00
minetest.register_node("mcl_farming:beetroot_1", {
2017-02-01 14:27:49 +02:00
paramtype = "light",
walkable = false,
drawtype = "plantlike",
2017-02-06 19:29:13 +02:00
drop = {
items = {
{ items = {"mcl_farming:beetroot_seeds"}, rarity = 5 },
},
},
tiles = {"mcl_farming_beetroot_1.png"},
2017-02-01 14:27:49 +02:00
selection_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.125, 0.5}
},
},
2017-02-06 19:29:13 +02:00
groups = {dig_immediate=3, not_in_creative_inventory=1,dig_by_water=1},
sounds = mcl_sounds.node_sound_leaves_defaults(),
2017-02-01 14:27:49 +02:00
})
2017-02-06 19:29:13 +02:00
minetest.register_node("mcl_farming:beetroot_2", {
2017-02-01 14:27:49 +02:00
paramtype = "light",
walkable = false,
drawtype = "plantlike",
2017-02-06 19:29:13 +02:00
drop = {
items = {
{ items = {"mcl_farming:beetroot_seeds"}, rarity = 4 },
},
},
tiles = {"farming_carrot_2.png"},
2017-02-01 14:27:49 +02:00
selection_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.125, 0.5}
},
},
2017-02-06 19:29:13 +02:00
groups = {dig_immediate=3, not_in_creative_inventory=1,dig_by_water=1},
sounds = mcl_sounds.node_sound_leaves_defaults(),
2017-02-01 14:27:49 +02:00
})
minetest.register_node("mcl_farming:beetroot", {
paramtype = "light",
walkable = false,
drawtype = "plantlike",
drop = {
max_items = 2,
items = {
{ items = {"mcl_farming:beetroot_item"}, rarity = 1 },
2017-02-06 19:29:13 +02:00
{ items = {"mcl_farming:beetroot_seeds 3"}, rarity = 4 },
{ items = {"mcl_farming:beetroot_seeds 2"}, rarity = 4 },
{ items = {"mcl_farming:beetroot_seeds 1"}, rarity = 4 },
2017-02-01 14:27:49 +02:00
},
},
2017-02-06 19:29:13 +02:00
tiles = {"mcl_farming_beetroot_3.png"},
2017-02-01 14:27:49 +02:00
selection_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.125, 0.5}
},
},
2017-02-06 19:29:13 +02:00
groups = {dig_immediate=3, not_in_creative_inventory=1,dig_by_water=1},
sounds = mcl_sounds.node_sound_leaves_defaults(),
2017-02-01 14:27:49 +02:00
})
minetest.register_craftitem("mcl_farming:beetroot_item", {
description = "Beetroot",
inventory_image = "mcl_farming_beetroot.png",
wield_image = "mcl_farming_beetroot.png",
2017-02-16 18:45:33 +02:00
on_place = minetest.item_eat(1),
on_secondary_use = minetest.item_eat(1),
2017-02-01 14:27:49 +02:00
groups = { food = 2, eatable = 1 },
})
minetest.register_craftitem("mcl_farming:beetroot_soup", {
description = "Beetroot Soup",
stack_max = 1,
inventory_image = "mcl_farming_beetroot_soup.png",
wield_image = "mcl_farming_beetroot_soup.png",
2017-02-16 18:45:33 +02:00
on_place = minetest.item_eat(6, "mcl_core:bowl"),
on_secondary_use = minetest.item_eat(6, "mcl_core:bowl"),
2017-02-16 16:08:26 +02:00
groups = { food = 3, eatable = 6 },
2017-02-01 14:27:49 +02:00
})
minetest.register_craft({
output = "mcl_farming:beetroot_soup",
recipe = {
{ "mcl_farming:beetroot_item","mcl_farming:beetroot_item","mcl_farming:beetroot_item", },
{ "mcl_farming:beetroot_item","mcl_farming:beetroot_item","mcl_farming:beetroot_item", },
{ "", "mcl_core:bowl", "" },
},
})
2017-02-06 19:29:13 +02:00
mcl_farming:add_plant("mcl_farming:beetroot", {"mcl_farming:beetroot_0", "mcl_farming:beetroot_1", "mcl_farming:beetroot_2"}, 68, 3)