local vert1 = { type = "fixed", fixed = { {-0.5, -0.5, -0.4375, 0.5, 0.5, 0.5}, {0.1875, -0.5, -0.5, 0.5, 0.5, 0.5}, {-0.5, -0.5, -0.5, -0.1875, 0.5, 0.5}, } } local vert2 = { type = "fixed", fixed = { {-0.5, -0.5, -0.375, 0.5, 0.5, 0.5}, {0.1875, -0.5, -0.5, 0.5, 0.5, 0.5}, {-0.5, -0.5, -0.5, -0.1875, 0.5, 0.5}, } } local vert3 = { type = "fixed", fixed = { {-0.5, -0.5, -0.3125, 0.5, 0.5, 0.5}, {0.1875, -0.5, -0.5, 0.5, 0.5, 0.5}, {-0.5, -0.5, -0.5, -0.1875, 0.5, 0.5}, } } local vert4 = { type = "fixed", fixed = { {-0.5, -0.5, -0.25, 0.5, 0.5, 0.5}, {0.1875, -0.5, -0.5, 0.5, 0.5, 0.5}, {-0.5, -0.5, -0.5, -0.1875, 0.5, 0.5}, } } local hori1 = { type = "fixed", fixed = { {-0.5, -0.5, -0.4375, 0.5, 0.5, 0.5}, {-0.5, 0.1875, -0.5, 0.5, 0.5, 0.5}, {-0.5, -0.5, -0.5, 0.5, -0.1875, 0.5}, } } local hori2 = { type = "fixed", fixed = { {-0.5, -0.5, -0.375, 0.5, 0.5, 0.5}, {-0.5, 0.1875, -0.5, 0.5, 0.5, 0.5}, {-0.5, -0.5, -0.5, 0.5, -0.1875, 0.5}, } } local hori3 = { type = "fixed", fixed = { {-0.5, -0.5, -0.3125, 0.5, 0.5, 0.5}, {-0.5, 0.1875, -0.5, 0.5, 0.5, 0.5}, {-0.5, -0.5, -0.5, 0.5, -0.1875, 0.5}, } } local hori4 = { type = "fixed", fixed = { {-0.5, -0.5, -0.25, 0.5, 0.5, 0.5}, {-0.5, 0.1875, -0.5, 0.5, 0.5, 0.5}, {-0.5, -0.5, -0.5, 0.5, -0.1875, 0.5}, } } local cross1 = { type = "fixed", fixed = { {-0.5, -0.5, -0.4375, 0.5, 0.5, 0.5}, {0.1875, -0.5, -0.5, 0.5, -0.1875, 0.5}, {-0.5, -0.5, -0.5, -0.1875, -0.1875, 0.5}, {-0.5, 0.1875, -0.5, -0.1875, 0.5, 0.5}, {0.1875, 0.1875, -0.5, 0.5, 0.5, 0.5}, } } local cross2 = { type = "fixed", fixed = { {-0.5, -0.5, -0.375, 0.5, 0.5, 0.5}, {0.1875, -0.5, -0.5, 0.5, -0.1875, 0.5}, {-0.5, -0.5, -0.5, -0.1875, -0.1875, 0.5}, {-0.5, 0.1875, -0.5, -0.1875, 0.5, 0.5}, {0.1875, 0.1875, -0.5, 0.5, 0.5, 0.5}, } } local cross3 = { type = "fixed", fixed = { {-0.5, -0.5, -0.3125, 0.5, 0.5, 0.5}, {0.1875, -0.5, -0.5, 0.5, -0.1875, 0.5}, {-0.5, -0.5, -0.5, -0.1875, -0.1875, 0.5}, {-0.5, 0.1875, -0.5, -0.1875, 0.5, 0.5}, {0.1875, 0.1875, -0.5, 0.5, 0.5, 0.5}, } } local cross4 = { type = "fixed", fixed = { {-0.5, -0.5, -0.25, 0.5, 0.5, 0.5}, {0.1875, -0.5, -0.5, 0.5, -0.1875, 0.5}, {-0.5, -0.5, -0.5, -0.1875, -0.1875, 0.5}, {-0.5, 0.1875, -0.5, -0.1875, 0.5, 0.5}, {0.1875, 0.1875, -0.5, 0.5, 0.5, 0.5}, } } local chis1 = { type = "fixed", fixed = { {-0.5, -0.5, -0.4375, 0.5, 0.5, 0.5}, {-0.4375, -0.4375, -0.5, 0.4375, 0.4375, 0.5}, } } local chis2 = { type = "fixed", fixed = { {-0.5, -0.5, -0.375, 0.5, 0.5, 0.5}, {-0.375, -0.375, -0.5, 0.375, 0.375, 0.5}, {-0.4375, -0.4375, -0.4375, 0.4375, 0.4375, 0.5}, } } local chis3 = { type = "fixed", fixed = { {-0.5, -0.5, -0.3125, 0.5, 0.5, 0.5}, {-0.375, -0.375, -0.4375, 0.375, 0.375, 0.5}, {-0.4375, -0.4375, -0.375, 0.4375, 0.4375, 0.5}, {-0.3125, -0.3125, -0.5, 0.3125, 0.3125, 0.5}, } } local chis4 = { type = "fixed", fixed = { {-0.5, -0.5, -0.25, 0.5, 0.5, 0.5}, {-0.375, -0.375, -0.375, 0.375, 0.375, 0.5}, {-0.4375, -0.4375, -0.3125, 0.4375, 0.4375, 0.5}, {-0.3125, -0.3125, -0.4375, 0.3125, 0.3125, 0.5}, {-0.25, -0.25, -0.5, 0.25, 0.25, 0.5}, } } local squar1 = { type = "fixed", fixed = { {-0.5, -0.5, -0.4375, 0.5, 0.5, 0.5}, {-0.5, -0.5, -0.5, -0.3125, 0.5, -0.4375}, {0.3125, -0.5, -0.5, 0.5, 0.5, -0.4375}, {-0.5, -0.5, -0.5, 0.5, -0.3125, -0.4375}, {-0.5, 0.3125, -0.5, 0.5, 0.5, -0.4375}, } } local squar2 = { type = "fixed", fixed = { {-0.5, -0.5, -0.375, 0.5, 0.5, 0.5}, {-0.5, -0.5, -0.5, -0.3125, 0.5, -0.375}, {0.3125, -0.5, -0.5, 0.5, 0.5, -0.375}, {-0.5, -0.5, -0.5, 0.5, -0.3125, -0.375}, {-0.5, 0.3125, -0.5, 0.5, 0.5, -0.375}, } } local squar3 = { type = "fixed", fixed = { {-0.5, -0.5, -0.3125, 0.5, 0.5, 0.5}, {-0.5, -0.5, -0.5, -0.3125, 0.5, -0.3125}, {0.3125, -0.5, -0.5, 0.5, 0.5, -0.3125}, {-0.5, -0.5, -0.5, 0.5, -0.3125, -0.3125}, {-0.5, 0.3125, -0.5, 0.5, 0.5, -0.3125}, } } local squar4 = { type = "fixed", fixed = { {-0.5, -0.5, -0.25, 0.5, 0.5, 0.5}, {-0.5, -0.5, -0.5, -0.3125, 0.5, -0.25}, {0.3125, -0.5, -0.5, 0.5, 0.5, -0.25}, {-0.5, -0.5, -0.5, 0.5, -0.3125, -0.25}, {-0.5, 0.3125, -0.5, 0.5, 0.5, -0.25}, } } local default_material = { {"default:cobble", "default_cobble", "Cobble", {cracky = 3, not_in_creative_inventory=1}}, {"default:sandstone","default_sandstone", "Sandstone", {crumbly=2, not_in_creative_inventory=1}}, {"default:clay","default_clay", "Clay", {crumbly=3, not_in_creative_inventory=1}}, {"default:coalblock","default_coal_block", "Coal Block", {cracky = 3, not_in_creative_inventory=1}}, {"default:stone","default_stone", "Stone", {cracky = 3, not_in_creative_inventory=1}}, {"default:desert_stone","default_desert_stone", "Desert Stone", {cracky = 3, not_in_creative_inventory=1}}, {"default:wood","default_wood", "Wood", {choppy=2, not_in_creative_inventory=1}}, {"default:acacia_wood","default_acacia_wood", "Acacia Wood", {choppy=2, not_in_creative_inventory=1}}, {"default:aspen_wood","default_aspen_wood", "Aspen Wood", {choppy=2, not_in_creative_inventory=1}}, {"default:pine_wood","default_pine_wood", "Pine Wood", {choppy=2, not_in_creative_inventory=1}}, {"default:desert_cobble","default_desert_cobble", "Desert Cobble", {cracky = 3, not_in_creative_inventory=1}}, {"default:junglewood","default_junglewood", "Jungle Wood", {choppy=2, not_in_creative_inventory=1}}, {"default:sandstonebrick","default_sandstone_brick", "Sandstone Brick", {cracky = 2, not_in_creative_inventory=1}}, {"default:stonebrick","default_stone_brick", "Stone Brick", {cracky = 2, not_in_creative_inventory=1}}, {"default:desert_stonebrick","default_desert_stone_brick", "Desert Stone Brick", {cracky = 2, not_in_creative_inventory=1}}, {"default:steelblock", "default_steel_block", "Steel Block", {cracky = 2, not_in_creative_inventory=1}}, {"default:copperblock", "default_copper_block", "Copper Block", {cracky = 2, not_in_creative_inventory=1}}, {"default:bronzeblock", "default_bronze_block", "Bronze Block", {cracky = 2, not_in_creative_inventory=1}}, {"default:goldblock", "default_gold_block", "Gold Block", {cracky = 2, not_in_creative_inventory=1}}, {"default:tinblock", "default_tin_block", "Tin Block", {cracky = 2, not_in_creative_inventory=1}}, {"moreblocks:copperpatina", "moreblocks_copperpatina", "Copperpatina", {cracky = 2, not_in_creative_inventory=1}}, {"default:desert_sandstone","default_desert_sandstone", "Desert Sandstone", {cracky = 2, not_in_creative_inventory=1}}, {"default:desert_sandstone_brick","default_desert_sandstone_brick", "Desert Sandstonebrick", {cracky = 2, not_in_creative_inventory=1}}, {"default:silver_sandstone","default_silver_sandstone", "Silver Sandstone", {cracky = 2, not_in_creative_inventory=1}}, {"default:silver_sandstone_brick","default_silver_sandstone_brick", "Silver Sandstonebrick", {cracky = 2, not_in_creative_inventory=1}}, } for i in ipairs (default_material) do local item = default_material [i][1] local mat = default_material [i][2] local desc = default_material [i][3] local gro = default_material [i][4] minetest.register_node("mychisel:vertical_"..mat.."1", { description = "Vertical "..desc.."1", drawtype = "nodebox", tiles = { mat..".png", mat..".png", mat..".png", mat..".png", mat..".png", mat..".png^mychisel_vtint.png", }, paramtype = "light", paramtype2 = "facedir", drop = item, groups = gro, node_box = vert1, selection_box = vert1, on_place = minetest.rotate_node, }) minetest.register_node("mychisel:vertical_"..mat.."2", { description = "Vertical "..desc.."2", drawtype = "nodebox", tiles = { mat..".png", mat..".png", mat..".png", mat..".png", mat..".png", mat..".png^mychisel_vtint.png", }, paramtype = "light", paramtype2 = "facedir", drop = item, groups = gro, node_box = vert2, selection_box = vert2 }) minetest.register_node("mychisel:vertical_"..mat.."3", { description = "Vertical "..desc.."3", drawtype = "nodebox", tiles = { mat..".png", mat..".png", mat..".png", mat..".png", mat..".png", mat..".png^mychisel_vtint.png", }, paramtype = "light", paramtype2 = "facedir", drop = item, groups = gro, node_box = vert3, selection_box = vert3 }) minetest.register_node("mychisel:vertical_"..mat.."4", { description = "Vertical "..desc.."4", drawtype = "nodebox", tiles = { mat..".png", mat..".png", mat..".png", mat..".png", mat..".png", mat..".png^mychisel_vtint.png", }, paramtype = "light", paramtype2 = "facedir", drop = item, groups = gro, node_box = vert4, selection_box = vert4 }) minetest.register_node("mychisel:chiseled_"..mat.."1", { description = "Chiseled"..desc.."1", drawtype = "nodebox", tiles = { mat..".png", mat..".png", mat..".png", mat..".png", mat..".png", mat..".png^mychisel_ctint1.png", }, paramtype = "light", paramtype2 = "facedir", drop = item, groups = gro, node_box = chis1, selection_box = chis1, }) minetest.register_node("mychisel:chiseled_"..mat.."2", { description = "Chiseled"..desc.."2", drawtype = "nodebox", tiles = { mat..".png", mat..".png", mat..".png", mat..".png", mat..".png", mat..".png^mychisel_ctint2.png", }, paramtype = "light", paramtype2 = "facedir", drop = item, groups = gro, node_box = chis2, selection_box = chis2 }) minetest.register_node("mychisel:chiseled_"..mat.."3", { description = "Chiseled"..desc.."3", drawtype = "nodebox", tiles = { mat..".png", mat..".png", mat..".png", mat..".png", mat..".png", mat..".png^mychisel_ctint3.png", }, paramtype = "light", paramtype2 = "facedir", drop = item, groups = gro, node_box = chis3, selection_box = chis3 }) minetest.register_node("mychisel:chiseled_"..mat.."4", { description = "Chiseled"..desc.."4", drawtype = "nodebox", tiles = { mat..".png", mat..".png", mat..".png", mat..".png", mat..".png", mat..".png^mychisel_ctint4.png", }, paramtype = "light", paramtype2 = "facedir", drop = item, groups = gro, node_box = chis4, selection_box = chis4 }) minetest.register_node("mychisel:horizontal_"..mat.."1", { description = "Horizontal "..desc.."1", drawtype = "nodebox", tiles = { mat..".png", mat..".png", mat..".png", mat..".png", mat..".png", mat..".png^mychisel_htint.png", }, paramtype = "light", paramtype2 = "facedir", drop = item, groups = gro, node_box = hori1, selection_box = hori1 }) minetest.register_node("mychisel:horizontal_"..mat.."2", { description = "Horizontal"..desc.."2", drawtype = "nodebox", tiles = { mat..".png", mat..".png", mat..".png", mat..".png", mat..".png", mat..".png^mychisel_htint.png", }, paramtype = "light", paramtype2 = "facedir", drop = item, groups = gro, node_box = hori2, selection_box = hori2 }) minetest.register_node("mychisel:horizontal_"..mat.."3", { description = "Horizontal"..desc.."3", drawtype = "nodebox", tiles = { mat..".png", mat..".png", mat..".png", mat..".png", mat..".png", mat..".png^mychisel_htint.png", }, paramtype = "light", paramtype2 = "facedir", drop = item, groups = gro, node_box = hori3, selection_box = hori3 }) minetest.register_node("mychisel:horizontal_"..mat.."4", { description = "Horizontal"..desc.."4", drawtype = "nodebox", tiles = { mat..".png", mat..".png", mat..".png", mat..".png", mat..".png", mat..".png^mychisel_htint.png", }, paramtype = "light", paramtype2 = "facedir", drop = item, groups = gro, node_box = hori4, selection_box = hori4 }) minetest.register_node("mychisel:cross_"..mat.."1", { description = "cross "..desc.."1", drawtype = "nodebox", tiles = { mat..".png", mat..".png", mat..".png", mat..".png", mat..".png", mat..".png^mychisel_ctint.png", }, paramtype = "light", paramtype2 = "facedir", drop = item, groups = gro, node_box = cross1, selection_box = cross1 }) minetest.register_node("mychisel:cross_"..mat.."2", { description = "cross"..desc.."2", drawtype = "nodebox", tiles = { mat..".png", mat..".png", mat..".png", mat..".png", mat..".png", mat..".png^mychisel_ctint.png", }, paramtype = "light", paramtype2 = "facedir", drop = item, groups = gro, node_box = cross2, selection_box = cross2 }) minetest.register_node("mychisel:cross_"..mat.."3", { description = "cross"..desc.."3", drawtype = "nodebox", tiles = { mat..".png", mat..".png", mat..".png", mat..".png", mat..".png", mat..".png^mychisel_ctint.png", }, paramtype = "light", paramtype2 = "facedir", drop = item, groups = gro, node_box = cross3, selection_box = cross3 }) minetest.register_node("mychisel:cross_"..mat.."4", { description = "cross"..desc.."4", drawtype = "nodebox", tiles = { mat..".png", mat..".png", mat..".png", mat..".png", mat..".png", mat..".png^mychisel_ctint.png", }, paramtype = "light", paramtype2 = "facedir", drop = item, groups = gro, node_box = cross4, selection_box = cross4 }) minetest.register_node("mychisel:square_"..mat.."1", { description = "cross "..desc.."1", drawtype = "nodebox", tiles = { mat..".png", mat..".png", mat..".png", mat..".png", mat..".png", mat..".png^mychisel_stint.png", }, paramtype = "light", paramtype2 = "facedir", drop = item, groups = gro, node_box = squar1, selection_box = squar1 }) minetest.register_node("mychisel:square_"..mat.."2", { description = "cross"..desc.."2", drawtype = "nodebox", tiles = { mat..".png", mat..".png", mat..".png", mat..".png", mat..".png", mat..".png^mychisel_stint.png", }, paramtype = "light", paramtype2 = "facedir", drop = item, groups = gro, node_box = squar2, selection_box = squar2 }) minetest.register_node("mychisel:square_"..mat.."3", { description = "cross"..desc.."3", drawtype = "nodebox", tiles = { mat..".png", mat..".png", mat..".png", mat..".png", mat..".png", mat..".png^mychisel_stint.png", }, paramtype = "light", paramtype2 = "facedir", drop = item, groups = gro, node_box = squar3, selection_box = squar3 }) minetest.register_node("mychisel:square_"..mat.."4", { description = "cross"..desc.."4", drawtype = "nodebox", tiles = { mat..".png", mat..".png", mat..".png", mat..".png", mat..".png", mat..".png^mychisel_stint.png", }, paramtype = "light", paramtype2 = "facedir", drop = item, groups = gro, node_box = squar4, selection_box = squar4 }) end