1
0
mirror of https://github.com/mt-mods/plantlife_modpack.git synced 2024-11-12 05:10:39 +01:00
plantlife_modpack/molehills/init.lua

52 lines
1.0 KiB
Lua
Raw Normal View History

-- Idea by Sokomine
-- Code & textures by Mossmanikin
-- support for i18n
local S = minetest.get_translator("molehills")
2015-08-14 20:50:31 +02:00
-- Node
2015-08-14 20:50:31 +02:00
local mh_cbox = {
type = "fixed",
fixed = { -0.5, -0.5, -0.5, 0.5, -0.125, 0.5}
}
minetest.register_node("molehills:molehill",{
2015-08-14 20:50:31 +02:00
drawtype = "mesh",
mesh = "molehill_molehill.obj",
description = S("Mole Hill"),
inventory_image = "molehills_side.png",
2015-08-14 20:50:31 +02:00
tiles = { "molehills_dirt.png" },
use_texture_alpha = "clip",
2015-08-14 20:50:31 +02:00
paramtype = "light",
selection_box = mh_cbox,
collision_box = mh_cbox,
groups = {crumbly=3},
2015-08-14 20:50:31 +02:00
sounds = default.node_sound_dirt_defaults(),
})
-- Crafting
minetest.register_craft({ -- molehills --> dirt
output = "default:dirt",
recipe = {
{"molehills:molehill","molehills:molehill"},
{"molehills:molehill","molehills:molehill"},
}
})
-- Generating
minetest.register_decoration({
decoration = {
"molehills:molehill"
},
fill_ratio = 0.002,
y_min = 1,
y_max = 40,
place_on = {
"default:dirt_with_grass"
},
spawn_by = "air",
num_spawn_by = 3,
deco_type = "simple",
flags = "all_floors",
})