-
Notifications
You must be signed in to change notification settings - Fork 2
/
mossy_blocks.lua
107 lines (85 loc) · 2.58 KB
/
mossy_blocks.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
local node = {
name = "minetest_errata:mossystone",
short_name = "mossystone",
desc = "Mossy Stone",
tile = "default_stone.png^minetest_errata_moss_overlay.png",
}
minetest.register_node(node.name, {
description = node.desc,
tiles = {node.tile},
groups = {cracky = 3, stone = 1},
is_ground_content = false,
sounds = default.node_sound_stone_defaults(),
drop = "default:mossycobble",
})
minetest.register_craft({
output = node.name,
type = "shapeless",
recipe = {"default:junglegrass", "default:stone"},
})
-- Derivative blocks
if stairs and stairs.mod and stairs.mod == "redo" then
stairs.register_all(node.short_name, node.name,
{cracky = 3, stone = 1},
{node.tile},
node.desc .. " Stair",
node.desc .. " Slab",
default.node_sound_wood_defaults())
elseif minetest.global_exists("stairsplus") then
stairsplus:register_all("minetest_errata", node.short_name, node.name, {
description = node.desc,
tiles = {node.tile},
groups = {cracky = 3, stone = 1},
sounds = default.node_sound_wood_defaults(),
})
else
stairs.register_stair_and_slab(node.short_name, node.name,
{cracky = 3, stone = 1},
{node.tile},
node.desc .. " Stair",
node.desc .. " Slab",
default.node_sound_wood_defaults())
end
if minetest.get_modpath("moreblocks") then
local node = {
name = "minetest_errata:mossy_stone_tile",
short_name = "mossy_stone_tile",
desc = "Mossy Stone Tile",
tile = "moreblocks_stone_tile.png^minetest_errata_moss_overlay.png",
}
minetest.register_node(node.name, {
description = node.desc,
tiles = {node.tile},
groups = {cracky = 3, stone = 1},
is_ground_content = false,
sounds = default.node_sound_stone_defaults(),
drop = node.name,
})
minetest.register_craft({
output = node.name,
recipe = {{"default:mossycobble", "default:mossycobble"},
{"default:mossycobble", "default:mossycobble"}}
})
if stairs and stairs.mod and stairs.mod == "redo" then
stairs.register_all(node.short_name, node.name,
{cracky = 3, stone = 1},
{node.tile},
node.desc .. " Stair",
node.desc .. " Slab",
default.node_sound_wood_defaults())
elseif minetest.global_exists("stairsplus") then
stairsplus:register_all("minetest_errata", node.short_name, node.name, {
description = node.desc,
tiles = {node.tile},
groups = {cracky = 3, stone = 1},
sounds = default.node_sound_wood_defaults(),
})
else
stairs.register_stair_and_slab(node.short_name, node.name,
{cracky = 3, stone = 1},
{node.tile},
node.desc .. " Stair",
node.desc .. " Slab",
default.node_sound_wood_defaults())
end
end