1 -- mods/default/nodes.lua
7 (1. Material 2. Cobble variant 3. Brick variant [4. Modified forms])
16 default:desert_stonebrick
19 default:sandstonebrick
26 (1. Material [2. Modified forms])
29 default:dirt_with_grass
30 default:dirt_with_grass_footsteps
31 default:dirt_with_snow
47 (1. Trunk 2. Fabricated trunk 3. Leaves 4. Sapling [5. Fruits])
67 (1. In stone 2. Block)
69 default:stone_with_coal
72 default:stone_with_iron
75 default:stone_with_copper
79 default:stone_with_gold
82 default:stone_with_mese
85 default:stone_with_diamond
102 (1. Source 2. Flowing)
105 default:water_flowing
107 default:river_water_source
108 default:river_water_flowing
113 Tools / "Advanced" crafting / Non-"natural"
114 -------------------------------------------
127 default:obsidian_glass
139 default:nyancat_rainbow
147 minetest.register_node("default:stone", {
148 description = "Stone",
149 tiles = {"default_stone.png"},
150 is_ground_content = true,
151 groups = {cracky=3, stone=1},
152 drop = 'default:cobble',
153 legacy_mineral = true,
154 sounds = default.node_sound_stone_defaults(),
157 minetest.register_node("default:cobble", {
158 description = "Cobblestone",
159 tiles = {"default_cobble.png"},
160 is_ground_content = true,
161 groups = {cracky=3, stone=2},
162 sounds = default.node_sound_stone_defaults(),
165 minetest.register_node("default:stonebrick", {
166 description = "Stone Brick",
167 tiles = {"default_stone_brick.png"},
168 groups = {cracky=2, stone=1},
169 sounds = default.node_sound_stone_defaults(),
172 minetest.register_node("default:mossycobble", {
173 description = "Mossy Cobblestone",
174 tiles = {"default_mossycobble.png"},
175 is_ground_content = true,
176 groups = {cracky=3, stone=1},
177 sounds = default.node_sound_stone_defaults(),
182 minetest.register_node("default:desert_stone", {
183 description = "Desert Stone",
184 tiles = {"default_desert_stone.png"},
185 is_ground_content = true,
186 groups = {cracky=3, stone=1},
187 drop = 'default:desert_cobble',
188 legacy_mineral = true,
189 sounds = default.node_sound_stone_defaults(),
192 minetest.register_node("default:desert_cobble", {
193 description = "Desert Cobblestone",
194 tiles = {"default_desert_cobble.png"},
195 is_ground_content = true,
196 groups = {cracky=3, stone=2},
197 sounds = default.node_sound_stone_defaults(),
200 minetest.register_node("default:desert_stonebrick", {
201 description = "Desert Stone Brick",
202 tiles = {"default_desert_stone_brick.png"},
203 groups = {cracky=2, stone=1},
204 sounds = default.node_sound_stone_defaults(),
209 minetest.register_node("default:sandstone", {
210 description = "Sandstone",
211 tiles = {"default_sandstone.png"},
212 is_ground_content = true,
213 groups = {crumbly=2,cracky=3},
214 sounds = default.node_sound_stone_defaults(),
217 minetest.register_node("default:sandstonebrick", {
218 description = "Sandstone Brick",
219 tiles = {"default_sandstone_brick.png"},
220 is_ground_content = true,
222 sounds = default.node_sound_stone_defaults(),
227 minetest.register_node("default:obsidian", {
228 description = "Obsidian",
229 tiles = {"default_obsidian.png"},
230 is_ground_content = true,
231 sounds = default.node_sound_stone_defaults(),
232 groups = {cracky=1,level=2},
235 minetest.register_node("default:obsidianbrick", {
236 description = "Obsidian Brick",
237 tiles = {"default_obsidian_brick.png"},
238 sounds = default.node_sound_stone_defaults(),
239 groups = {cracky=1,level=2},
246 minetest.register_node("default:dirt", {
247 description = "Dirt",
248 tiles = {"default_dirt.png"},
249 is_ground_content = true,
250 groups = {crumbly=3,soil=1},
251 sounds = default.node_sound_dirt_defaults(),
254 minetest.register_node("default:dirt_with_grass", {
255 description = "Dirt with Grass",
256 tiles = {"default_grass.png", "default_dirt.png", "default_dirt.png^default_grass_side.png"},
257 is_ground_content = true,
258 groups = {crumbly=3,soil=1},
259 drop = 'default:dirt',
260 sounds = default.node_sound_dirt_defaults({
261 footstep = {name="default_grass_footstep", gain=0.25},
265 minetest.register_node("default:dirt_with_grass_footsteps", {
266 description = "Dirt with Grass and Footsteps",
267 tiles = {"default_grass_footsteps.png", "default_dirt.png", "default_dirt.png^default_grass_side.png"},
268 is_ground_content = true,
269 groups = {crumbly=3,soil=1,not_in_creative_inventory=1},
270 drop = 'default:dirt',
271 sounds = default.node_sound_dirt_defaults({
272 footstep = {name="default_grass_footstep", gain=0.25},
276 minetest.register_node("default:dirt_with_snow", {
277 description = "Dirt with Snow",
278 tiles = {"default_snow.png", "default_dirt.png", "default_dirt.png^default_snow_side.png"},
279 is_ground_content = true,
280 groups = {crumbly=3,soil=1},
281 drop = 'default:dirt',
282 sounds = default.node_sound_dirt_defaults({
283 footstep = {name="default_snow_footstep", gain=0.25},
289 minetest.register_node("default:sand", {
290 description = "Sand",
291 tiles = {"default_sand.png"},
292 is_ground_content = true,
293 groups = {crumbly=3, falling_node=1, sand=1},
294 sounds = default.node_sound_sand_defaults(),
297 minetest.register_node("default:desert_sand", {
298 description = "Desert Sand",
299 tiles = {"default_desert_sand.png"},
300 is_ground_content = true,
301 groups = {crumbly=3, falling_node=1, sand=1},
302 sounds = default.node_sound_sand_defaults(),
307 minetest.register_node("default:gravel", {
308 description = "Gravel",
309 tiles = {"default_gravel.png"},
310 is_ground_content = true,
311 groups = {crumbly=2, falling_node=1},
312 sounds = default.node_sound_dirt_defaults({
313 footstep = {name="default_gravel_footstep", gain=0.5},
314 dug = {name="default_gravel_footstep", gain=1.0},
320 minetest.register_node("default:clay", {
321 description = "Clay",
322 tiles = {"default_clay.png"},
323 is_ground_content = true,
324 groups = {crumbly=3},
325 drop = 'default:clay_lump 4',
326 sounds = default.node_sound_dirt_defaults(),
331 minetest.register_node("default:snow", {
332 description = "Snow",
333 tiles = {"default_snow.png"},
334 inventory_image = "default_snowball.png",
335 wield_image = "default_snowball.png",
336 is_ground_content = true,
339 drawtype = "nodebox",
343 {-0.5, -0.5, -0.5, 0.5, -0.5+2/16, 0.5},
346 groups = {crumbly=3,falling_node=1},
347 sounds = default.node_sound_dirt_defaults({
348 footstep = {name="default_snow_footstep", gain=0.25},
349 dug = {name="default_snow_footstep", gain=0.75},
352 on_construct = function(pos)
354 if minetest.get_node(pos).name == "default:dirt_with_grass" then
355 minetest.set_node(pos, {name="default:dirt_with_snow"})
361 minetest.register_node("default:snowblock", {
362 description = "Snow Block",
363 tiles = {"default_snow.png"},
364 is_ground_content = true,
365 groups = {crumbly=3},
366 sounds = default.node_sound_dirt_defaults({
367 footstep = {name="default_snow_footstep", gain=0.25},
368 dug = {name="default_snow_footstep", gain=0.75},
374 minetest.register_node("default:ice", {
376 tiles = {"default_ice.png"},
377 is_ground_content = false,
380 sounds = default.node_sound_glass_defaults(),
387 minetest.register_node("default:tree", {
388 description = "Tree",
389 tiles = {"default_tree_top.png", "default_tree_top.png", "default_tree.png"},
390 paramtype2 = "facedir",
391 is_ground_content = false,
392 groups = {tree=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
393 sounds = default.node_sound_wood_defaults(),
395 on_place = minetest.rotate_node
398 minetest.register_node("default:wood", {
399 description = "Wooden Planks",
400 tiles = {"default_wood.png"},
401 groups = {choppy=2,oddly_breakable_by_hand=2,flammable=3,wood=1},
402 sounds = default.node_sound_wood_defaults(),
405 minetest.register_node("default:sapling", {
406 description = "Sapling",
407 drawtype = "plantlike",
409 tiles = {"default_sapling.png"},
410 inventory_image = "default_sapling.png",
411 wield_image = "default_sapling.png",
413 sunlight_propagates = true,
415 is_ground_content = true,
418 fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
420 groups = {snappy=2,dig_immediate=3,flammable=2,attached_node=1,sapling=1},
421 sounds = default.node_sound_leaves_defaults(),
424 minetest.register_node("default:leaves", {
425 description = "Leaves",
426 drawtype = "allfaces_optional",
429 tiles = {"default_leaves.png"},
431 is_ground_content = false,
432 groups = {snappy=3, leafdecay=3, flammable=2, leaves=1},
437 -- player will get sapling with 1/20 chance
438 items = {'default:sapling'},
442 -- player will get leaves only if he get no saplings,
443 -- this is because max_items is 1
444 items = {'default:leaves'},
448 sounds = default.node_sound_leaves_defaults(),
450 after_place_node = default.after_place_leaves,
453 minetest.register_node("default:apple", {
454 description = "Apple",
455 drawtype = "plantlike",
457 tiles = {"default_apple.png"},
458 inventory_image = "default_apple.png",
460 sunlight_propagates = true,
462 is_ground_content = true,
465 fixed = {-0.2, -0.5, -0.2, 0.2, 0, 0.2}
467 groups = {fleshy=3,dig_immediate=3,flammable=2,leafdecay=3,leafdecay_drop=1},
468 on_use = minetest.item_eat(2),
469 sounds = default.node_sound_leaves_defaults(),
471 after_place_node = function(pos, placer, itemstack)
472 if placer:is_player() then
473 minetest.set_node(pos, {name="default:apple", param2=1})
480 minetest.register_node("default:jungletree", {
481 description = "Jungle Tree",
482 tiles = {"default_jungletree_top.png", "default_jungletree_top.png", "default_jungletree.png"},
483 paramtype2 = "facedir",
484 is_ground_content = false,
485 groups = {tree=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
486 sounds = default.node_sound_wood_defaults(),
488 on_place = minetest.rotate_node
491 minetest.register_node("default:junglewood", {
492 description = "Junglewood Planks",
493 tiles = {"default_junglewood.png"},
494 groups = {choppy=2,oddly_breakable_by_hand=2,flammable=3,wood=1},
495 sounds = default.node_sound_wood_defaults(),
498 minetest.register_node("default:jungleleaves", {
499 description = "Jungle Leaves",
500 drawtype = "allfaces_optional",
503 tiles = {"default_jungleleaves.png"},
505 is_ground_content = false,
506 groups = {snappy=3, leafdecay=3, flammable=2, leaves=1},
511 -- player will get sapling with 1/20 chance
512 items = {'default:junglesapling'},
516 -- player will get leaves only if he get no saplings,
517 -- this is because max_items is 1
518 items = {'default:jungleleaves'},
522 sounds = default.node_sound_leaves_defaults(),
524 after_place_node = default.after_place_leaves,
527 minetest.register_node("default:junglesapling", {
528 description = "Jungle Sapling",
529 drawtype = "plantlike",
531 tiles = {"default_junglesapling.png"},
532 inventory_image = "default_junglesapling.png",
533 wield_image = "default_junglesapling.png",
535 sunlight_propagates = true,
539 fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
541 groups = {snappy=2,dig_immediate=3,flammable=2,attached_node=1,sapling=1},
542 sounds = default.node_sound_leaves_defaults(),
547 minetest.register_node("default:pinetree", {
548 description = "Pine Tree",
549 tiles = {"default_pinetree_top.png", "default_pinetree_top.png", "default_pinetree.png"},
550 paramtype2 = "facedir",
551 is_ground_content = false,
552 groups = {tree=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
553 sounds = default.node_sound_wood_defaults(),
555 on_place = minetest.rotate_node
558 minetest.register_node("default:pinewood", {
559 description = "Pinewood Planks",
560 tiles = {"default_pinewood.png"},
561 groups = {choppy=2,oddly_breakable_by_hand=2,flammable=3,wood=1},
562 sounds = default.node_sound_wood_defaults(),
565 minetest.register_node("default:pine_needles",{
566 description = "Pine Needles",
567 drawtype = "allfaces_optional",
569 tiles = {"default_pine_needles.png"},
572 is_ground_content = false,
573 groups = {snappy=3, leafdecay=3, flammable=2, leaves=1},
578 -- player will get sapling with 1/20 chance
579 items = {"default:pine_sapling"},
583 -- player will get leaves only if he get no saplings,
584 -- this is because max_items is 1
585 items = {"default:pine_needles"},
589 sounds = default.node_sound_leaves_defaults(),
591 after_place_node = default.after_place_leaves,
594 minetest.register_node("default:pine_sapling", {
595 description = "Pine Sapling",
596 drawtype = "plantlike",
598 tiles = {"default_pine_sapling.png"},
599 inventory_image = "default_pine_sapling.png",
600 wield_image = "default_pine_sapling.png",
603 is_ground_content = true,
606 fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
608 groups = {snappy=2,dig_immediate=3,flammable=2,attached_node=1,sapling=1},
609 sounds = default.node_sound_leaves_defaults(),
616 minetest.register_node("default:stone_with_coal", {
617 description = "Coal Ore",
618 tiles = {"default_stone.png^default_mineral_coal.png"},
619 is_ground_content = true,
621 drop = 'default:coal_lump',
622 sounds = default.node_sound_stone_defaults(),
625 minetest.register_node("default:coalblock", {
626 description = "Coal Block",
627 tiles = {"default_coal_block.png"},
628 is_ground_content = true,
630 sounds = default.node_sound_stone_defaults(),
635 minetest.register_node("default:stone_with_iron", {
636 description = "Iron Ore",
637 tiles = {"default_stone.png^default_mineral_iron.png"},
638 is_ground_content = true,
640 drop = 'default:iron_lump',
641 sounds = default.node_sound_stone_defaults(),
644 minetest.register_node("default:steelblock", {
645 description = "Steel Block",
646 tiles = {"default_steel_block.png"},
647 is_ground_content = true,
648 groups = {cracky=1,level=2},
649 sounds = default.node_sound_stone_defaults(),
654 minetest.register_node("default:stone_with_copper", {
655 description = "Copper Ore",
656 tiles = {"default_stone.png^default_mineral_copper.png"},
657 is_ground_content = true,
659 drop = 'default:copper_lump',
660 sounds = default.node_sound_stone_defaults(),
663 minetest.register_node("default:copperblock", {
664 description = "Copper Block",
665 tiles = {"default_copper_block.png"},
666 is_ground_content = true,
667 groups = {cracky=1,level=2},
668 sounds = default.node_sound_stone_defaults(),
671 minetest.register_node("default:bronzeblock", {
672 description = "Bronze Block",
673 tiles = {"default_bronze_block.png"},
674 is_ground_content = true,
675 groups = {cracky=1,level=2},
676 sounds = default.node_sound_stone_defaults(),
681 minetest.register_node("default:stone_with_mese", {
682 description = "Mese Ore",
683 tiles = {"default_stone.png^default_mineral_mese.png"},
685 is_ground_content = true,
686 groups = {cracky = 1},
687 drop = "default:mese_crystal",
688 sounds = default.node_sound_stone_defaults(),
692 minetest.register_node("default:mese", {
693 description = "Mese Block",
694 tiles = {"default_mese_block.png"},
696 is_ground_content = true,
697 groups = {cracky = 1, level = 2},
698 sounds = default.node_sound_stone_defaults(),
705 minetest.register_node("default:stone_with_gold", {
706 description = "Gold Ore",
707 tiles = {"default_stone.png^default_mineral_gold.png"},
708 is_ground_content = true,
710 drop = "default:gold_lump",
711 sounds = default.node_sound_stone_defaults(),
714 minetest.register_node("default:goldblock", {
715 description = "Gold Block",
716 tiles = {"default_gold_block.png"},
717 is_ground_content = true,
719 sounds = default.node_sound_stone_defaults(),
724 minetest.register_node("default:stone_with_diamond", {
725 description = "Diamond Ore",
726 tiles = {"default_stone.png^default_mineral_diamond.png"},
727 is_ground_content = true,
729 drop = "default:diamond",
730 sounds = default.node_sound_stone_defaults(),
733 minetest.register_node("default:diamondblock", {
734 description = "Diamond Block",
735 tiles = {"default_diamond_block.png"},
736 is_ground_content = true,
737 groups = {cracky=1,level=3},
738 sounds = default.node_sound_stone_defaults(),
742 -- Plantlife (non-cubic)
745 minetest.register_node("default:cactus", {
746 description = "Cactus",
747 tiles = {"default_cactus_top.png", "default_cactus_top.png", "default_cactus_side.png"},
748 paramtype2 = "facedir",
749 is_ground_content = true,
750 groups = {snappy=1,choppy=3,flammable=2},
751 sounds = default.node_sound_wood_defaults(),
752 on_place = minetest.rotate_node,
754 after_dig_node = function(pos, node, metadata, digger)
755 default.dig_up(pos, node, digger)
759 minetest.register_node("default:papyrus", {
760 description = "Papyrus",
761 drawtype = "plantlike",
762 tiles = {"default_papyrus.png"},
763 inventory_image = "default_papyrus.png",
764 wield_image = "default_papyrus.png",
766 sunlight_propagates = true,
768 is_ground_content = true,
771 fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3}
773 groups = {snappy=3,flammable=2},
774 sounds = default.node_sound_leaves_defaults(),
776 after_dig_node = function(pos, node, metadata, digger)
777 default.dig_up(pos, node, digger)
781 minetest.register_node("default:dry_shrub", {
782 description = "Dry Shrub",
783 drawtype = "plantlike",
786 tiles = {"default_dry_shrub.png"},
787 inventory_image = "default_dry_shrub.png",
788 wield_image = "default_dry_shrub.png",
790 sunlight_propagates = true,
792 is_ground_content = true,
794 groups = {snappy=3,flammable=3,attached_node=1},
795 sounds = default.node_sound_leaves_defaults(),
798 fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
802 minetest.register_node("default:junglegrass", {
803 description = "Jungle Grass",
804 drawtype = "plantlike",
807 tiles = {"default_junglegrass.png"},
808 inventory_image = "default_junglegrass.png",
809 wield_image = "default_junglegrass.png",
811 sunlight_propagates = true,
814 is_ground_content = true,
815 groups = {snappy=3,flammable=2,flora=1,attached_node=1},
816 sounds = default.node_sound_leaves_defaults(),
819 fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
823 minetest.register_node("default:grass_1", {
824 description = "Grass",
825 drawtype = "plantlike",
827 tiles = {"default_grass_1.png"},
828 -- Use texture of a taller grass stage in inventory
829 inventory_image = "default_grass_3.png",
830 wield_image = "default_grass_3.png",
832 sunlight_propagates = true,
834 is_ground_content = true,
836 groups = {snappy=3,flammable=3,flora=1,attached_node=1},
837 sounds = default.node_sound_leaves_defaults(),
840 fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
843 on_place = function(itemstack, placer, pointed_thing)
844 -- place a random grass node
845 local stack = ItemStack("default:grass_"..math.random(1,5))
846 local ret = minetest.item_place(stack, placer, pointed_thing)
847 return ItemStack("default:grass_1 "..itemstack:get_count()-(1-ret:get_count()))
852 minetest.register_node("default:grass_"..i, {
853 description = "Grass",
854 drawtype = "plantlike",
856 tiles = {"default_grass_"..i..".png"},
857 inventory_image = "default_grass_"..i..".png",
858 wield_image = "default_grass_"..i..".png",
860 sunlight_propagates = true,
863 is_ground_content = true,
864 drop = "default:grass_1",
865 groups = {snappy=3,flammable=3,flora=1,attached_node=1,not_in_creative_inventory=1},
866 sounds = default.node_sound_leaves_defaults(),
869 fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
878 minetest.register_node("default:water_source", {
879 description = "Water Source",
880 inventory_image = minetest.inventorycube("default_water.png"),
884 name = "default_water_source_animated.png",
886 type = "vertical_frames",
894 -- New-style water source material (mostly unused)
896 name = "default_water_source_animated.png",
898 type = "vertical_frames",
903 backface_culling = false,
912 is_ground_content = false,
915 liquidtype = "source",
916 liquid_alternative_flowing = "default:water_flowing",
917 liquid_alternative_source = "default:water_source",
918 liquid_viscosity = 1,
919 post_effect_color = {a=120, r=30, g=60, b=90},
920 groups = {water=3, liquid=3, puts_out_fire=1},
923 minetest.register_node("default:water_flowing", {
924 description = "Flowing Water",
925 inventory_image = minetest.inventorycube("default_water.png"),
926 drawtype = "flowingliquid",
927 tiles = {"default_water.png"},
930 name = "default_water_flowing_animated.png",
931 backface_culling = false,
933 type = "vertical_frames",
940 name = "default_water_flowing_animated.png",
941 backface_culling = true,
943 type = "vertical_frames",
952 paramtype2 = "flowingliquid",
957 is_ground_content = false,
960 liquidtype = "flowing",
961 liquid_alternative_flowing = "default:water_flowing",
962 liquid_alternative_source = "default:water_source",
963 liquid_viscosity = 1,
964 post_effect_color = {a=120, r=30, g=60, b=90},
965 groups = {water=3, liquid=3, puts_out_fire=1, not_in_creative_inventory=1},
969 minetest.register_node("default:river_water_source", {
970 description = "River Water Source",
971 inventory_image = minetest.inventorycube("default_river_water.png"),
975 name = "default_river_water_source_animated.png",
977 type = "vertical_frames",
986 name = "default_river_water_source_animated.png",
988 type = "vertical_frames",
993 backface_culling = false,
1001 buildable_to = true,
1002 is_ground_content = false,
1005 liquidtype = "source",
1006 liquid_alternative_flowing = "default:river_water_flowing",
1007 liquid_alternative_source = "default:river_water_source",
1008 liquid_viscosity = 1,
1009 liquid_renewable = false,
1011 post_effect_color = {a=120, r=30, g=76, b=90},
1012 groups = {water=3, liquid=3, puts_out_fire=1},
1015 minetest.register_node("default:river_water_flowing", {
1016 description = "Flowing River Water",
1017 inventory_image = minetest.inventorycube("default_river_water.png"),
1018 drawtype = "flowingliquid",
1019 tiles = {"default_river_water.png"},
1022 name = "default_river_water_flowing_animated.png",
1023 backface_culling = false,
1025 type = "vertical_frames",
1032 name = "default_river_water_flowing_animated.png",
1033 backface_culling = true,
1035 type = "vertical_frames",
1043 paramtype = "light",
1044 paramtype2 = "flowingliquid",
1048 buildable_to = true,
1049 is_ground_content = false,
1052 liquidtype = "flowing",
1053 liquid_alternative_flowing = "default:river_water_flowing",
1054 liquid_alternative_source = "default:river_water_source",
1055 liquid_viscosity = 1,
1056 liquid_renewable = false,
1058 post_effect_color = {a=120, r=30, g=76, b=90},
1059 groups = {water=3, liquid=3, puts_out_fire=1, not_in_creative_inventory=1},
1064 minetest.register_node("default:lava_source", {
1065 description = "Lava Source",
1066 inventory_image = minetest.inventorycube("default_lava.png"),
1067 drawtype = "liquid",
1070 name = "default_lava_source_animated.png",
1072 type = "vertical_frames",
1080 -- New-style lava source material (mostly unused)
1082 name = "default_lava_source_animated.png",
1084 type = "vertical_frames",
1089 backface_culling = false,
1092 paramtype = "light",
1093 light_source = default.LIGHT_MAX - 1,
1097 buildable_to = true,
1098 is_ground_content = false,
1101 liquidtype = "source",
1102 liquid_alternative_flowing = "default:lava_flowing",
1103 liquid_alternative_source = "default:lava_source",
1104 liquid_viscosity = 7,
1105 liquid_renewable = false,
1106 damage_per_second = 4 * 2,
1107 post_effect_color = {a=192, r=255, g=64, b=0},
1108 groups = {lava=3, liquid=2, hot=3, igniter=1},
1111 minetest.register_node("default:lava_flowing", {
1112 description = "Flowing Lava",
1113 inventory_image = minetest.inventorycube("default_lava.png"),
1114 drawtype = "flowingliquid",
1115 tiles = {"default_lava.png"},
1118 name = "default_lava_flowing_animated.png",
1119 backface_culling = false,
1121 type = "vertical_frames",
1128 name = "default_lava_flowing_animated.png",
1129 backface_culling = true,
1131 type = "vertical_frames",
1138 paramtype = "light",
1139 paramtype2 = "flowingliquid",
1140 light_source = default.LIGHT_MAX - 1,
1144 buildable_to = true,
1145 is_ground_content = false,
1148 liquidtype = "flowing",
1149 liquid_alternative_flowing = "default:lava_flowing",
1150 liquid_alternative_source = "default:lava_source",
1151 liquid_viscosity = 7,
1152 liquid_renewable = false,
1153 damage_per_second = 4 * 2,
1154 post_effect_color = {a=192, r=255, g=64, b=0},
1155 groups = {lava=3, liquid=2, hot=3, igniter=1, not_in_creative_inventory=1},
1159 -- Tools / "Advanced" crafting / Non-"natural"
1162 minetest.register_node("default:torch", {
1163 description = "Torch",
1164 drawtype = "torchlike",
1167 name = "default_torch_on_floor_animated.png",
1169 type = "vertical_frames",
1176 name="default_torch_on_ceiling_animated.png",
1178 type = "vertical_frames",
1185 name="default_torch_animated.png",
1187 type = "vertical_frames",
1194 inventory_image = "default_torch_on_floor.png",
1195 wield_image = "default_torch_on_floor.png",
1196 paramtype = "light",
1197 paramtype2 = "wallmounted",
1198 sunlight_propagates = true,
1199 is_ground_content = false,
1201 light_source = default.LIGHT_MAX - 1,
1203 type = "wallmounted",
1204 wall_top = {-0.1, 0.5-0.6, -0.1, 0.1, 0.5, 0.1},
1205 wall_bottom = {-0.1, -0.5, -0.1, 0.1, -0.5+0.6, 0.1},
1206 wall_side = {-0.5, -0.3, -0.1, -0.5+0.3, 0.3, 0.1},
1208 groups = {choppy=2,dig_immediate=3,flammable=1,attached_node=1},
1209 legacy_wallmounted = true,
1210 sounds = default.node_sound_defaults(),
1215 local chest_formspec =
1218 default.gui_bg_img..
1220 "list[current_name;main;0,0.3;8,4;]"..
1221 "list[current_player;main;0,4.85;8,1;]"..
1222 "list[current_player;main;0,6.08;8,3;8]"..
1223 default.get_hotbar_bg(0,4.85)
1225 local function get_locked_chest_formspec(pos)
1226 local spos = pos.x .. "," .. pos.y .. "," ..pos.z
1230 default.gui_bg_img..
1232 "list[nodemeta:".. spos .. ";main;0,0.3;8,4;]"..
1233 "list[current_player;main;0,4.85;8,1;]"..
1234 "list[current_player;main;0,6.08;8,3;8]"..
1235 default.get_hotbar_bg(0,4.85)
1239 local function has_locked_chest_privilege(meta, player)
1240 if player:get_player_name() ~= meta:get_string("owner") then
1246 minetest.register_node("default:chest", {
1247 description = "Chest",
1248 tiles = {"default_chest_top.png", "default_chest_top.png", "default_chest_side.png",
1249 "default_chest_side.png", "default_chest_side.png", "default_chest_front.png"},
1250 paramtype2 = "facedir",
1251 groups = {choppy=2,oddly_breakable_by_hand=2},
1252 legacy_facedir_simple = true,
1253 is_ground_content = false,
1254 sounds = default.node_sound_wood_defaults(),
1256 on_construct = function(pos)
1257 local meta = minetest.get_meta(pos)
1258 meta:set_string("formspec", chest_formspec)
1259 meta:set_string("infotext", "Chest")
1260 local inv = meta:get_inventory()
1261 inv:set_size("main", 8*4)
1263 can_dig = function(pos,player)
1264 local meta = minetest.get_meta(pos);
1265 local inv = meta:get_inventory()
1266 return inv:is_empty("main")
1268 on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
1269 minetest.log("action", player:get_player_name()..
1270 " moves stuff in chest at "..minetest.pos_to_string(pos))
1272 on_metadata_inventory_put = function(pos, listname, index, stack, player)
1273 minetest.log("action", player:get_player_name()..
1274 " moves stuff to chest at "..minetest.pos_to_string(pos))
1276 on_metadata_inventory_take = function(pos, listname, index, stack, player)
1277 minetest.log("action", player:get_player_name()..
1278 " takes stuff from chest at "..minetest.pos_to_string(pos))
1284 minetest.register_node("default:chest_locked", {
1285 description = "Locked Chest",
1286 tiles = {"default_chest_top.png", "default_chest_top.png", "default_chest_side.png",
1287 "default_chest_side.png", "default_chest_side.png", "default_chest_lock.png"},
1288 paramtype2 = "facedir",
1289 groups = {choppy=2,oddly_breakable_by_hand=2},
1290 legacy_facedir_simple = true,
1291 is_ground_content = false,
1292 sounds = default.node_sound_wood_defaults(),
1294 after_place_node = function(pos, placer)
1295 local meta = minetest.get_meta(pos)
1296 meta:set_string("owner", placer:get_player_name() or "")
1297 meta:set_string("infotext", "Locked Chest (owned by "..
1298 meta:get_string("owner")..")")
1300 on_construct = function(pos)
1301 local meta = minetest.get_meta(pos)
1302 meta:set_string("infotext", "Locked Chest")
1303 meta:set_string("owner", "")
1304 local inv = meta:get_inventory()
1305 inv:set_size("main", 8*4)
1307 can_dig = function(pos,player)
1308 local meta = minetest.get_meta(pos);
1309 local inv = meta:get_inventory()
1310 return inv:is_empty("main") and has_locked_chest_privilege(meta, player)
1312 allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
1313 local meta = minetest.get_meta(pos)
1314 if not has_locked_chest_privilege(meta, player) then
1319 allow_metadata_inventory_put = function(pos, listname, index, stack, player)
1320 local meta = minetest.get_meta(pos)
1321 if not has_locked_chest_privilege(meta, player) then
1324 return stack:get_count()
1326 allow_metadata_inventory_take = function(pos, listname, index, stack, player)
1327 local meta = minetest.get_meta(pos)
1328 if not has_locked_chest_privilege(meta, player) then
1331 return stack:get_count()
1333 on_metadata_inventory_put = function(pos, listname, index, stack, player)
1334 minetest.log("action", player:get_player_name()..
1335 " moves stuff to locked chest at "..minetest.pos_to_string(pos))
1337 on_metadata_inventory_take = function(pos, listname, index, stack, player)
1338 minetest.log("action", player:get_player_name()..
1339 " takes stuff from locked chest at "..minetest.pos_to_string(pos))
1341 on_rightclick = function(pos, node, clicker)
1342 local meta = minetest.get_meta(pos)
1343 if has_locked_chest_privilege(meta, clicker) then
1344 minetest.show_formspec(
1345 clicker:get_player_name(),
1346 "default:chest_locked",
1347 get_locked_chest_formspec(pos)
1351 on_blast = function() end,
1356 local bookshelf_formspec =
1359 default.gui_bg_img..
1361 "list[context;books;0,0.3;8,2;]"..
1362 "list[current_player;main;0,2.85;8,1;]"..
1363 "list[current_player;main;0,4.08;8,3;8]"..
1364 default.get_hotbar_bg(0,2.85)
1366 minetest.register_node("default:bookshelf", {
1367 description = "Bookshelf",
1368 tiles = {"default_wood.png", "default_wood.png", "default_bookshelf.png"},
1369 is_ground_content = false,
1370 groups = {choppy=3,oddly_breakable_by_hand=2,flammable=3},
1371 sounds = default.node_sound_wood_defaults(),
1373 on_construct = function(pos)
1374 local meta = minetest.get_meta(pos)
1375 meta:set_string("formspec", bookshelf_formspec)
1376 local inv = meta:get_inventory()
1377 inv:set_size("books", 8*2)
1379 can_dig = function(pos,player)
1380 local meta = minetest.get_meta(pos);
1381 local inv = meta:get_inventory()
1382 return inv:is_empty("books")
1385 allow_metadata_inventory_put = function(pos, listname, index, stack, player)
1386 local meta = minetest.get_meta(pos)
1387 local inv = meta:get_inventory()
1388 local to_stack = inv:get_stack(listname, index)
1389 if listname == "books" then
1390 if minetest.get_item_group(stack:get_name(), "book") ~= 0
1391 and to_stack:is_empty() then
1399 allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
1400 local meta = minetest.get_meta(pos)
1401 local inv = meta:get_inventory()
1402 local stack = inv:get_stack(from_list, from_index)
1403 local to_stack = inv:get_stack(to_list, to_index)
1404 if to_list == "books" then
1405 if stack:get_name() == "default:book" and to_stack:is_empty() then
1413 on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
1414 minetest.log("action", player:get_player_name()..
1415 " moves stuff in bookshelf at "..minetest.pos_to_string(pos))
1417 on_metadata_inventory_put = function(pos, listname, index, stack, player)
1418 minetest.log("action", player:get_player_name()..
1419 " moves stuff to bookshelf at "..minetest.pos_to_string(pos))
1421 on_metadata_inventory_take = function(pos, listname, index, stack, player)
1422 minetest.log("action", player:get_player_name()..
1423 " takes stuff from bookshelf at "..minetest.pos_to_string(pos))
1429 minetest.register_node("default:sign_wall", {
1430 description = "Sign",
1431 drawtype = "nodebox",
1432 tiles = {"default_sign.png"},
1433 inventory_image = "default_sign_wall.png",
1434 wield_image = "default_sign_wall.png",
1435 paramtype = "light",
1436 paramtype2 = "wallmounted",
1437 sunlight_propagates = true,
1438 is_ground_content = false,
1441 type = "wallmounted",
1442 wall_top = {-0.4375, 0.4375, -0.3125, 0.4375, 0.5, 0.3125},
1443 wall_bottom = {-0.4375, -0.5, -0.3125, 0.4375, -0.4375, 0.3125},
1444 wall_side = {-0.5, -0.3125, -0.4375, -0.4375, 0.3125, 0.4375},
1446 groups = {choppy=2,dig_immediate=2,attached_node=1},
1447 legacy_wallmounted = true,
1448 sounds = default.node_sound_defaults(),
1450 on_construct = function(pos)
1451 --local n = minetest.get_node(pos)
1452 local meta = minetest.get_meta(pos)
1453 meta:set_string("formspec", "field[text;;${text}]")
1454 meta:set_string("infotext", "\"\"")
1456 on_receive_fields = function(pos, formname, fields, sender)
1457 --print("Sign at "..minetest.pos_to_string(pos).." got "..dump(fields))
1458 if minetest.is_protected(pos, sender:get_player_name()) then
1459 minetest.record_protection_violation(pos, sender:get_player_name())
1462 local meta = minetest.get_meta(pos)
1463 if not fields.text then return end
1464 minetest.log("action", (sender:get_player_name() or "").." wrote \""..fields.text..
1465 "\" to sign at "..minetest.pos_to_string(pos))
1466 meta:set_string("text", fields.text)
1467 meta:set_string("infotext", '"'..fields.text..'"')
1471 minetest.register_node("default:ladder", {
1472 description = "Ladder",
1473 drawtype = "signlike",
1474 tiles = {"default_ladder.png"},
1475 inventory_image = "default_ladder.png",
1476 wield_image = "default_ladder.png",
1477 paramtype = "light",
1478 paramtype2 = "wallmounted",
1479 sunlight_propagates = true,
1482 is_ground_content = false,
1484 type = "wallmounted",
1485 --wall_top = = <default>
1486 --wall_bottom = = <default>
1487 --wall_side = = <default>
1489 groups = {choppy=2,oddly_breakable_by_hand=3,flammable=2},
1490 legacy_wallmounted = true,
1491 sounds = default.node_sound_wood_defaults(),
1494 local fence_texture = "default_fence_overlay.png^default_wood.png^default_fence_overlay.png^[makealpha:255,126,126"
1495 minetest.register_node("default:fence_wood", {
1496 description = "Wooden Fence",
1497 drawtype = "fencelike",
1498 tiles = {"default_wood.png"},
1499 inventory_image = fence_texture,
1500 wield_image = fence_texture,
1501 paramtype = "light",
1502 sunlight_propagates = true,
1503 is_ground_content = false,
1506 fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7},
1508 groups = {choppy=2,oddly_breakable_by_hand=2,flammable=2},
1509 sounds = default.node_sound_wood_defaults(),
1514 minetest.register_node("default:glass", {
1515 description = "Glass",
1516 drawtype = "glasslike_framed_optional",
1517 tiles = {"default_glass.png", "default_glass_detail.png"},
1518 inventory_image = minetest.inventorycube("default_glass.png"),
1519 paramtype = "light",
1520 sunlight_propagates = true,
1521 is_ground_content = false,
1522 groups = {cracky=3,oddly_breakable_by_hand=3},
1523 sounds = default.node_sound_glass_defaults(),
1526 minetest.register_node("default:obsidian_glass", {
1527 description = "Obsidian Glass",
1528 drawtype = "glasslike",
1529 tiles = {"default_obsidian_glass.png"},
1530 paramtype = "light",
1531 is_ground_content = false,
1532 sunlight_propagates = true,
1533 sounds = default.node_sound_glass_defaults(),
1534 groups = {cracky=3,oddly_breakable_by_hand=3},
1539 minetest.register_node("default:rail", {
1540 description = "Rail",
1541 drawtype = "raillike",
1542 tiles = {"default_rail.png", "default_rail_curved.png", "default_rail_t_junction.png", "default_rail_crossing.png"},
1543 inventory_image = "default_rail.png",
1544 wield_image = "default_rail.png",
1545 paramtype = "light",
1546 sunlight_propagates = true,
1548 is_ground_content = false,
1551 -- but how to specify the dimensions for curved and sideways rails?
1552 fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
1554 groups = {bendy=2,dig_immediate=2,attached_node=1,connect_to_raillike=minetest.raillike_group("rail")},
1559 minetest.register_node("default:brick", {
1560 description = "Brick Block",
1561 tiles = {"default_brick.png"},
1562 is_ground_content = false,
1563 groups = {cracky=3},
1564 sounds = default.node_sound_stone_defaults(),
1568 minetest.register_node("default:meselamp", {
1569 description = "Mese Lamp",
1570 drawtype = "glasslike",
1571 tiles = {"default_meselamp.png"},
1572 paramtype = "light",
1573 sunlight_propagates = true,
1574 is_ground_content = false,
1575 groups = {cracky = 3, oddly_breakable_by_hand = 3},
1576 sounds = default.node_sound_glass_defaults(),
1577 light_source = default.LIGHT_MAX,
1584 minetest.register_node("default:cloud", {
1585 description = "Cloud",
1586 tiles = {"default_cloud.png"},
1587 sounds = default.node_sound_defaults(),
1588 groups = {not_in_creative_inventory=1},
1591 minetest.register_node("default:nyancat", {
1592 description = "Nyan Cat",
1593 tiles = {"default_nc_side.png", "default_nc_side.png", "default_nc_side.png",
1594 "default_nc_side.png", "default_nc_back.png", "default_nc_front.png"},
1595 paramtype2 = "facedir",
1596 groups = {cracky=2},
1597 is_ground_content = false,
1598 legacy_facedir_simple = true,
1599 sounds = default.node_sound_defaults(),
1602 minetest.register_node("default:nyancat_rainbow", {
1603 description = "Nyan Cat Rainbow",
1605 "default_nc_rb.png^[transformR90", "default_nc_rb.png^[transformR90",
1606 "default_nc_rb.png", "default_nc_rb.png"
1608 paramtype2 = "facedir",
1609 groups = {cracky=2},
1610 is_ground_content = false,
1611 sounds = default.node_sound_defaults(),