mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-12-25 01:19:33 +01:00
Add 'mods/ITEMS/mcl_sweet_berry/init.lua'
This commit is contained in:
parent
f517d82885
commit
b012c3b739
1 changed files with 75 additions and 0 deletions
75
mods/ITEMS/mcl_sweet_berry/init.lua
Normal file
75
mods/ITEMS/mcl_sweet_berry/init.lua
Normal file
|
@ -0,0 +1,75 @@
|
||||||
|
minetest.register_craftitem("mc_sweet_berry:sweet_berry", {
|
||||||
|
description = "Sweet Berry",
|
||||||
|
inventory_image = "sweet_berry.png",
|
||||||
|
on_use = minetest.item_eat(2)
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("mc_sweet_berry:sweet_berry_bush_0", {
|
||||||
|
drawtype = "plantlike",
|
||||||
|
tiles = {"sweet_berry_bush_0.png"},
|
||||||
|
damage_per_second = 1,
|
||||||
|
drop = ""
|
||||||
|
})
|
||||||
|
minetest.register_node("mc_sweet_berry:sweet_berry_bush_1", {
|
||||||
|
drawtype = "plantlike",
|
||||||
|
tiles = {"sweet_berry_bush_1.png"},
|
||||||
|
damage_per_second = 1,
|
||||||
|
drop = ""
|
||||||
|
})
|
||||||
|
minetest.register_node("mc_sweet_berry:sweet_berry_bush_2", {
|
||||||
|
drawtype = "plantlike",
|
||||||
|
tiles = {"sweet_berry_bush_2.png"},
|
||||||
|
damage_per_second = 2,
|
||||||
|
drop = "mc:sweet_berry 2"
|
||||||
|
})
|
||||||
|
minetest.register_node("mc_sweet_berry:sweet_berry_bush_3", {
|
||||||
|
drawtype = "plantlike",
|
||||||
|
tiles = {"sweet_berry_bush_3.png"},
|
||||||
|
damage_per_second = 2,
|
||||||
|
drop = "mc:sweet_berry 3"
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_decoration({
|
||||||
|
deco_type = "simple",
|
||||||
|
place_on = {"mcl_core:dirt_with_grass"},
|
||||||
|
sidelen = 16,
|
||||||
|
fill_ratio = 0.1,
|
||||||
|
biomes = {"Taiga","Forest"},
|
||||||
|
y_max = mcl_vars.mg_overworld_max,
|
||||||
|
y_min = mcl_vars.mg_overworld_min,
|
||||||
|
decoration = "mc_sweet_berry:sweet_berry_bush_2"
|
||||||
|
})
|
||||||
|
minetest.register_abm({
|
||||||
|
nodenames = {"mc_sweet_berry:sweet_berry_bush_0"},
|
||||||
|
interval = 10.0,
|
||||||
|
chance = 16,
|
||||||
|
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||||
|
minetest.set_node(pos, {name = "mc_sweet_berry:sweet_berry_bush_1"})
|
||||||
|
end
|
||||||
|
})
|
||||||
|
minetest.register_abm({
|
||||||
|
nodenames = {"mc_sweet_berry:sweet_berry_bush_1"},
|
||||||
|
interval = 10.0,
|
||||||
|
chance = 16,
|
||||||
|
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||||
|
minetest.set_node(pos, {name = "mc_sweet_berry:sweet_berry_bush_2"})
|
||||||
|
end
|
||||||
|
})
|
||||||
|
minetest.register_abm({
|
||||||
|
nodenames = {"mc_sweet_berry:sweet_berry_bush_2"},
|
||||||
|
interval = 10.0,
|
||||||
|
chance = 16,
|
||||||
|
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||||
|
minetest.set_node(pos, {name = "mc_sweet_berry:sweet_berry_bush_3"})
|
||||||
|
end
|
||||||
|
})
|
||||||
|
|
||||||
|
--taken from mc modpack by TechDude/TechDudie
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue