Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- minetest.register_node("fireplace:fireplace_01", {
- description = "Fireplace 01",
- drawtype = "mesh",
- mesh = "fireplace.obj",
- inventory_image = minetest.inventorycube("fireplace_01_top.png", "fireplace_01_side.png", "fireplace_01_front.png"),
- wield_image = "fireplace_01_front.png",
- tiles = {
- "fireplace_01_top.png", "fireplace_01_bottom.png",
- "fireplace_01_side.png", "fireplace_01_side.png",
- "fireplace_01_front.png", "fireplace_01_side.png"},
- paramtype = "light",
- paramtype2 = "facedir",
- legacy_facedir_simple = true,
- is_ground_content = false,
- groups = {cracky=2, stone=1, oddly_breakable_by_hand=3},
- sounds = default.node_sound_stone_defaults(),
- selection_box = {
- type = "fixed",
- fixed = {
- {-0.5, -0.5, 0, 1.5, 1.5, 0.5},
- },
- },
- collision_box = {
- type = "fixed",
- fixed = {
- {-0.5, -0.5, 0, 1.5, 1.5, 0.5},
- },
- },
- on_rightclick = function(pos, node, puncher)
- minetest.sound_play("fire_small", {pos = pos, gain = 0.20, max_hear_distance = 10, loop = true})
- minetest.swap_node(pos, {name = "fireplace:fireplace_01_active", param2 = node.param2})
- end
- })
- minetest.register_node("fireplace:fireplace_01_active", {
- description = "Fireplace_01_Active",
- drawtype = "mesh",
- mesh = "fireplace.obj",
- tiles = {
- "fireplace_01_top.png", "fireplace_01_bottom.png",
- "fireplace_01_side.png", "fireplace_01_side.png",
- {
- image = "fireplace_01_active.png",
- backface_culling = false,
- animation = {
- type = "vertical_frames",
- aspect_w = 32,
- aspect_h = 32,
- length = 1.9
- },
- }, "fireplace_01_side.png",
- },
- light_source = 8,
- paramtype = "light",
- paramtype2 = "facedir",
- legacy_facedir_simple = true,
- is_ground_content = false,
- groups = {not_in_creative_inventory = 1},
- sounds = default.node_sound_stone_defaults(),
- selection_box = {
- type = "fixed",
- fixed = {
- {-0.5, -0.5, 0, 1.5, 1.5, 0.5},
- },
- },
- collision_box = {
- type = "fixed",
- fixed = {
- {-0.5, -0.5, 0, 1.5, 1.5, 0.5},
- },
- },
- on_rightclick = function(pos, node, puncher)
- minetest.after(10, function(handle)
- minetest.sound_stop(handle)
- end, handle)
- minetest.swap_node(pos, {name = "fireplace:fireplace_01", param2 = node.param2})
- end,
- drop = "fireplace:fireplace_01",
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement