123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252 |
- local slope_cbox = {
- type = "fixed",
- fixed = {
- {-0.5, -0.5, -0.5, 0.5, -0.25, 0.5},
- {-0.5, -0.25, -0.25, 0.5, 0, 0.5},
- {-0.5, 0, 0, 0.5, 0.25, 0.5},
- {-0.5, 0.25, 0.25, 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}, -- NodeBox1
- {-0.5, -0.375, -1.25, 0.5, -0.25, 0.5}, -- NodeBox2
- {-0.5, -0.25, -1, 0.5, -0.125, 0.5}, -- NodeBox3
- {-0.5, -0.125, -0.75, 0.5, 0, 0.5}, -- NodeBox4
- {-0.5, 0, -0.5, 0.5, 0.125, 0.5}, -- NodeBox5
- {-0.5, 0.125, -0.25, 0.5, 0.25, 0.5}, -- NodeBox6
- {-0.5, 0.25, 0, 0.5, 0.375, 0.5}, -- NodeBox7
- {-0.5, 0.375, 0.25, 0.5, 0.5, 0.5}, -- NodeBox8
- }
- }
- local icorner_cbox = {
- type = "fixed",
- fixed = {
- {-0.5, -0.5, -0.5, 0.5, -0.25, 0.5}, -- NodeBox5
- {-0.5, -0.5, -0.25, 0.5, 0, 0.5}, -- NodeBox6
- {-0.5, -0.5, -0.5, 0.25, 0, 0.5}, -- NodeBox7
- {-0.5, 0, -0.5, 0, 0.25, 0.5}, -- NodeBox8
- {-0.5, 0, 0, 0.5, 0.25, 0.5}, -- NodeBox9
- {-0.5, 0.25, 0.25, 0.5, 0.5, 0.5}, -- NodeBox10
- {-0.5, 0.25, -0.5, -0.25, 0.5, 0.5}, -- NodeBox11
- }
- }
- local ocorner_cbox = {
- type = "fixed",
- fixed = {
- {-0.5, -0.5, -0.5, 0.5, -0.25, 0.5},
- {-0.5, -0.25, -0.25, 0.25, 0, 0.5},
- {-0.5, 0, 0, 0, 0.25, 0.5},
- {-0.5, 0.25, 0.25, -0.25, 0.5, 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 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},
- }
- }
- --Grass Block
- minetest.register_node("mypaths:grass", {
- description = "Fake Grass",
- tiles = {"default_grass.png"},
- drawtype = "normal",
- paramtype = "light",
- paramtype2 = "facedir",
- groups = {crumbly = 2, soil=1},
- sounds = default.node_sound_dirt_defaults({
- footstep = {name="default_grass_footstep", gain=0.25},
- }),
- })
- --Craft
- minetest.register_craft({
- output = "mypaths:grass 9",
- recipe = {
- {"default:dirt", "default:dirt","default:dirt"},
- {"default:dirt", "default:dirt","default:dirt"},
- {"default:dirt", "default:dirt","default:dirt"},
- }
- })
- minetest.register_node("mypaths:grass_slope", {
- description = "Grass slope",
- drawtype = "mesh",
- mesh = "twelve-twelve.obj",
- tiles = {"default_grass.png"},
- paramtype = "light",
- paramtype2 = "facedir",
- groups = {crumbly = 2, soil=1},
- sounds = default.node_sound_dirt_defaults({
- footstep = {name="default_grass_footstep", gain=0.25},
- }),
- on_place = minetest.rotate_node,
- collision_box = slope_cbox,
- selection_box = slope_cbox
- })
- --Craft
- minetest.register_craft({
- output = "mypaths:grass_slope 6",
- recipe = {
- {"", "","mypaths:grass"},
- {"", "mypaths:grass","mypaths:grass"},
- {"mypaths:grass", "mypaths:grass","mypaths:grass"},
- }
- })
- minetest.register_node("mypaths:grass_slope_long", {
- description = "Grass Slope Long",
- drawtype = "mesh",
- mesh = "six-twelve_slope.obj",
- tiles = {"default_grass.png"},
- paramtype = "light",
- paramtype2 = "facedir",
- groups = {crumbly = 2, soil=1},
- sounds = default.node_sound_dirt_defaults({
- footstep = {name="default_grass_footstep", gain=0.25},
- }),
- on_place = minetest.rotate_node,
- collision_box = slope_cbox_long,
- selection_box = slope_cbox_long
- })
- --Craft
- minetest.register_craft({
- output = "mypaths:grass_slope_long 1",
- recipe = {
- {"mypaths:grass_slope", "mypaths:grass_slope",""},
- {"", "",""},
- {"", "",""},
- }
- })
- minetest.register_node("mypaths:grass_ocorner", {
- description = "Grass slope (outer corner)",
- drawtype = "mesh",
- mesh = "twelve-twelve-oc.obj",
- tiles = {"default_grass.png"},
- paramtype = "light",
- paramtype2 = "facedir",
- groups = {crumbly = 2, soil=1},
- sounds = default.node_sound_dirt_defaults({
- footstep = {name="default_grass_footstep", gain=0.25},
- }),
- on_place = minetest.rotate_node,
- collision_box = ocorner_cbox,
- selection_box = ocorner_cbox
- })
- --Craft
- minetest.register_craft({
- output = "mypaths:grass_ocorner 4",
- recipe = {
- {"", "",""},
- {"", "mypaths:grass","mypaths:grass"},
- {"", "mypaths:grass","mypaths:grass"},
- }
- })
- minetest.register_node("mypaths:grass_icorner", {
- description = "Grass slope (inner corner)",
- drawtype = "mesh",
- mesh = "twelve-twelve-ic.obj",
- tiles = {"default_grass.png"},
- paramtype = "light",
- paramtype2 = "facedir",
- groups = {crumbly = 2, soil=1},
- sounds = default.node_sound_dirt_defaults({
- footstep = {name="default_grass_footstep", gain=0.25},
- }),
- on_place = minetest.rotate_node,
- collision_box = icorner_cbox,
- selection_box = icorner_cbox
- })
- --Craft
- minetest.register_craft({
- output = "mypaths:grass_icorner 5",
- recipe = {
- {"mypaths:grass", "mypaths:grass","mypaths:grass"},
- {"mypaths:grass", "",""},
- {"mypaths:grass", "",""},
- }
- })
- minetest.register_node("mypaths:grass_slope_long_oc", {
- description = "Grass Slope Long (Outer Corner)",
- drawtype = "mesh",
- mesh = "six-twelve_slope-oc.obj",
- tiles = {"default_grass.png"},
- paramtype = "light",
- paramtype2 = "facedir",
- groups = {crumbly = 2, soil=1},
- sounds = default.node_sound_dirt_defaults({
- footstep = {name="default_grass_footstep", gain=0.25},
- }),
- on_place = minetest.rotate_node,
- collision_box = ocorner_cbox_long,
- selection_box = ocorner_cbox_long
- })
- --Craft
- minetest.register_craft({
- output = "mypaths:grass_slope_long_oc 3",
- recipe = {
- {"mypaths:grass_slope", "mypaths:grass_slope","mypaths:grass_slope"},
- {"mypaths:grass_slope", "mypaths:grass_slope",""},
- {"mypaths:grass_slope", "",""},
- }
- })
- minetest.register_node("mypaths:grass_slope_long_ic", {
- description = "Grass Slope Long (Inner Corner)",
- drawtype = "mesh",
- mesh = "six-twelve_slope-ic.obj",
- tiles = {"default_grass.png"},
- paramtype = "light",
- paramtype2 = "facedir",
- groups = {crumbly = 2, soil=1},
- sounds = default.node_sound_dirt_defaults({
- footstep = {name="default_grass_footstep", gain=0.25},
- }),
- on_place = minetest.rotate_node,
- collision_box = icorner_cbox_long,
- selection_box = icorner_cbox_long
- })
- --Craft
- minetest.register_craft({
- output = "mypaths:grass_slope_long_ic 4",
- recipe = {
- {"mypaths:grass_slope", "mypaths:grass_slope","mypaths:grass_slope"},
- {"mypaths:grass_slope", "mypaths:grass_slope","mypaths:grass_slope"},
- {"mypaths:grass_slope", "mypaths:grass_slope",""},
- }
- })
|