This repository has been archived by the owner on Apr 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathearth.lua
299 lines (241 loc) · 7.46 KB
/
earth.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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
----------------------------------------------------------
-- Earthen Construction
-- blocks made from dirt
-------------------------------------------------
-------------------------------
--Compacted dirt
--i.e. a dirt floor
-- this is to simulate dirt floored buildings...
-- where the only preparation was clearing the vegetation
--created via dirt compactor tool
minetest.register_node("earthbuild:compacted_dirt", {
description = "Compacted Dirt",
tiles = {"earthbuild_compacted_dirt.png"},
groups = {crumbly = 2},
drop = 'default:dirt',
sounds = default.node_sound_dirt_defaults(),
})
-----------------------------------------------------
--TURF
-- the grass layer sliced off from the soil.
-- uses the grass roots for strength.
--grass still grows on top
--craft... only using grass layer, so need to harvest dirt_with_grass...
-- turf cutter to override default drop dirt.
---------
--Turf
minetest.register_node('earthbuild:turf', {
description = 'Turf Wall',
drawtype = "normal",
tiles = { "default_grass.png",
"earthbuild_compacted_dirt.png",
"earthbuild_turf.png",
"earthbuild_turf.png",
"earthbuild_turf.png",
"earthbuild_turf.png"},
paramtype = "light",
--drop = "default:dirt",
groups = {crumbly = 2, falling_node = 1},
sounds = default.node_sound_dirt_defaults(),
})
--------------
--Turf with drystack.
-- this is typically used at the bottom of walls.
-- would make both materials go further (1/2 each).
minetest.register_node('earthbuild:turf_and_drystack', {
description = 'Turf and Drystack Wall',
drawtype = "normal",
tiles = { "default_grass.png",
"earthbuild_compacted_dirt.png",
"earthbuild_turf_and_drystack.png",
"earthbuild_turf_and_drystack.png",
"earthbuild_turf_and_drystack.png",
"earthbuild_turf_and_drystack.png"},
paramtype = "light",
groups = {cracky = 3, crumbly = 1, oddly_breakable_by_hand = 1, falling_node = 1},
sounds = default.node_sound_dirt_defaults(),
})
--craft turf and drystack
minetest.register_craft({
output = 'earthbuild:turf_and_drystack 2',
recipe = {
{'earthbuild:turf'},
{'earthbuild:drystack'},
}
})
----------------------------------------------------------
--EARTH, COB, and MUD BRICK NODES AND CRAFTS
--Note on digging strenghts:
-- Rammed earth is hard e.g. like default sandstone {crumbly = 1, cracky = 3}
-- cob is stronger than dirt {crumbly = 3}, but softer than rammed earth (i.e. 2)
-- all are easy with a pick axe {cracky = 3}
--Note on falling:
--all of these are massive lumps of mud... so need support.
--apparently domes, arches etc can be made with cob and mudbrick but are difficult.
-- limited this ability to mudbrick... to give some point to making it.
--Note on merits of each block:
--all are stronger/more aesthetic than dirt.
--rammed earth: when have lots of/only dirt and want hard walls.
-- cob: a precursor to mudbricks, or for wattle and daub. Use when don't need supports.
-- mudbrick: more versatile than cob (no falling)
---------------------------
--Rammed Earth
minetest.register_node('earthbuild:rammed_earth', {
description = 'Rammed Earth',
drawtype = "normal",
tiles = {
"earthbuild_rammed_earth.png",
"earthbuild_rammed_earth_side.png",
"earthbuild_rammed_earth_side.png",
"earthbuild_rammed_earth_side.png",
"earthbuild_rammed_earth_side.png",
"earthbuild_rammed_earth_side.png"
},
paramtype = "light",
--drop = "default:dirt",
groups = {crumbly = 1, cracky = 3, falling_node = 1},
sounds = default.node_sound_dirt_defaults(),
})
-- adds rammed_earth recipes
minetest.register_craft({
output = 'earthbuild:rammed_earth 1',
recipe = {
{'default:dirt'},
{'default:dirt'},
{'default:dirt'},
}
})
--only for rammed as cob is typically made with water
minetest.register_craft({
output = 'earthbuild:rammed_earth 1',
recipe = {
{'default:dry_dirt'},
{'default:dry_dirt'},
{'default:dry_dirt'},
}
})
------------------------------------------
--Cob
minetest.register_node('earthbuild:cob', {
description = 'Cob',
drawtype = "normal",
tiles = {"earthbuild_cob.png"},
paramtype = "light",
--drop = "default:dirt",
groups = {crumbly = 2, cracky = 3, falling_node = 1},
sounds = default.node_sound_dirt_defaults(),
})
-- adds cob recipes
minetest.register_craft({
output = 'earthbuild:cob 2',
recipe = {
{'default:dirt', '', 'default:dirt'},
{'', 'group:grass', ''},
{'', '', ''},
}
})
minetest.register_craft({
output = 'earthbuild:cob 2',
recipe = {
{'default:dirt', '', 'default:dirt'},
{'', 'group:dry_grass', ''},
{'', '', ''},
}
})
minetest.register_craft({
output = 'earthbuild:cob 2',
recipe = {
{'default:dirt', '', 'default:dirt'},
{'', 'default:junglegrass', ''},
{'', '', ''},
}
})
minetest.register_craft({
output = 'earthbuild:cob 2',
recipe = {
{'default:dirt', '', 'default:dirt'},
{'', 'default:dry_shrub', ''},
{'', '', ''},
}
})
minetest.register_craft({
output = 'earthbuild:cob 2',
recipe = {
{'default:dirt', '', 'default:dirt'},
{'', 'default:papyrus', ''},
{'', '', ''},
}
})
minetest.register_craft({
output = 'earthbuild:cob 2',
recipe = {
{'default:dirt', '', 'default:dirt'},
{'', 'farming:wheat', ''},
{'', '', ''},
}
})
minetest.register_craft({
output = 'earthbuild:cob 2',
recipe = {
{'default:dirt', '', 'default:dirt'},
{'', 'group:leaves', ''},
{'', '', ''},
}
})
-- craft the cob from mudbrick
-- (they are the same stuff, just arranged differently)
minetest.register_craft({
output = 'earthbuild:cob',
recipe = {{'earthbuild:mud_brick'}}
})
---------------------------------------------------------
--MUD BRICK NODES AND CRAFTS
minetest.register_node('earthbuild:mud_brick', {
description = 'Mud Brick',
drawtype = "normal",
tiles = {"earthbuild_mud_brick.png"},
paramtype = "light",
groups = {crumbly = 2, cracky = 3},
sounds = default.node_sound_dirt_defaults(),
})
-- craft the mud brick from cob
-- (they are the same stuff, just arranged differently)
minetest.register_craft({
output = 'earthbuild:mud_brick',
recipe = {{'earthbuild:cob'}}
})
----------------------------------------------------------
--STAIRS AND SLABS NODES
-- Stairs and slab for rammed earth
stairs.register_stair_and_slab("rammed_earth", "earthbuild:rammed_earth",
{crumbly = 1, cracky = 3, falling_node = 1},
{"earthbuild_rammed_earth.png"},
"Rammed Earth Stair",
"Rammed Earth Slab",
default.node_sound_dirt_defaults())
-- Stairs and slab for cob
stairs.register_stair_and_slab("cob", "earthbuild:cob",
{crumbly = 2, cracky = 3, falling_node = 1},
{"earthbuild_cob.png"},
"Cob Stair",
"Cob Slab",
default.node_sound_dirt_defaults())
-- Stairs and slab for mud brick
stairs.register_stair_and_slab("mud_brick", "earthbuild:mud_brick",
{crumbly = 2, cracky = 3},
{"earthbuild_mud_brick.png"},
"Mud Brick Stair",
"Mud Brick Slab",
default.node_sound_dirt_defaults())
-- Stairs and slab for Turf
stairs.register_stair_and_slab("turf", "earthbuild:turf",
{crumbly = 2, falling_node = 1},
{ "default_grass.png",
"earthbuild_compacted_dirt.png",
"earthbuild_turf.png",
"earthbuild_turf.png",
"earthbuild_turf.png",
"earthbuild_turf.png"},
"Turf Stair",
"Turf Slab",
default.node_sound_dirt_defaults())