1 -- Simple solid cubic nodes, most of them are the ground materials and simple building blocks
3 minetest
.register_node("mcl_core:stone", {
5 _doc_items_longdesc
= "One of the most common blocks in the world, almost the entire underground consists of stone. It sometimes contains ores. Stone may be created when water meets lava.",
6 _doc_items_hidden
= false,
7 tiles
= {"default_stone.png"},
8 is_ground_content
= true,
10 groups
= {pickaxey
=1, stone
=1, building_block
=1, material_stone
=1},
11 drop
= 'mcl_core:cobble',
12 sounds
= mcl_sounds
.node_sound_stone_defaults(),
13 _mcl_blast_resistance
= 30,
17 minetest
.register_node("mcl_core:stone_with_coal", {
18 description
= "Coal Ore",
19 _doc_items_longdesc
= "Some coal contained in stone, it is very common and can be found inside stone in medium to large clusters at nearly every height.",
20 _doc_items_hidden
= false,
21 tiles
= {"mcl_core_coal_ore.png"},
22 is_ground_content
= true,
24 groups
= {pickaxey
=1, building_block
=1, material_stone
=1},
25 drop
= 'mcl_core:coal_lump',
26 sounds
= mcl_sounds
.node_sound_stone_defaults(),
27 _mcl_blast_resistance
= 15,
31 minetest
.register_node("mcl_core:stone_with_iron", {
32 description
= "Iron Ore",
33 _doc_items_longdesc
= "Some iron contained in stone, it is prety common and can be found below sea level.",
34 tiles
= {"mcl_core_iron_ore.png"},
35 is_ground_content
= true,
37 groups
= {pickaxey
=3, building_block
=1, material_stone
=1},
38 drop
= 'mcl_core:stone_with_iron',
39 sounds
= mcl_sounds
.node_sound_stone_defaults(),
40 _mcl_blast_resistance
= 15,
45 minetest
.register_node("mcl_core:stone_with_gold", {
46 description
= "Gold Ore",
47 _doc_items_longdesc
= "This stone contains pure gold, a rare metal.",
48 tiles
= {"mcl_core_gold_ore.png"},
49 is_ground_content
= true,
51 groups
= {pickaxey
=4, building_block
=1, material_stone
=1},
52 drop
= "mcl_core:stone_with_gold",
53 sounds
= mcl_sounds
.node_sound_stone_defaults(),
54 _mcl_blast_resistance
= 15,
58 local redstone_timer
= 68.28
59 local redstone_ore_activate
= function(pos
)
60 minetest
.swap_node(pos
, {name
="mcl_core:stone_with_redstone_lit"})
61 local t
= minetest
.get_node_timer(pos
)
62 t
:start(redstone_timer
)
64 minetest
.register_node("mcl_core:stone_with_redstone", {
65 description
= "Redstone Ore",
66 _doc_items_longdesc
= "Redstone ore is commonly found near the bottom of the world. It glows when it is punched or walked upon.",
67 tiles
= {"mcl_core_redstone_ore.png"},
68 is_ground_content
= true,
70 groups
= {pickaxey
=4, building_block
=1, material_stone
=1},
75 items
= {"mesecons:redstone 4"},
79 items
= {"mesecons:redstone 5"},
83 sounds
= mcl_sounds
.node_sound_stone_defaults(),
84 on_punch
= redstone_ore_activate
,
85 on_walk_over
= redstone_ore_activate
, -- Uses walkover mod
86 _mcl_blast_resistance
= 15,
90 local redstone_ore_reactivate
= function(pos
)
91 local t
= minetest
.get_node_timer(pos
)
92 t
:start(redstone_timer
)
94 -- Light the redstone ore up when it has been touched
95 minetest
.register_node("mcl_core:stone_with_redstone_lit", {
96 description
= "Lit Redstone Ore",
97 _doc_items_create_entry
= false,
98 tiles
= {"mcl_core_redstone_ore.png"},
101 is_ground_content
= true,
103 groups
= {pickaxey
=4, not_in_creative_inventory
=1, material_stone
=1},
108 items
= {"mesecons:redstone 4"},
112 items
= {"mesecons:redstone 5"},
116 sounds
= mcl_sounds
.node_sound_stone_defaults(),
117 -- Reset timer after re-punching or stepping on
118 on_punch
= redstone_ore_reactivate
,
119 on_walk_over
= redstone_ore_reactivate
, -- Uses walkover mod
120 -- Turn back to normal node after some time has passed
121 on_timer
= function(pos
, elapsed
)
122 minetest
.swap_node(pos
, {name
="mcl_core:stone_with_redstone"})
124 _mcl_blast_resistance
= 15,
128 minetest
.register_node("mcl_core:stone_with_lapis", {
129 description
= "Lapis Lazuli Ore",
130 _doc_items_longdesc
= "Lapis lazuli ore is the ore of lapis lazuli. It can be rarely found in clusters near the bottom of the world.",
131 tiles
= {"mcl_core_lapis_ore.png"},
132 is_ground_content
= true,
134 groups
= {pickaxey
=3, building_block
=1, material_stone
=1},
138 {items
= {'mcl_dye:blue 8'},rarity
= 5},
139 {items
= {'mcl_dye:blue 7'},rarity
= 5},
140 {items
= {'mcl_dye:blue 6'},rarity
= 5},
141 {items
= {'mcl_dye:blue 5'},rarity
= 5},
142 {items
= {'mcl_dye:blue 4'}},
145 sounds
= mcl_sounds
.node_sound_stone_defaults(),
146 _mcl_blast_resistance
= 15,
150 minetest
.register_node("mcl_core:stone_with_emerald", {
151 description
= "Emerald Ore",
152 _doc_items_longdesc
= "Emerald ore is the ore of emeralds. It is very rare and can be found alone, not in clusters.",
153 tiles
= {"mcl_core_emerald_ore.png"},
154 is_ground_content
= true,
156 groups
= {pickaxey
=4, building_block
=1, material_stone
=1},
157 drop
= "mcl_core:emerald",
158 sounds
= mcl_sounds
.node_sound_stone_defaults(),
159 _mcl_blast_resistance
= 15,
163 minetest
.register_node("mcl_core:stone_with_diamond", {
164 description
= "Diamond Ore",
165 _doc_items_longdesc
= "Diamond ore is rare and can be found in clusters near the bottom of the world.",
166 tiles
= {"mcl_core_diamond_ore.png"},
167 is_ground_content
= true,
169 groups
= {pickaxey
=4, building_block
=1, material_stone
=1},
170 drop
= "mcl_core:diamond",
171 sounds
= mcl_sounds
.node_sound_stone_defaults(),
172 _mcl_blast_resistance
= 15,
176 minetest
.register_node("mcl_core:stonebrick", {
177 description
= "Stone Bricks",
178 _doc_items_longdesc
= doc
.sub
.items
.temp
.build
,
179 tiles
= {"default_stone_brick.png"},
181 groups
= {pickaxey
=1, stone
=1, stonebrick
=1, building_block
=1, material_stone
=1},
182 sounds
= mcl_sounds
.node_sound_stone_defaults(),
183 is_ground_content
= false,
184 _mcl_blast_resistance
= 30,
188 minetest
.register_node("mcl_core:stonebrickcarved", {
189 description
= "Chiseled Stone Bricks",
190 _doc_items_longdesc
= doc
.sub
.items
.temp
.build
,
191 tiles
= {"mcl_core_stonebrick_carved.png"},
192 is_ground_content
= false,
194 groups
= {pickaxey
=1, stone
=1, stonebrick
=1, building_block
=1, material_stone
=1},
195 sounds
= mcl_sounds
.node_sound_stone_defaults(),
196 is_ground_content
= false,
197 _mcl_blast_resistance
= 30,
201 minetest
.register_node("mcl_core:stonebrickcracked", {
202 description
= "Cracked Stone Bricks",
203 _doc_items_longdesc
= doc
.sub
.items
.temp
.build
,
204 tiles
= {"mcl_core_stonebrick_cracked.png"},
205 is_ground_content
= false,
207 groups
= {pickaxey
=1, stone
=1, stonebrick
=1, building_block
=1, material_stone
=1},
208 sounds
= mcl_sounds
.node_sound_stone_defaults(),
209 is_ground_content
= false,
210 _mcl_blast_resistance
= 30,
214 minetest
.register_node("mcl_core:stonebrickmossy", {
215 description
= "Mossy Stone Bricks",
216 _doc_items_longdesc
= doc
.sub
.items
.temp
.build
,
217 tiles
= {"mcl_core_stonebrick_mossy.png"},
219 groups
= {pickaxey
=1, stone
=1, stonebrick
=1, building_block
=1, material_stone
=1},
220 sounds
= mcl_sounds
.node_sound_stone_defaults(),
221 is_ground_content
= false,
222 _mcl_blast_resistance
= 30,
226 minetest
.register_node("mcl_core:granite", {
227 description
= "Granite",
228 _doc_items_longdesc
= "Granite is an igneous rock.",
229 tiles
= {"mcl_core_granite.png"},
230 is_ground_content
= true,
232 groups
= {pickaxey
=1, stone
=1, building_block
=1, material_stone
=1},
233 sounds
= mcl_sounds
.node_sound_stone_defaults(),
234 _mcl_blast_resistance
= 30,
238 minetest
.register_node("mcl_core:granite_smooth", {
239 description
= "Polished Granite",
240 _doc_items_longdesc
= "Polished granite is a decorational building block made from granite.",
241 tiles
= {"mcl_core_granite_smooth.png"},
243 is_ground_content
= false,
244 groups
= {pickaxey
=1, stone
=1, building_block
=1, material_stone
=1},
245 sounds
= mcl_sounds
.node_sound_stone_defaults(),
246 _mcl_blast_resistance
= 30,
250 minetest
.register_node("mcl_core:andesite", {
251 description
= "Andesite",
252 _doc_items_longdesc
= "Andesite is an igneous rock.",
253 tiles
= {"mcl_core_andesite.png"},
254 is_ground_content
= true,
256 groups
= {pickaxey
=1, stone
=1, building_block
=1, material_stone
=1},
257 sounds
= mcl_sounds
.node_sound_stone_defaults(),
258 _mcl_blast_resistance
= 30,
262 minetest
.register_node("mcl_core:andesite_smooth", {
263 description
= "Polished Andesite",
264 _doc_items_longdesc
= "Polished andesite is a decorational building block made from andesite.",
265 tiles
= {"mcl_core_andesite_smooth.png"},
266 is_ground_content
= false,
268 groups
= {pickaxey
=1, stone
=1, building_block
=1, material_stone
=1},
269 sounds
= mcl_sounds
.node_sound_stone_defaults(),
270 _mcl_blast_resistance
= 30,
274 minetest
.register_node("mcl_core:diorite", {
275 description
= "Diorite",
276 _doc_items_longdesc
= "Diorite is an igneous rock.",
277 tiles
= {"mcl_core_diorite.png"},
278 is_ground_content
= true,
280 groups
= {pickaxey
=1, stone
=1, building_block
=1, material_stone
=1},
281 sounds
= mcl_sounds
.node_sound_stone_defaults(),
282 _mcl_blast_resistance
= 30,
286 minetest
.register_node("mcl_core:diorite_smooth", {
287 description
= "Polished Diorite",
288 _doc_items_longdesc
= "Polished diorite is a decorational building block made from diorite.",
289 tiles
= {"mcl_core_diorite_smooth.png"},
290 is_ground_content
= false,
292 groups
= {pickaxey
=1, stone
=1, building_block
=1, material_stone
=1},
293 sounds
= mcl_sounds
.node_sound_stone_defaults(),
294 _mcl_blast_resistance
= 30,
299 minetest
.register_node("mcl_core:dirt_with_grass", {
300 description
= "Grass Block",
301 _doc_items_longdesc
= "A grass block is dirt with a grass cover. Grass blocks are resourceful blocks which allow the growth of all sorts of plants. They can be turned into farmland with a hoe and turned into grass paths with a shovel. In light, the grass slowly spreads onto dirt nearby. Under an opaque block or a liquid, a grass block may turn back to dirt.",
302 _doc_items_hidden
= false,
303 tiles
= {"default_grass.png", "default_dirt.png", "default_dirt.png^default_grass_side.png"},
304 is_ground_content
= true,
306 groups
= {handy
=1,shovely
=1, grass_block
=1, grass_block_no_snow
=1, soil
=1, soil_sapling
=2, soil_sugarcane
=1, cultivatable
=2, spreading_dirt_type
=1, enderman_takable
=1, building_block
=1},
307 drop
= 'mcl_core:dirt',
308 sounds
= mcl_sounds
.node_sound_dirt_defaults({
309 footstep
= {name
="default_grass_footstep", gain
=0.4},
311 on_construct
= function(pos
)
312 local found_node
= minetest
.find_node_near(pos
, 1, {"mcl_core:dirt_with_dry_grass", "mcl_core:dirt_with_dry_grass_snow"})
314 minetest
.set_node(pos
, {name
="mcl_core:dirt_with_dry_grass"})
316 return mcl_core
.on_snowable_construct(pos
)
318 _mcl_snowed
= "mcl_core:dirt_with_grass_snow",
319 _mcl_grass_palette_index
= 0,
320 _mcl_blast_resistance
= 3,
323 mcl_core
.register_snowed_node("mcl_core:dirt_with_grass_snow", "mcl_core:dirt_with_grass")
325 -- Grass Block variant for dry biomes
326 minetest
.register_node("mcl_core:dirt_with_dry_grass", {
327 _doc_items_create_entry
= false,
328 tiles
= {"default_dry_grass.png", "default_dirt.png", "default_dirt.png^default_dry_grass_side.png"},
329 is_ground_content
= true,
331 groups
= {handy
=1,shovely
=1, grass_block
=1, grass_block_no_snow
=1, soil
=1, soil_sapling
=2, soil_sugarcane
=1, cultivatable
=2, spreading_dirt_type
=1, enderman_takable
=1, building_block
=1, not_in_creative_inventory
=1},
332 drop
= 'mcl_core:dirt',
333 sounds
= mcl_sounds
.node_sound_dirt_defaults({
334 footstep
= {name
="default_grass_footstep", gain
=0.4},
336 on_construct
= mcl_core
.on_snowable_construct
,
337 _mcl_snowed
= "mcl_core:dirt_with_dry_grass_snow",
338 _mcl_grass_palette_index
= 1,
339 _mcl_blast_resistance
= 3,
342 mcl_core
.register_snowed_node("mcl_core:dirt_with_dry_grass_snow", "mcl_core:dirt_with_dry_grass")
344 if minetest
.get_modpath("doc") then
345 doc
.add_entry_alias("nodes", "mcl_core:dirt_with_grass", "nodes", "mcl_core:dirt_with_dry_grass")
346 doc
.add_entry_alias("nodes", "mcl_core:dirt_with_grass", "nodes", "mcl_core:dirt_with_dry_grass_snow")
349 minetest
.register_node("mcl_core:grass_path", {
350 tiles
= {"mcl_core_grass_path_top.png", "default_dirt.png", "mcl_core_grass_path_side.png"},
351 description
= "Grass Path",
352 _doc_items_longdesc
= "Grass paths are a decorational variant of grass blocks. Their top has a different color and they are a bit lower than grass blocks, making them useful to build footpaths. Grass paths can be created with a shovel. A grass path turns into dirt when it is below a solid block.",
353 drop
= "mcl_core:dirt",
354 is_ground_content
= true,
355 drawtype
= "nodebox",
360 -- 15/16 of the normal height
361 {-0.5, -0.5, -0.5, 0.5, 0.4375, 0.5},
364 groups
= {handy
=1,shovely
=1, cultivatable
=2, dirtifies_below_solid
=1, not_in_creative_inventory
=1, },
365 sounds
= mcl_sounds
.node_sound_dirt_defaults({
366 footstep
= {name
="default_grass_footstep", gain
=0.4},
368 _mcl_blast_resistance
= 3.25,
372 -- TODO: Add particles
373 minetest
.register_node("mcl_core:mycelium", {
374 description
= "Mycelium",
375 _doc_items_longdesc
= "Mycelium is a type of dirt and the ideal soil for mushrooms. Unlike other dirt-type blocks, it can not be turned into farmland with a hoe. In light, mycelium slowly spreads over nearby dirt. Under an opaque block or a liquid, it eventually turns back into dirt.",
376 tiles
= {"mcl_core_mycelium_top.png", "default_dirt.png", "mcl_core_mycelium_side.png"},
377 is_ground_content
= true,
379 groups
= {handy
=1,shovely
=1, spreading_dirt_type
=1, building_block
=1},
380 drop
= 'mcl_core:dirt',
381 sounds
= mcl_sounds
.node_sound_dirt_defaults({
382 footstep
= {name
="default_grass_footstep", gain
=0.4},
385 on_construct
= mcl_core
.on_snowable_construct
,
386 _mcl_snowed
= "mcl_core:mycelium_snow",
387 _mcl_blast_resistance
= 2.5,
390 mcl_core
.register_snowed_node("mcl_core:mycelium_snow", "mcl_core:mycelium")
392 minetest
.register_node("mcl_core:podzol", {
393 description
= "Podzol",
394 _doc_items_longdesc
= "Podzol is a type of dirt found in taiga forests. Only a few plants are able to survive on it.",
395 tiles
= {"mcl_core_dirt_podzol_top.png", "default_dirt.png", "mcl_core_dirt_podzol_side.png"},
396 is_ground_content
= true,
398 groups
= {handy
=1,shovely
=3, soil
=1, soil_sapling
=2, soil_sugarcane
=1, enderman_takable
=1, building_block
=1},
399 drop
= 'mcl_core:dirt',
400 sounds
= mcl_sounds
.node_sound_dirt_defaults(),
401 on_construct
= mcl_core
.on_snowable_construct
,
402 _mcl_snowed
= "mcl_core:podzol_snow",
403 _mcl_blast_resistance
= 2.5,
406 mcl_core
.register_snowed_node("mcl_core:podzol_snow", "mcl_core:podzol")
408 minetest
.register_node("mcl_core:dirt", {
409 description
= "Dirt",
410 _doc_items_longdesc
= "Dirt acts as a soil for a few plants. When in light, this block may grow a grass or mycelium cover if such blocks are nearby.",
411 _doc_items_hidden
= false,
412 tiles
= {"default_dirt.png"},
413 is_ground_content
= true,
415 groups
= {handy
=1,shovely
=1, soil
=1, soil_sapling
=2, soil_sugarcane
=1, cultivatable
=2, enderman_takable
=1, building_block
=1},
416 sounds
= mcl_sounds
.node_sound_dirt_defaults(),
417 _mcl_blast_resistance
= 3,
421 minetest
.register_node("mcl_core:coarse_dirt", {
422 description
= "Coarse Dirt",
423 _doc_items_longdesc
= "Coarse dirt acts as a soil for some plants and is similar to dirt, but it will never grow a cover.",
424 tiles
= {"mcl_core_coarse_dirt.png"},
425 is_ground_content
= true,
427 groups
= {handy
=1,shovely
=1, soil
=1, soil_sugarcane
=1, cultivatable
=1, enderman_takable
=1, building_block
=1},
428 sounds
= mcl_sounds
.node_sound_dirt_defaults(),
429 _mcl_blast_resistance
= 3,
433 minetest
.register_node("mcl_core:gravel", {
434 description
= "Gravel",
435 _doc_items_longdesc
= "This block consists of a couple of loose stones and can't support itself.",
436 tiles
= {"default_gravel.png"},
437 is_ground_content
= true,
439 groups
= {handy
=1,shovely
=1, falling_node
=1, enderman_takable
=1, building_block
=1, material_sand
=1},
443 {items
= {'mcl_core:flint'},rarity
= 10},
444 {items
= {'mcl_core:gravel'}}
447 sounds
= mcl_sounds
.node_sound_dirt_defaults({
448 footstep
= {name
="default_gravel_footstep", gain
=0.45},
450 _mcl_blast_resistance
= 3,
455 minetest
.register_node("mcl_core:sand", {
456 description
= "Sand",
457 _doc_items_longdesc
= "Sand is found in large quantities at beaches and deserts.",
458 _doc_items_hidden
= false,
459 tiles
= {"default_sand.png"},
460 is_ground_content
= true,
462 groups
= {handy
=1,shovely
=1, falling_node
=1, sand
=1, soil_sugarcane
=1, enderman_takable
=1, building_block
=1, material_sand
=1},
463 sounds
= mcl_sounds
.node_sound_sand_defaults(),
464 _mcl_blast_resistance
= 2.5,
468 minetest
.register_node("mcl_core:sandstone", {
469 description
= "Sandstone",
470 _doc_items_hidden
= false,
471 _doc_items_longdesc
= "Sandstone is compressed sand and is a rather soft kind of stone.",
472 tiles
= {"mcl_core_sandstone_top.png", "mcl_core_sandstone_bottom.png", "mcl_core_sandstone_normal.png"},
473 is_ground_content
= true,
475 groups
= {pickaxey
=1, sandstone
=1, building_block
=1, material_stone
=1},
476 sounds
= mcl_sounds
.node_sound_stone_defaults(),
477 _mcl_blast_resistance
= 4,
481 minetest
.register_node("mcl_core:sandstonesmooth", {
482 description
= "Smooth Sandstone",
483 _doc_items_longdesc
= "Smooth sandstone is a decorational building block.",
484 tiles
= {"mcl_core_sandstone_top.png", "mcl_core_sandstone_bottom.png", "mcl_core_sandstone_smooth.png"},
485 is_ground_content
= true,
487 groups
= {pickaxey
=1, sandstone
=1, building_block
=1, material_stone
=1},
488 sounds
= mcl_sounds
.node_sound_stone_defaults(),
489 _mcl_blast_resistance
= 4,
493 minetest
.register_node("mcl_core:sandstonecarved", {
494 description
= "Chiseled Sandstone",
495 _doc_items_longdesc
= "Chiseled sandstone is a decorational building block.",
496 tiles
= {"mcl_core_sandstone_top.png", "mcl_core_sandstone_bottom.png", "mcl_core_sandstone_carved.png"},
497 is_ground_content
= true,
499 groups
= {pickaxey
=1, sandstone
=1, building_block
=1, material_stone
=1},
500 sounds
= mcl_sounds
.node_sound_stone_defaults(),
501 _mcl_blast_resistance
= 4,
507 minetest
.register_node("mcl_core:redsand", {
508 description
= "Red Sand",
509 _doc_items_longdesc
= "Red sand is found in large quantities in mesa biomes.",
510 tiles
= {"mcl_core_red_sand.png"},
511 is_ground_content
= true,
513 groups
= {handy
=1,shovely
=1, falling_node
=1, sand
=1, soil_sugarcane
=1, enderman_takable
=1, building_block
=1, material_sand
=1},
514 sounds
= mcl_sounds
.node_sound_sand_defaults(),
515 _mcl_blast_resistance
= 2.5,
519 minetest
.register_node("mcl_core:redsandstone", {
520 description
= "Red Sandstone",
521 _doc_items_longdesc
= "Red sandstone is compressed red sand and is a rather soft kind of stone.",
522 tiles
= {"mcl_core_red_sandstone_top.png", "mcl_core_red_sandstone_bottom.png", "mcl_core_red_sandstone_normal.png"},
523 is_ground_content
= true,
525 groups
= {pickaxey
=1, redsandstone
=1, building_block
=1, material_stone
=1},
526 sounds
= mcl_sounds
.node_sound_stone_defaults(),
527 _mcl_blast_resistance
= 4,
531 minetest
.register_node("mcl_core:redsandstonesmooth", {
532 description
= "Smooth Red Sandstone",
533 _doc_items_longdesc
= "Smooth red sandstone is a decorational building block.",
534 tiles
= {"mcl_core_red_sandstone_top.png", "mcl_core_red_sandstone_bottom.png", "mcl_core_red_sandstone_smooth.png"},
535 is_ground_content
= true,
537 groups
= {pickaxey
=1, redsandstone
=1, building_block
=1, material_stone
=1},
538 sounds
= mcl_sounds
.node_sound_stone_defaults(),
539 _mcl_blast_resistance
= 4,
543 minetest
.register_node("mcl_core:redsandstonecarved", {
544 description
= "Chiseled Red Sandstone",
545 _doc_items_longdesc
= "Chiseled red sandstone is a decorational building block.",
546 tiles
= {"mcl_core_red_sandstone_top.png", "mcl_core_red_sandstone_bottom.png", "mcl_core_red_sandstone_carved.png"},
547 is_ground_content
= true,
549 groups
= {pickaxey
=1, redsandstone
=1, building_block
=1, material_stone
=1},
550 sounds
= mcl_sounds
.node_sound_stone_defaults(),
551 _mcl_blast_resistance
= 4,
557 minetest
.register_node("mcl_core:clay", {
558 description
= "Clay",
559 _doc_items_longdesc
= "Clay is a versatile kind of earth commonly found at beaches underwater.",
560 _doc_items_hidden
= false,
561 tiles
= {"default_clay.png"},
562 is_ground_content
= true,
564 groups
= {handy
=1,shovely
=1, enderman_takable
=1, building_block
=1},
565 drop
= 'mcl_core:clay_lump 4',
566 sounds
= mcl_sounds
.node_sound_dirt_defaults(),
567 _mcl_blast_resistance
= 3,
571 minetest
.register_node("mcl_core:brick_block", {
572 -- Original name: “Bricks”
573 description
= "Brick Block",
574 _doc_items_longdesc
= "Brick blocks are a good building material for building solid houses and can take quite a punch.",
575 tiles
= {"default_brick.png"},
576 is_ground_content
= false,
578 groups
= {pickaxey
=1, building_block
=1, material_stone
=1},
579 sounds
= mcl_sounds
.node_sound_stone_defaults(),
580 _mcl_blast_resistance
= 30,
585 minetest
.register_node("mcl_core:bedrock", {
586 description
= "Bedrock",
587 _doc_items_longdesc
= "Bedrock is a very hard type of rock. It can not be broken, destroyed, collected or moved by normal means, unless in Creative Mode.".."\n"..
588 "In the End dimension, starting a fire on this block will create an eternal fire.",
589 tiles
= {"mcl_core_bedrock.png"},
591 groups
= {creative_breakable
=1, building_block
=1, material_stone
=1},
592 sounds
= mcl_sounds
.node_sound_stone_defaults(),
593 is_ground_content
= false,
594 on_blast
= function() end,
596 _mcl_blast_resistance
= 18000000,
599 -- Eternal fire on top of bedrock, if in the End dimension
600 after_destruct
= function(pos
)
602 if minetest
.get_node(pos
).name
== "mcl_fire:eternal_fire" then
603 minetest
.remove_node(pos
)
606 _on_ignite
= function(player
, pointed_thing
)
607 local pos
= pointed_thing
.under
608 local _
, dim
= mcl_util
.y_to_layer(pos
.y
)
609 local flame_pos
= {x
= pos
.x
, y
= pos
.y
+ 1, z
= pos
.z
}
610 local fn
= minetest
.get_node(flame_pos
)
611 if dim
== "end" and fn
.name
== "air" and not minetest
.is_protected(flame_pos
, "fire") and pointed_thing
.under
.y
< pointed_thing
.above
.y
then
612 minetest
.set_node(flame_pos
, {name
= "mcl_fire:eternal_fire"})
620 minetest
.register_node("mcl_core:cobble", {
621 description
= "Cobblestone",
622 _doc_items_longdesc
= doc
.sub
.items
.temp
.build
,
623 _doc_items_hidden
= false,
624 tiles
= {"default_cobble.png"},
625 is_ground_content
= false,
627 groups
= {pickaxey
=1, building_block
=1, material_stone
=1},
628 sounds
= mcl_sounds
.node_sound_stone_defaults(),
629 _mcl_blast_resistance
= 30,
633 minetest
.register_node("mcl_core:mossycobble", {
634 description
= "Moss Stone",
635 _doc_items_longdesc
= doc
.sub
.items
.temp
.build
,
636 tiles
= {"default_mossycobble.png"},
637 is_ground_content
= false,
639 groups
= {pickaxey
=1, building_block
=1, material_stone
=1},
640 sounds
= mcl_sounds
.node_sound_stone_defaults(),
641 _mcl_blast_resistance
= 30,
645 minetest
.register_node("mcl_core:coalblock", {
646 description
= "Block of Coal",
647 _doc_items_longdesc
= "Blocks of coal are useful as a compact storage of coal and very useful as a furnace fuel. A block of coal is as efficient as 10 coal.",
648 tiles
= {"default_coal_block.png"},
649 is_ground_content
= false,
651 groups
= {pickaxey
=1, flammable
=1, building_block
=1, material_stone
=1},
652 sounds
= mcl_sounds
.node_sound_stone_defaults(),
653 _mcl_blast_resistance
= 30,
657 minetest
.register_node("mcl_core:ironblock", {
658 description
= "Block of Iron",
659 _doc_items_longdesc
= "A block of iron is mostly a decorational block but also useful as a compact storage of iron ingots.",
660 tiles
= {"default_steel_block.png"},
661 is_ground_content
= false,
663 groups
= {pickaxey
=2, building_block
=1},
664 sounds
= mcl_sounds
.node_sound_metal_defaults(),
665 _mcl_blast_resistance
= 30,
669 minetest
.register_node("mcl_core:goldblock", {
670 description
= "Block of Gold",
671 _doc_items_longdesc
= "A block of gold is mostly a shiny decorational block but also useful as a compact storage of gold ingots.",
672 tiles
= {"default_gold_block.png"},
673 is_ground_content
= false,
675 groups
= {pickaxey
=4, building_block
=1},
676 sounds
= mcl_sounds
.node_sound_metal_defaults(),
677 _mcl_blast_resistance
= 30,
681 minetest
.register_node("mcl_core:diamondblock", {
682 description
= "Block of Diamond",
683 _doc_items_longdesc
= "A block of diamond mostly a shiny decorational block but also useful as a compact storage of diamonds.",
684 tiles
= {"default_diamond_block.png"},
685 is_ground_content
= false,
687 groups
= {pickaxey
=4, building_block
=1},
688 sounds
= mcl_sounds
.node_sound_stone_defaults(),
689 _mcl_blast_resistance
= 30,
693 minetest
.register_node("mcl_core:lapisblock", {
694 description
= "Lapis Lazuli Block",
695 _doc_items_longdesc
= "A lapis lazuli block is mostly a decorational block but also useful as a compact storage of lapis lazuli.",
696 tiles
= {"mcl_core_lapis_block.png"},
697 is_ground_content
= false,
699 groups
= {pickaxey
=3, building_block
=1},
700 sounds
= mcl_sounds
.node_sound_stone_defaults(),
701 _mcl_blast_resistance
= 15,
705 minetest
.register_node("mcl_core:emeraldblock", {
706 description
= "Block of Emerald",
707 _doc_items_longdesc
= "A block of emerald is mostly a shiny decorational block but also useful as a compact storage of emeralds.",
708 tiles
= {"mcl_core_emerald_block.png"},
709 is_ground_content
= false,
711 groups
= {pickaxey
=4, building_block
=1},
712 sounds
= mcl_sounds
.node_sound_stone_defaults(),
713 _mcl_blast_resistance
= 30,
717 minetest
.register_node("mcl_core:obsidian", {
718 description
= "Obsidian",
719 _doc_items_longdesc
= "Obsidian is an extremely hard mineral with an enourmous blast-resistance. Obsidian is formed when water meets lava.",
720 tiles
= {"default_obsidian.png"},
721 is_ground_content
= true,
722 sounds
= mcl_sounds
.node_sound_stone_defaults(),
724 groups
= {pickaxey
=5, building_block
=1, material_stone
=1},
725 _mcl_blast_resistance
= 6000,
729 minetest
.register_node("mcl_core:ice", {
731 _doc_items_longdesc
= "Ice is a translucent solid block usually found in cold areas. When it is broken while resting on top of another block, it will turn into still water.",
732 drawtype
= "glasslike",
733 tiles
= {"default_ice.png"},
734 is_ground_content
= true,
736 use_texture_alpha
= true,
738 groups
= {handy
=1,pickaxey
=1, slippery
=3, building_block
=1},
740 sounds
= mcl_sounds
.node_sound_glass_defaults(),
741 after_destruct
= function(pos
, oldnode
)
742 -- Create a water source if ice is destroyed and there was something below it
743 local below
= {x
=pos
.x
, y
=pos
.y
-1, z
=pos
.z
}
744 local belownode
= minetest
.get_node(below
)
745 local _
, dim
= mcl_util
.y_to_layer(below
.y
)
746 if dim
~= "nether" and belownode
.name
~= "air" and belownode
.name
~= "ignore" and belownode
.name
~= "mcl_core:void" then
747 minetest
.set_node(pos
, {name
="mcl_core:water_source"})
750 _mcl_blast_resistance
= 2.5,
754 minetest
.register_node("mcl_core:packed_ice", {
755 description
= "Packed Ice",
756 _doc_items_longdesc
= "Packed ice is a compressed form of ice. It is opaque and solid.",
757 tiles
= {"mcl_core_ice_packed.png"},
758 is_ground_content
= true,
760 groups
= {handy
=1,pickaxey
=1, slippery
=3, building_block
=1},
762 sounds
= mcl_sounds
.node_sound_glass_defaults(),
763 _mcl_blast_resistance
= 2.5,
767 -- Frosted Ice (4 nodes)
770 ice
.increase_age
= function(pos
, ice_near
, first_melt
)
771 -- Increase age of frosted age or turn to water source if too old
772 local nn
= minetest
.get_node(pos
).name
773 local age
= tonumber(string.sub(nn
, -1))
774 local _
, dim
= mcl_util
.y_to_layer(pos
.y
)
775 if age
== nil then return end
777 minetest
.swap_node(pos
, { name
= "mcl_core:frosted_ice_"..(age
+1) })
779 if dim
~= "nether" then
780 minetest
.set_node(pos
, { name
= "mcl_core:water_source" })
782 minetest
.remove_node(pos
)
785 -- Spread aging to neighbor blocks, but not recursively
786 if first_melt
and i
== 3 then
787 for j
=1, #ice_near
do
788 ice
.increase_age(ice_near
[j
], false)
792 local use_doc
= i
== 0
795 longdesc
= "Frosted ice is a short-lived solid translucent block. It melts into a water source within a few seconds."
797 minetest
.register_node("mcl_core:frosted_ice_"..i
, {
798 description
= "Frosted Ice",
799 _doc_items_create_entry
= use_doc
,
800 _doc_items_longdesc
= longdesc
,
801 drawtype
= "glasslike",
802 tiles
= {"mcl_core_frosted_ice_"..i
..".png"},
803 is_ground_content
= false,
805 use_texture_alpha
= true,
807 groups
= {handy
=1, frosted_ice
=1, slippery
=3, not_in_creative_inventory
=1},
809 sounds
= mcl_sounds
.node_sound_glass_defaults(),
810 on_construct
= function(pos
)
811 local timer
= minetest
.get_node_timer(pos
)
814 on_timer
= function(pos
, elapsed
)
815 local ice_near
= minetest
.find_nodes_in_area(
816 { x
= pos
.x
- 1, y
= pos
.y
- 1, z
= pos
.z
- 1 },
817 { x
= pos
.x
+ 1, y
= pos
.y
+ 1, z
= pos
.z
+ 1 },
818 { "group:frosted_ice" }
820 -- Check condition to increase age
821 if (#ice_near
< 4 and minetest
.get_node_light(pos
) > (11 - i
)) or math
.random(1, 3) == 1 then
822 ice
.increase_age(pos
, ice_near
, true)
824 local timer
= minetest
.get_node_timer(pos
)
827 _mcl_blast_resistance
= 2.5,
831 -- Add entry aliases for the Help
832 if minetest
.get_modpath("doc") and i
> 0 then
833 doc
.add_entry_alias("nodes", "mcl_core:frosted_ice_0", "nodes", "mcl_core:frosted_ice_"..i
)
837 minetest
.register_node("mcl_core:snow", {
838 description
= "Top Snow",
839 _doc_items_longdesc
= "Top snow is a thin layer of snow.",
840 _doc_items_hidden
= false,
841 tiles
= {"default_snow.png"},
842 wield_image
= "default_snow.png",
843 wield_scale
= { x
=1, y
=1, z
=1 },
844 is_ground_content
= true,
846 sunlight_propagates
= true,
848 drawtype
= "nodebox",
851 on_flood
= function(pos
, oldnode
, newnode
)
852 local npos
= {x
=pos
.x
, y
=pos
.y
-1, z
=pos
.z
}
853 local node
= minetest
.get_node(npos
)
854 mcl_core
.clear_snow_dirt(npos
, node
)
859 {-0.5, -0.5, -0.5, 0.5, -0.5+2/16, 0.5},
862 groups
= {shovely
=1, attached_node
=1,deco_block
=1, dig_by_piston
=1, snow_cover
=1},
863 sounds
= mcl_sounds
.node_sound_snow_defaults(),
864 on_construct
= mcl_core
.on_snow_construct
,
865 after_destruct
= mcl_core
.after_snow_destruct
,
866 drop
= "mcl_throwing:snowball 2",
867 _mcl_blast_resistance
= 0.5,
871 minetest
.register_node("mcl_core:snowblock", {
872 description
= "Snow",
873 _doc_items_longdesc
= "This is a full block of snow. Snow of this thickness is usually found in areas of extreme cold.",
874 _doc_items_hidden
= false,
875 tiles
= {"default_snow.png"},
876 is_ground_content
= true,
878 groups
= {shovely
=1, building_block
=1, snow_cover
=1},
879 sounds
= mcl_sounds
.node_sound_snow_defaults(),
880 on_construct
= mcl_core
.on_snow_construct
,
881 after_destruct
= mcl_core
.after_snow_destruct
,
882 drop
= "mcl_throwing:snowball 4",
883 _mcl_blast_resistance
= 1,
887 -- Add entry aliases for the Help
888 if minetest
.get_modpath("doc") then
889 doc
.add_entry_alias("nodes", "mcl_core:stone_with_redstone", "nodes", "mcl_core:stone_with_redstone_lit")
890 doc
.add_entry_alias("nodes", "mcl_core:water_source", "nodes", "mcl_core:water_flowing")
891 doc
.add_entry_alias("nodes", "mcl_core:lava_source", "nodes", "mcl_core:lava_flowing")