added fence
@ -14,6 +14,34 @@ function default.drop_items(pos, oldnode, oldmetadata, digger)
|
||||
end
|
||||
end
|
||||
|
||||
function default.register_fence(name,def)
|
||||
def.description = def.description or minetest.registered_nodes[def.material].description .. " Fence"
|
||||
def.tiles = def.tiles or minetest.registered_nodes[def.material].tiles
|
||||
def.groups = def.groups or minetest.registered_nodes[def.material].groups
|
||||
def.sounds = def.sounds or minetest.registered_nodes[def.material].sounds
|
||||
def.drawtype = "nodebox"
|
||||
def.node_box = {
|
||||
type = "connected",
|
||||
fixed = {{-3/16, -0.5, -3/16, 3/16, 0.5, 3/16}},
|
||||
connect_front = {{-2/16,-0.5,-1/2,2/16,0.5,-2/16}},
|
||||
connect_left = {{-1/2,-0.5,-2/16,-2/16,0.5,2/16}},
|
||||
connect_back = {{-2/16,-0.5,2/16,2/16,0.5,1/2}},
|
||||
connect_right = {{2/16,-0.5,-2/16,1/2,0.5,2/16}},
|
||||
}
|
||||
def.paramtype = "light"
|
||||
def.connects_to = {name, "group:cracky", "group:choppy"}
|
||||
|
||||
minetest.register_node(name, def)
|
||||
|
||||
minetest.register_craft({
|
||||
output = name .. " 12",
|
||||
recipe = {
|
||||
{def.material, def.material, def.material},
|
||||
{def.material, def.material, def.material}
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
default.sounds = {}
|
||||
|
||||
function default.sounds.wood(t)
|
||||
|
@ -846,3 +846,21 @@ minetest.register_node("default:rail", {
|
||||
walkable = false,
|
||||
groups = {choppy = 1, attached_node = 1},
|
||||
})
|
||||
|
||||
-- fences
|
||||
|
||||
default.register_fence("default:fence_wood", {
|
||||
material = "default:wood",
|
||||
})
|
||||
|
||||
default.register_fence("default:fence_cobble", {
|
||||
material = "default:cobble",
|
||||
})
|
||||
|
||||
default.register_fence("default:fence_jungle_wood", {
|
||||
material = "default:jungle_wood",
|
||||
})
|
||||
|
||||
default.register_fence("default:fence_quartz", {
|
||||
material = "default:quartz",
|
||||
})
|
||||
|
Before Width: | Height: | Size: 533 B After Width: | Height: | Size: 506 B |
@ -10,7 +10,7 @@ local pipe_form = pipe_form..default.itemslot_bg(0,3.08,8,3)
|
||||
|
||||
minetest.register_node("pipe:pipe", {
|
||||
description = "Pipe",
|
||||
tiles = {"pipe_top.png", "pipe_side.png"},
|
||||
tiles = {"pipe_top.png", "pipe_bottom.png", "pipe_side.png"},
|
||||
groups = {choppy = 3},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
@ -18,7 +18,7 @@ minetest.register_node("pipe:pipe", {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.1, -0.1, -0.5, 0.1, 0.1, 0.5},
|
||||
{-5/32, -5/32, -0.5, 5/32, 5/32, 0.5},
|
||||
},
|
||||
},
|
||||
on_construct = function(pos)
|
||||
@ -111,7 +111,7 @@ minetest.register_abm({
|
||||
|
||||
blueprint.register_blueprint("pipe", {
|
||||
description = "Pipe",
|
||||
materials = {"furnace:iron_plate"},
|
||||
materials = {"default:wood"},
|
||||
out = "pipe:pipe",
|
||||
color = "blue"
|
||||
})
|
||||
|
BIN
mods/pipe/textures/pipe_bottom.png
Normal file
After Width: | Height: | Size: 226 B |
Before Width: | Height: | Size: 234 B After Width: | Height: | Size: 198 B |
Before Width: | Height: | Size: 288 B After Width: | Height: | Size: 254 B |