2014-08-12 21:08:11 +02:00
|
|
|
-----------------------------------------------------------------------------------------------
|
|
|
|
-- Idea by Sokomine
|
|
|
|
-- Code & textures by Mossmanikin
|
|
|
|
|
2017-08-03 15:02:56 +02:00
|
|
|
-- support for i18n
|
2020-02-15 15:32:06 +01:00
|
|
|
local S = minetest.get_translator("molehills")
|
2014-08-12 21:08:11 +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}
|
|
|
|
}
|
|
|
|
|
2014-08-12 21:08:11 +02:00
|
|
|
minetest.register_node("molehills:molehill",{
|
2015-08-14 20:50:31 +02:00
|
|
|
drawtype = "mesh",
|
|
|
|
mesh = "molehill_molehill.obj",
|
2017-08-03 15:02:56 +02:00
|
|
|
description = S("Mole Hill"),
|
2014-08-12 21:08:11 +02:00
|
|
|
inventory_image = "molehills_side.png",
|
2015-08-14 20:50:31 +02:00
|
|
|
tiles = { "molehills_dirt.png" },
|
2023-01-21 21:48:24 +01:00
|
|
|
use_texture_alpha = "clip",
|
2015-08-14 20:50:31 +02:00
|
|
|
paramtype = "light",
|
|
|
|
selection_box = mh_cbox,
|
|
|
|
collision_box = mh_cbox,
|
2014-08-12 21:08:11 +02:00
|
|
|
groups = {crumbly=3},
|
2015-08-14 20:50:31 +02:00
|
|
|
sounds = default.node_sound_dirt_defaults(),
|
2014-08-12 21:08:11 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
-----------------------------------------------------------------------------------------------
|
|
|
|
-- CRaFTiNG
|
|
|
|
-----------------------------------------------------------------------------------------------
|
|
|
|
minetest.register_craft({ -- molehills --> dirt
|
|
|
|
output = "default:dirt",
|
|
|
|
recipe = {
|
|
|
|
{"molehills:molehill","molehills:molehill"},
|
|
|
|
{"molehills:molehill","molehills:molehill"},
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
-----------------------------------------------------------------------------------------------
|
|
|
|
-- GeNeRaTiNG
|
|
|
|
-----------------------------------------------------------------------------------------------
|
2023-07-09 21:48:38 +02:00
|
|
|
minetest.register_decoration({
|
|
|
|
decoration = {
|
|
|
|
"molehills:molehill"
|
|
|
|
},
|
|
|
|
fill_ratio = 0.002,
|
|
|
|
y_min = 1,
|
|
|
|
y_max = 40,
|
|
|
|
place_on = {
|
|
|
|
"default:dirt_with_grass"
|
2021-12-24 09:31:30 +01:00
|
|
|
},
|
2023-07-09 21:48:38 +02:00
|
|
|
spawn_by = "air",
|
2023-07-09 21:52:28 +02:00
|
|
|
num_spawn_by = 3,
|
2023-07-09 21:48:38 +02:00
|
|
|
deco_type = "simple",
|
|
|
|
flags = "all_floors",
|
|
|
|
})
|