summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua29
1 files changed, 26 insertions, 3 deletions
diff --git a/init.lua b/init.lua
index 1bb3917..8a4aaeb 100644
--- a/init.lua
+++ b/init.lua
@@ -176,7 +176,7 @@ end
-- crops check
local function check_crops(pos, nodename, strength)
- local stage, nod, def
+ local mod, crop, stage, nod, def
-- grow registered crops
for n = 1, #crops do
@@ -184,8 +184,12 @@ local function check_crops(pos, nodename, strength)
if string.find(nodename, crops[n][1])
or nodename == crops[n][3] then
+ -- separate mod and node name
+ mod = nodename:split(":")[1] .. ":"
+ crop = nodename:split(":")[2]
+
-- get stage number or set to 0 for seed
- stage = tonumber( nodename:split("_")[2] ) or 0
+ stage = tonumber( crop:split("_")[2] ) or 0
stage = math.min(stage + strength, crops[n][2])
-- check for place_param setting
@@ -529,9 +533,28 @@ minetest.register_craftitem("bonemeal:bone", {
inventory_image = "bonemeal_bone.png",
})
+-- gelatin powder
+minetest.register_craftitem("bonemeal:gelatin_powder", {
+ description = S("Gelatin Powder"),
+ inventory_image = "bonemeal_gelatin_powder.png",
+ groups = {food_gelatin = 1, flammable = 2},
+})
+
--- crafting recipes
+-- gelatin powder
+minetest.register_craft({
+ output = "bonemeal:gelatin_powder 4",
+ recipe = {
+ {"bonemeal:bone", "bonemeal:bone", "bonemeal:bone"},
+ {"bucket:bucket_water", "bucket:bucket_water", "bucket:bucket_water"},
+ {"bucket:bucket_water", "default:torch", "bucket:bucket_water"},
+ },
+ replacements = {
+ {"bucket:bucket_water", "bucket:bucket_empty 5"},
+ },
+})
-- bonemeal (from bone)
minetest.register_craft({
@@ -596,4 +619,4 @@ local path = minetest.get_modpath("bonemeal")
dofile(path .. "/mods.lua")
dofile(path .. "/lucky_block.lua")
-print (S("[bonemeal] loaded")) \ No newline at end of file
+print (S("[MOD] bonemeal loaded"))