local slope_cbox = { type = "fixed", fixed = { {-0.5, -0.5, -0.5, 0.5, -0.375, 0.5}, {-0.5, -0.5, -0.375, 0.5, -0.25, 0.5}, {-0.5, -0.5, -0.25, 0.5, -0.125, 0.5}, {-0.5, -0.5, -0.125, 0.5, 0, 0.5}, {-0.5, -0.5, 0, 0.5, 0.125, 0.5}, {-0.5, -0.5, 0.125, 0.5, 0.25, 0.5}, {-0.5, -0.5, 0.25, 0.5, 0.375, 0.5}, {-0.5, -0.5, 0.375, 0.5, 0.5, 0.5}, } } local slope_cbox_long = { type = "fixed", fixed = { {-0.5, -0.5, -1.5, 0.5, -0.375, 0.5}, {-0.5, -0.375, -1.25, 0.5, -0.25, 0.5}, {-0.5, -0.25, -1, 0.5, -0.125, 0.5}, {-0.5, -0.125, -0.75, 0.5, 0, 0.5}, {-0.5, 0, -0.5, 0.5, 0.125, 0.5}, {-0.5, 0.125, -0.25, 0.5, 0.25, 0.5}, {-0.5, 0.25, 0, 0.5, 0.375, 0.5}, {-0.5, 0.375, 0.25, 0.5, 0.5, 0.5}, } } local icorner_cbox = { type = "fixed", fixed = { {-0.5, -0.5, -0.5, 0.5, -0.375, 0.5}, {-0.5, -0.5, -0.375, 0.5, -0.25, 0.5}, {-0.5, -0.5, -0.25, 0.5, -0.125, 0.5}, {-0.5, -0.5, -0.125, 0.5, 0, 0.5}, {-0.5, -0.5, 0, 0.5, 0.125, 0.5}, {-0.5, -0.5, 0.125, 0.5, 0.25, 0.5}, {-0.5, -0.5, 0.25, 0.5, 0.375, 0.5}, {-0.5, -0.5, 0.375, 0.5, 0.5, 0.5}, {-0.5, -0.5, -0.5, -0.375, 0.5, 0.5}, {-0.5, -0.5, -0.5, -0.25, 0.375, 0.5}, {-0.5, -0.5, -0.5, -0.125, 0.25, 0.5}, {-0.5, -0.5, -0.5, 0, 0.125, 0.5}, {-0.5, -0.5, -0.5, 0.125, 0, 0.5}, {-0.5, -0.5, -0.5, 0.25, -0.125, 0.5}, {-0.5, -0.5, -0.5, 0.375, -0.25, 0.5}, } } local icorner_cbox_long = { type = "fixed", fixed = { {-0.5, -0.5, -1.5, -0.25, 0.5, 0.5}, {-0.5, -0.5, 0.25, 1.5, 0.5, 0.5}, {-0.5, -0.5, 0, 1.5, 0.375, 0.5}, {-0.5, -0.5, -1.5, 0, 0.375, 0.5}, {-0.5, -0.5, -1.5, 0.25, 0.25, 0.5}, {-0.5, -0.5, -1.5, 0.5, 0.125, 0.5}, {-0.5, -0.5, -1.5, 0.75, 0, 0.5}, {-0.5, -0.5, -1.5, 1, -0.125, 0.5}, {-0.5, -0.5, -1.5, 1.25, -0.25, 0.5}, {-0.5, -0.5, -1.5, 1.5, -0.375, 0.5}, {-0.5, -0.5, -0.25, 1.5, 0.25, 0.5}, {-0.5, -0.5, -0.5, 1.5, 0.125, 0.5}, {-0.5, -0.5, -0.75, 1.5, 0, 0.5}, {-0.5, -0.5, -1, 1.5, -0.125, 0.5}, {-0.5, -0.5, -1.25, 1.5, -0.25, 0.5}, } } local i45_cbox = { type = "fixed", fixed = { {0.375, -0.5, -0.5, 0.5, 0.5, 0.5}, {-0.5, -0.5, 0.375, 0.5, 0.5, 0.5}, {-0.375, -0.5, 0.25, 0.5, 0.5, 0.5}, {0.25, -0.5, -0.375, 0.5, 0.5, 0.5}, {-0.25, -0.5, 0.125, 0.5, 0.5, 0.5}, {0.125, -0.5, -0.25, 0.5, 0.5, 0.5}, {0, -0.5, -0.125, 0.5, 0.5, 0.5}, {-0.125, -0.5, 0, 0.5, 0.5, 0.5}, {-0.5, -0.5, -0.5, 0.5, -0.375, 0.5}, {-0.5, -0.5, -0.375, 0.5, -0.25, 0.5}, {-0.5, -0.5, -0.25, 0.5, -0.125, 0.5}, {-0.5, -0.5, -0.125, 0.5, 0, 0.5}, {-0.5, -0.5, 0, 0.5, 0.125, 0.5}, {-0.5, -0.5, 0.125, 0.5, 0.25, 0.5}, {-0.5, -0.5, 0.25, 0.5, 0.375, 0.5}, {-0.375, -0.5, -0.5, 0.5, -0.25, 0.5}, {-0.25, -0.5, -0.5, 0.5, -0.125, 0.5}, {-0.125, -0.5, -0.5, 0.5, 0, 0.5}, {0, -0.5, -0.5, 0.5, 0.125, 0.5}, {0.125, -0.5, -0.5, 0.5, 0.25, 0.5}, {0.25, -0.5, -0.5, 0.5, 0.375, 0.5}, } } local o45_cbox = { type = "fixed", fixed = { {-0.4375, -0.5, 0.375, 0.5, -0.375, 0.5}, {0.375, -0.5, -0.4375, 0.5, -0.375, 0.5}, {0.25, -0.5, -0.3125, 0.5, -0.375, 0.5}, {-0.3125, -0.5, 0.25, 0.5, -0.375, 0.5}, {0.125, -0.5, -0.1875, 0.5, -0.375, 0.5}, {-0.1875, -0.5, 0.125, 0.5, -0.375, 0.5}, {0, -0.5, 0, 0.5, -0.375, 0.5}, {0.375, -0.5, -0.3125, 0.5, -0.25, 0.5}, {-0.3125, -0.5, 0.375, 0.5, -0.25, 0.5}, {0.25, -0.5, -0.1875, 0.5, -0.25, 0.5}, {-0.1875, -0.5, 0.25, 0.5, -0.25, 0.5}, {0.125, -0.5, 0, 0.5, -0.25, 0.5}, {0, -0.5, 0.125, 0.5, -0.25, 0.5}, {0.375, -0.5, -0.1875, 0.5, -0.125, 0.5}, {-0.1875, -0.5, 0.375, 0.5, -0.125, 0.5}, {0.25, -0.5, 0, 0.5, -0.125, 0.5}, {0, -0.5, 0.25, 0.5, -0.125, 0.5}, {0.125, -0.5, 0.125, 0.5, -0.125, 0.5}, {0.375, -0.5, 0, 0.5, 0, 0.5}, {0, -0.5, 0.375, 0.5, 0, 0.5}, {0.25, -0.5, 0.125, 0.5, 0, 0.5}, {0.125, -0.5, 0.25, 0.5, 0, 0.5}, {0.375, -0.5, 0.375, 0.5, 0.4375, 0.5}, {0.375, -0.5, 0.25, 0.5, 0.3125, 0.5}, {0.375, -0.5, 0.125, 0.5, 0.1875, 0.5}, {0.25, -0.5, 0.375, 0.5, 0.3125, 0.5}, {0.125, -0.5, 0.375, 0.5, 0.1875, 0.5}, {0.25, -0.5, 0.25, 0.5, 0.1875, 0.5}, } } local ocorner_cbox = { type = "fixed", fixed = { {-0.5, -0.5, -0.5, 0.5, -0.375, 0.5}, {-0.5, -0.5, -0.375, 0.375, -0.25, 0.5}, {-0.5, -0.5, -0.25, 0.25, -0.125, 0.5}, {-0.5, -0.5, -0.125, 0.125, 0, 0.5}, {-0.5, -0.5, 0, 0, 0.125, 0.5}, {-0.5, -0.5, 0.125, -0.125, 0.25, 0.5}, {-0.5, -0.5, 0.25, -0.25, 0.375, 0.5}, {-0.5, -0.5, 0.375, -0.375, 0.5, 0.5}, } } local ocorner_cbox_long = { type = "fixed", fixed = { {-0.5, -0.5, 0.25, -0.25, 0.5, 0.5}, {-0.5, -0.5, 0, 0, 0.375, 0.5}, {-0.5, -0.5, -0.25, 0.25, 0.25, 0.5}, {-0.5, -0.5, -0.5, 0.5, 0.125, 0.5}, {-0.5, -0.5, -0.75, 0.75, 0, 0.5}, {-0.5, -0.5, -1, 1, -0.125, 0.5}, {-0.5, -0.5, -1.25, 1.25, -0.25, 0.5}, {-0.5, -0.5, -1.5, 1.5, -0.375, 0.5}, } } local smpyr_cbox = { type = "fixed", fixed = { { -0.5, -0.5, -0.5, 0.5, -0.375, 0.5 }, { -0.375, -0.375, -0.375, 0.375, -0.25, 0.375}, { -0.25, -0.25, -0.25, 0.25, -0.125, 0.25}, { -0.125, -0.125, -0.125, 0.125, 0, 0.125} } } local pyr_cbox = { type = "fixed", fixed = { { -0.5, -0.5, -0.5, 0.5, -0.25, 0.5 }, { -0.375, -0.25, -0.375, 0.375, 0, 0.375}, { -0.25, 0, -0.25, 0.25, 0.25, 0.25}, { -0.125, 0.25, -0.125, 0.125, 0.5, 0.125} } } local slope_fronthalf_cbox = { type = "fixed", fixed = { {-0.5, -0.5, -0.5, 0.5, -0.375, 0.5}, {-0.5, -0.375, -0.25, 0.5, -0.25, 0.5}, {-0.5, -0.25, 0, 0.5, -0.125, 0.5}, {-0.5, -0.125, 0.25, 0.5, 0, 0.5}, } } local slope_backhalf_cbox = { type = "fixed", fixed = { {-0.5, -0.5, -0.5, 0.5, 0.125, 0.5}, {-0.5, 0.125, -0.25, 0.5, 0.25, 0.5}, {-0.5, 0.25, 0, 0.5, 0.375, 0.5}, {-0.5, 0.375, 0.25, 0.5, 0.5, 0.5}, } } local circle_cbox = { type = "fixed", fixed = { {-0.5, -0.5, -0.5, 0.5, -0.25, 0.5}, } } local longslope_top_cbox = { type = "fixed", fixed = { {-0.5, -0.5, 0.25, 0.5, 0.5, 0.5}, {-0.5, -0.5, 0, 0.5, 0.375, 0.25}, {-0.5, -0.5, -0.25, 0.5, 0.25, 0}, {-0.5, -0.5, -0.5, 0.5, 0.125, -0.25}, } } local longslope_bottom_cbox = { type = "fixed", fixed = { {-0.5, -0.5, 0.25, 0.5, 0, 0.5}, {-0.5, -0.5, 0, 0.5, -0.125, 0.25}, {-0.5, -0.5, -0.25, 0.5, -0.25, 0}, {-0.5, -0.5, -0.5, 0.5, -0.375, -0.25}, } } local pole_cbox = { type = "fixed", fixed = { {-0.125, -0.5, -0.125, 0.125, 0.5, 0.125}, } } local smquapyramid_cbox = { type = "fixed", fixed = { {-0.5, -0.5, 0.25, -0.25, 0, 0.5}, {-0.5, -0.5, 0, -0.25, -0.125, 0.25}, {-0.5, -0.5, -0.25, -0.25, -0.25, 0}, {-0.5, -0.5, -0.5, -0.25, -0.375, -0.25}, {-0.25, -0.5, 0.25, 0, -0.125, 0.5}, {0, -0.5, 0.25, 0.25, -0.25, 0.5}, {0.25, -0.5, 0.25, 0.5, -0.375, 0.5}, {-0.25, -0.5, 0, 0, -0.25, 0.25}, {-0.25, -0.5, -0.25, 0, -0.375, 0}, {0, -0.5, 0, 0.25, -0.375, 0.25}, } } local quapyramid_cbox = { type = "fixed", fixed = { {-0.5, -0.5, 0.25, -0.25, 0.5, 0.5}, {-0.5, -0.5, 0, -0.25, 0.375, 0.25}, {-0.5, -0.5, -0.25, -0.25, 0.25, 0}, {-0.5, -0.5, -0.5, -0.25, 0.125, -0.25}, {-0.25, -0.5, 0.25, 0, 0.375, 0.5}, {0, -0.5, 0.25, 0.25, 0.25, 0.5}, {0.25, -0.5, 0.25, 0.5, 0.125, 0.5}, {-0.25, -0.5, 0, 0, 0.25, 0.25}, {-0.25, -0.5, -0.25, 0, 0.125, 0}, {0, -0.5, 0, 0.25, 0.125, 0.25}, {-0.25, -0.5, -0.5, 0.5, 0, 0.25}, } } local peek_cbox = { type = "fixed", fixed = { {-0.5, -0.5, -0.4375, 0.5, -0.4375, 0.4375}, {-0.5, -0.5, -0.375, 0.5, -0.375, 0.375}, {-0.5, -0.5, -0.3125, 0.5, -0.3125, 0.3125}, {-0.5, -0.5, -0.25, 0.5, -0.25, 0.25}, {-0.5, -0.5, -0.1875, 0.5, -0.1875, 0.1875}, {-0.5, -0.5, -0.125, 0.5, -0.125, 0.125}, {-0.5, -0.5, -0.0625, 0.5, -0.0625, 0.0625}, } } local valley_cbox = { type = "fixed", fixed = { {-0.5, -0.5, -0.5, 0.5, 0, 0.5}, {-0.5, -0.5, -0.5, -0.4375, 0.4375, 0.5}, {-0.5, -0.5, -0.5, -0.375, 0.375, 0.5}, {-0.5, -0.5, -0.5, -0.3125, 0.3125, 0.5}, {-0.5, -0.5, -0.5, -0.25, 0.25, 0.5}, {-0.5, -0.5, -0.5, -0.1875, 0.1875, 0.5}, {-0.5, -0.5, -0.5, -0.125, 0.125, 0.5}, {-0.5, -0.5, -0.5, -0.0625, 0.0625, 0.5}, {0.4375, -0.5, -0.5, 0.5, 0.4375, 0.5}, {0.375, -0.5, -0.5, 0.5, 0.375, 0.5}, {0.3125, -0.5, -0.5, 0.5, 0.3125, 0.5}, {0.25, -0.5, -0.5, 0.5, 0.25, 0.5}, {0.1875, -0.5, -0.5, 0.5, 0.1875, 0.5}, {0.125, -0.5, -0.5, 0.5, 0.125, 0.5}, {0.0625, -0.5, -0.5, 0.5, 0.0625, 0.5}, } } local curve_cbox = { type = "fixed", fixed = { {-0.5, -0.5, 0.4375, 0.5, 0.5, 0.5}, {-0.5, -0.5, 0.375, 0.5, 0.125, 0.5}, {-0.5, -0.5, -0.5, 0.5, -0.4375, 0.5}, {-0.5, -0.5, -0.125, 0.5, -0.375, 0.5}, {-0.5, -0.5, 0.0625, 0.5, -0.25, 0.5}, {-0.5, -0.5, 0.25, 0.5, -0.0625, 0.5}, {-0.5, -0.5, 0.25, 0.5, -0.0625, 0.5}, {-0.5, -0.5, 0.0625, 0.5, -0.25, 0.5}, {-0.5, -0.5, 0.1875, 0.5, -0.1875, 0.5}, } } local hard_slopes = { --Material Image { "hardened_clay", "hardened_clay.png"}, { "hardened_clay_white", "hardened_clay_white.png"}, { "hardened_clay_black", "hardened_clay_black.png"}, { "hardened_clay_light_blue", "hardened_clay_light_blue.png"}, { "hardened_clay_green", "hardened_clay_green.png"}, { "hardened_clay_red", "hardened_clay_red.png"}, { "hardened_clay_light_grey", "hardened_clay_light_grey.png"}, { "hardened_clay_violet", "hardened_clay_violet.png"}, { "hardened_clay_lime", "hardened_clay_lime.png"}, { "hardened_clay_magenta", "hardened_clay_magenta.png"}, { "hardened_clay_orange", "hardened_clay_orange.png"}, { "hardened_clay_brown", "hardened_clay_brown.png"}, { "hardened_clay_blue", "hardened_clay_blue.png"}, { "hardened_clay_yellow", "hardened_clay_yellow.png"}, { "hardened_clay_pink", "hardened_clay_pink.png"}, { "hardened_clay_cyan", "hardened_clay_cyan.png"}, { "hardened_clay_grey", "hardened_clay_grey.png"}, } local normal_cbox = { type = "fixed", fixed = { {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, } } for i in ipairs(hard_slopes) do local mat = hard_slopes[i][1] local img = hard_slopes[i][2] local slopes = { --shape , Description , mesh , colbox { "slope", "Slope", "mymeshnodes_twelve-twelve.obj", slope_cbox}, { "slope_ic", "Inside Corner Slope", "mymeshnodes_twelve-twelve-ic.obj", icorner_cbox}, { "slope_oc", "Outside Corner Slope", "mymeshnodes_twelve-twelve-oc.obj", ocorner_cbox}, { "lslope", "Long Slope", "mymeshnodes_six-twelve.obj", slope_cbox_long}, { "lslope_ic", "Inside Corner Long Slope", "mymeshnodes_six-twelve-ic.obj", icorner_cbox_long}, { "lslope_oc", "Outside Corner Long Slope","mymeshnodes_six-twelve-oc.obj", ocorner_cbox_long}, { "slope_i45", "Inside 45 Slope", "mymeshnodes_diag1.obj", i45_cbox}, { "slope_o45", "Outside 45 Slope", "mymeshnodes_diag2.obj", o45_cbox}, { "lslope_top", "Long Slope Top", "mymeshnodes_lslope_top.obj", normal_cbox}, { "lslope_bot", "Long Slope Bottom", "mymeshnodes_lslope_bot.obj", normal_cbox}, { "smpyramid", "Small Pyramid", "mymeshnodes_smpyramid.obj", smpyr_cbox}, { "pyramid", "Pyramid", "mymeshnodes_pyramid.obj", pyr_cbox}, { "smquapyramid", "Small Quarter Pyramid", "mymeshnodes_smquapyramid.obj", normal_cbox}, { "quapyramid", "Quarter Pyramid", "mymeshnodes_quapyramid.obj", normal_cbox}, { "circle", "Circle", "mymeshnodes_circle.obj", circle_cbox}, { "pole", "Pole", "mymeshnodes_pole.obj", normal_cbox}, { "ichalf", "Inside Corner Half", "mymeshnodes_ichalf.obj", normal_cbox}, { "cylinder", "Cylinder", "mymeshnodes_cylinder.obj", normal_cbox}, { "sphere", "Sphere", "mymeshnodes_sphere.obj", normal_cbox}, { "rounded", "Rounded", "mymeshnodes_rounded.obj", normal_cbox}, { "roundedc", "Rounded Corner", "mymeshnodes_rounded_corner.obj", normal_cbox}, { "cone", "Cone", "mymeshnodes_cone.obj", normal_cbox}, { "blob", "Blob", "mymeshnodes_blob.obj", normal_cbox}, { "barrel", "Barrel", "mymeshnodes_barrel.obj", normal_cbox}, { "peek", "Peek", "mymeshnodes_peek.obj", peek_cbox}, { "valley", "Valley", "mymeshnodes_valley.obj", valley_cbox}, { "curve", "Curve", "mymeshnodes_curve.obj", curve_cbox}, { "oct", "Octagon", "mymeshnodes_oct.obj", normal_cbox}, } for i in ipairs(slopes) do local shap = slopes[i][1] local desc = slopes[i][2] local mesh = slopes[i][3] local colbox = slopes[i][4] --slope minetest.register_node("mymeshnodes:"..shap.."_"..mat, { description = desc.." "..mat, drawtype = "mesh", mesh = mesh, tiles = {img}, paramtype = "light", paramtype2 = "facedir", groups = {cracky=2, oddly_breakable_by_hand=2, not_in_creative_inventory=1}, sounds = default.node_sound_wood_defaults(), on_place = minetest.rotate_node, collision_box = colbox, selection_box = colbox, }) end end