123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441 |
- --Thanks for all the things in this file, and the related textures goes to catninja!--
- -------------
- --- Items ---
- -------------
- -- TREES
- -- Vine tree
- minetest.register_node("lottblocks:tree_vine", {
- description = "Tree With Vines",
- tiles = {"lottblocks_tree_vine_top.png", "lottblocks_tree_vine_top.png", "lottblocks_tree_vine.png", "lottblocks_tree_vine.png", "lottblocks_tree_vine.png", "lottblocks_tree_vine.png"},
- paramtype2 = "facedir",
- is_ground_content = false,
- sounds = default.node_sound_wood_defaults(),
- groups = {choppy=2,snappy=2},
- })
- stairs.register_stair_and_slab("tree_vine", "lottblocks:tree_vine",
- {choppy=2,snappy=2},
- {"lottblocks_tree_vine.png"},
- "Tree Vine Stair",
- "Tree Vine Slab",
- default.node_sound_wood_defaults()
- )
- -- Mossy tree
- minetest.register_node("lottblocks:tree_mossy", {
- description = "Tree With Moss",
- tiles = {"lottblocks_tree_mossy_top.png", "lottblocks_tree_mossy_top.png", "lottblocks_tree_mossy.png", "lottblocks_tree_mossy.png", "lottblocks_tree_mossy.png", "lottblocks_tree_mossy.png"},
- paramtype2 = "facedir",
- is_ground_content = false,
- sounds = default.node_sound_wood_defaults(),
- groups = {choppy=2},
- })
- stairs.register_stair_and_slab("tree_mossy", "lottblocks:tree_mossy",
- {choppy=2},
- {"lottblocks_tree_mossy.png"},
- "Mossy Tree Stair",
- "Mossy Tree Slab",
- default.node_sound_wood_defaults()
- )
- -- Leafroof dark
- minetest.register_node("lottblocks:leafroof_dark", {
- description = "Dark Leaf Roof",
- tiles = {"lottblocks_leafroof.png"},
- paramtype = "light",
- drawtype = "allfaces_optional",
- is_ground_content = false,
- sounds = default.node_sound_leaves_defaults(),
- groups = {snappy=2,oddly_breakable_by_hand=2,leaves=1},
- })
- stairs.register_stair_and_slab("leafroof_dark", "lottblocks:leafroof_dark",
- {oddly_breakable_by_hand=2,leaves=1},
- {"lottblocks_leafroof.png"},
- "Dark Leaf Roof Stair",
- "Dark Leaf Root Slab",
- default.node_sound_leaves_defaults()
- )
- -- MALLORN
- -- Leafroof mallorn
- minetest.register_node("lottblocks:leafroof_mallorn", {
- description = "Mallorn Leaf Roof",
- tiles = {"lottblocks_mallornroof.png"},
- paramtype = "light",
- drawtype = "allfaces_optional",
- is_ground_content = false,
- sounds = default.node_sound_leaves_defaults(),
- groups = {oddly_breakable_by_hand=2,leaves=1},
- })
- stairs.register_stair_and_slab("leafroof_mallorn", "lottblocks:leafroof_mallorn",
- {oddly_breakable_by_hand=2,leaves=1},
- {"lottblocks_mallornroof.png"},
- "Mallorn Leaf Roof Stair",
- "Mallorn Leaf Roof Slab",
- default.node_sound_leaves_defaults()
- )
- -- mallorn pillar
- minetest.register_node("lottblocks:mallorn_pillar", {
- description = "Mallorn Pillar",
- tiles = {"lottblocks_mallorn_pillar.png"},
- paramtype = "light",
- paramtype2 = "facedir",
- is_ground_content = false,
- sounds = default.node_sound_wood_defaults(),
- groups = {snappy=2,choppy=2},
- })
- stairs.register_stair_and_slab("mallorn_pillar", "lottblocks:mallorn_pillar",
- {snappy=2,choppy=2},
- {"lottblocks_mallorn_pillar.png"},
- "Mallorn Pillar Stair",
- "Mallorn Pillar Slab",
- default.node_sound_wood_defaults()
- )
- -- mallorn White
- minetest.register_node("lottblocks:mallorn_white", {
- description = "White Mallorn",
- tiles = {"lottblocks_mallorn_white.png"},
- paramtype = "light",
- paramtype2 = "facedir",
- is_ground_content = false,
- sounds = default.node_sound_wood_defaults(),
- groups = {snappy=2,choppy=2},
- })
- stairs.register_stair_and_slab("mallorn_white", "lottblocks:mallorn_white",
- {snappy=2,choppy=2},
- {"lottblocks_mallorn_white.png"},
- "White Mallorn Stair",
- "White Mallorn Slab",
- default.node_sound_wood_defaults()
- )
- -- DWARFSTONE
- -- white
- minetest.register_node("lottblocks:dwarfstone_white", {
- description = "White Dwarf Stone",
- tiles = {"lottblocks_dwarfstone_white_top.png", "lottblocks_dwarfstone_white_top.png", "lottblocks_dwarfstone_white_side.png", "lottblocks_dwarfstone_white_side.png", "lottblocks_dwarfstone_white_side.png", "lottblocks_dwarfstone_white_side.png"},
- paramtype2 = "facedir",
- is_ground_content = false,
- sounds = default.node_sound_stone_defaults(),
- groups = {cracky=3},
- })
- stairs.register_stair_and_slab("dwarfstone_white", "lottblocks:dwarfstone_white",
- {cracky=2},
- {"lottblocks_dwarfstone_white_top.png"},
- "White Dwarf Stone Stair",
- "White Dwarf Stone Slab",
- default.node_sound_stone_defaults()
- )
- -- black
- minetest.register_node("lottblocks:dwarfstone_black", {
- description = "Black Dwarf Stone",
- tiles = {"lottblocks_dwarfstone_black_top.png", "lottblocks_dwarfstone_black_top.png", "lottblocks_dwarfstone_black_side.png", "lottblocks_dwarfstone_black_side.png", "lottblocks_dwarfstone_black_side.png", "lottblocks_dwarfstone_black_side.png"},
- paramtype2 = "facedir",
- is_ground_content = false,
- sounds = default.node_sound_stone_defaults(),
- groups = {cracky=3},
- })
- stairs.register_stair_and_slab("dwarfstone_black", "lottblocks:dwarfstone_black",
- {cracky=2},
- {"lottblocks_dwarfstone_black_top.png"},
- "Black Dwarf Stone Stair",
- "Black Dwarf Stone Slab",
- default.node_sound_stone_defaults()
- )
- -- stripe
- minetest.register_node("lottblocks:dwarfstone_stripe", {
- description = "Stripe Dwarf Stone",
- tiles = {"lottblocks_dwarfstone_stripe_top.png", "lottblocks_dwarfstone_stripe_bottom.png", "lottblocks_dwarfstone_stripe_l.png", "lottblocks_dwarfstone_stripe_l.png", "lottblocks_dwarfstone_stripe_r.png", "lottblocks_dwarfstone_stripe_r.png"},
- paramtype2 = "facedir",
- is_ground_content = false,
- sounds = default.node_sound_stone_defaults(),
- groups = {cracky=3},
- })
- --------------
- --- Crafts ---
- --------------
- --TREES
- -- vine
- minetest.register_craft({
- output = 'lottblocks:tree_vine 4',
- recipe = {
- {'default:tree', 'default:grass_1'},
- {'default:grass_1', 'default:tree'},
- }
- })
- -- mossy tree
- minetest.register_craft({
- output = 'lottblocks:tree_mossy 4',
- recipe = {
- {'default:grass_1', 'default:grass_1', 'default:grass_1'},
- {'default:grass_1', 'default:tree', 'default:grass_1'},
- {'default:grass_1', 'default:grass_1', 'default:grass_1'},
- }
- })
- -- leafroof dark
- minetest.register_craft({
- output = 'lottblocks:leafroof_dark',
- recipe = {
- {'default:leaves', 'default:leaves'},
- {'default:leaves', 'default:leaves'},
- }
- })
- -- MALLORN
- -- leafroof mallorn
- minetest.register_craft({
- output = 'lottblocks:leafroof_mallorn',
- recipe = {
- {'lottplants:mallornleaf', 'lottplants:mallornleaf'},
- {'lottplants:mallornleaf', 'lottplants:mallornleaf'},
- }
- })
- -- White mallorn
- minetest.register_craft({
- output = 'lottblocks:mallorn_white',
- recipe = {
- {'dye:white'},
- {'lottplants:mallornwood'},
- }
- })
- -- Mallorn pillar
- minetest.register_craft({
- output = 'lottblocks:mallorn_pillar',
- recipe = {
- {'lottplants:mallorntree', 'default:gold_ingot'},
- {'default:gold_ingot', 'lottplants:mallorntree'},
- }
- })
- -- DWARFSTONE
- -- white
- minetest.register_craft({
- output = 'lottblocks:dwarfstone_white 4',
- recipe = {
- {'default:steel_ingot', 'default:stone', 'default:steel_ingot'},
- {'default:stone', 'default:steel_ingot', 'default:stone'},
- {'default:steel_ingot', 'default:stone', 'default:steel_ingot'},
- }
- })
- -- black
- minetest.register_craft({
- output = 'lottblocks:dwarfstone_black 4',
- recipe = {
- {'default:coal_lump', 'default:stone', 'default:coal_lump'},
- {'default:stone', 'default:coal_lump', 'default:stone'},
- {'default:coal_lump', 'default:stone', 'default:coal_lump'},
- }
- })
- -- stripe
- minetest.register_craft({
- output = 'lottblocks:dwarfstone_stripe 4',
- recipe = {
- {'default:stone', 'default:coal_lump'},
- {'default:stone', 'default:coal_lump'},
- }
- })
- -- Dwarf Tombs, by Amaz.
- minetest.register_node("lottblocks:dwarf_tomb_top", {
- description = "Dwarf Tomb",
- drawtype = "nodebox",
- tiles = {
- "lottblocks_dh_top.png", "default_stone.png",
- "lottblocks_dh_side2.png", "lottblocks_dh_side1.png",
- "lottblocks_dh_back.png", "lottblocks_dh_front.png",
- },
- paramtype = "light",
- groups = {cracky = 1},
- paramtype2 = "facedir",
- node_box = {
- type = "fixed",
- fixed = {
- --{x-, y-, z-, x+, y+, z+}
- {-0.5, -0.5, -0.5, 0.5, -0.375, 0.5}, -- NodeBox1
- {0.4375, -0.375, 0.125, -0.4375, -0.3125, -0.5}, -- NodeBox3
- {0.375, -0.3125, 0.125, -0.375, -0.1875, -0.5}, -- NodeBox4
- {0.3125, -0.1875, 0.125, -0.3125, -0.0625, -0.5}, -- NodeBox5
- {0.125, -0.0625, -0.3125, -0.125, 0.0625, -0.5}, -- NodeBox6
- {0.0625, -0.0625, -0.1875, -0.0625, 0, -0.3125}, -- NodeBox7
- {0.3125, -0.0625, -0.375, -0.3125, 0, -0.5}, -- NodeBox10
- {-0.25, -0.0625, 0, -0.3125, 0, -0.5}, -- NodeBox11
- {0.1875, -0.0625, -0.0625, 0.3125, 0, 0.0625}, -- NodeBox13
- {0.3125, -0.0625, 0.0625, 0.25, 0, -0.5}, -- NodeBox14
- {0.3125, -0.0625, 0.0625, 0.1875, 0, -0.0625}, -- NodeBox16
- {0.4375, -0.375, 0.5, -0.4375, -0.0625, 0.125}, -- NodeBox17
- {0.25, -0.0625, 0.5, -0.25, 0.0625, 0.0625}, -- NodeBox18
- {-0.0625, -0.0625, -0.125, 0.125, 0, 0.125}, -- NodeBox19
- }
- },
- selection_box = {
- type = "fixed",
- fixed = {
- {-0.5, -0.5, -1.5, 0.5, 0.0625, 0.5}
- }
- },
- on_place = function(itemstack, placer, pointed_thing)
- local under = pointed_thing.under
- local pos
- if minetest.registered_items[minetest.get_node(under).name].buildable_to then
- pos = under
- else
- pos = pointed_thing.above
- end
- if minetest.is_protected(pos, placer:get_player_name()) and
- not minetest.check_player_privs(placer, "protection_bypass") then
- minetest.record_protection_violation(pos, placer:get_player_name())
- return itemstack
- end
- local node_def = minetest.registered_nodes[minetest.get_node(pos).name]
- if not node_def or not node_def.buildable_to then
- return itemstack
- end
- local dir = minetest.dir_to_facedir(placer:get_look_dir())
- local botpos = vector.subtract(pos, minetest.facedir_to_dir(dir))
- if minetest.is_protected(botpos, placer:get_player_name()) and
- not minetest.check_player_privs(placer, "protection_bypass") then
- minetest.record_protection_violation(botpos, placer:get_player_name())
- return itemstack
- end
- local botdef = minetest.registered_nodes[minetest.get_node(botpos).name]
- if not botdef or not botdef.buildable_to then
- return itemstack
- end
- minetest.set_node(pos, {name = "lottblocks:dwarf_tomb_top", param2 = dir})
- minetest.set_node(botpos, {name = "lottblocks:dwarf_tomb_bottom", param2 = dir})
- if not minetest.setting_getbool("creative_mode") then
- itemstack:take_item()
- end
- return itemstack
- end,
- on_destruct = function(pos)
- local node = minetest.get_node(pos)
- local dir = minetest.facedir_to_dir(node.param2)
- local other = vector.subtract(pos, dir)
- minetest.remove_node(other)
- end,
- sounds = default.node_sound_stone_defaults(),
- })
- minetest.register_node("lottblocks:dwarf_tomb_bottom", {
- description = "Dwarf Tomb Bottom",
- tiles = {
- "lottblocks_db_top.png", "default_stone.png",
- "lottblocks_db_side2.png", "lottblocks_db_side1.png",
- "lottblocks_db_back.png", "lottblocks_db_front.png",
- },
- pointable = false,
- groups = {not_in_creative_inventory = 1},
- paramtype2 = "facedir",
- drawtype = "nodebox",
- drop = "lottblocks:dwarf_tomb_top",
- paramtype = "light",
- node_box = {
- type = "fixed",
- fixed = {
- {-0.5, -0.5, -0.5, 0.5, -0.375, 0.5}, -- NodeBox1
- {0.4375, -0.375, 0.5, -0.4375, -0.3125, -0.375}, -- NodeBox2
- {0.375, -0.3125, 0.5, -0.375, -0.1875, -0.3125}, -- NodeBox3
- {0.25, -0.1875, 0.5, -0.25, -0.0625, -0.3125}, -- NodeBox5
- {-0.0625, -0.0625, 0.5, 0.0625, 0, 0.375}, -- NodeBox6
- {0.0625, -0.0625, 0.375, -0.0625, 0, -0.1875}, -- NodeBox8
- {0.25, -0.0625, 0.0625, -0.25, 0, -0.1875}, -- NodeBox8
- }
- },
- sounds = default.node_sound_stone_defaults(),
- })
- minetest.register_node("lottblocks:snowycobble", {
- description = "Snowy Cobblestone",
- tiles = {"lottblocks_snowycobble.png"},
- is_ground_content = false,
- groups = {cracky=3},
- })
- minetest.register_node("lottblocks:orc_brick", {
- description = "Orc Brick",
- tiles = {"lottblocks_orc_brick.png"},
- is_ground_content = false,
- groups = {cracky=2},
- })
- stairs.register_stair_and_slab("orc_brick", "lottblocks:orc_brick",
- {cracky=2},
- {"lottblocks_orc_brick.png"},
- "Orc Brick",
- "Orc Brick"
- )
- minetest.register_node("lottblocks:marble_brick", {
- description = "Marble Brick",
- tiles = {"lottblocks_marble_brick.png"},
- is_ground_content = false,
- groups = {cracky=2},
- sounds = default.node_sound_stone_defaults(),
- })
- stairs.register_stair_and_slab("marble_brick", "lottblocks:marble_brick",
- {cracky=2},
- {"lottblocks_marble_brick.png"},
- "Marble Brick",
- "Marble Brick"
- )
- minetest.register_craft({
- output = 'lottblocks:marble_brick 4',
- recipe = {
- {'lottores:marble', 'lottores:marble'},
- {'lottores:marble', 'lottores:marble'},
- }
- })
- minetest.register_craft({
- output = 'lottblocks:orc_brick 4',
- recipe = {
- {'lottmapgen:mordor_stone', 'lottmapgen:mordor_stone'},
- {'lottmapgen:mordor_stone', 'lottmapgen:mordor_stone'},
- }
- })
|