Mito551 wrote:that's quite amazing. i'm suprised i haven't came across this topic.
keep up the good work!
Jalo wrote:I wish you can, make a block that, can be together with the, stairs like the end, of it like this part. but I think it not possble.
node_dig
not diggable
shadowwraith wrote:Hi i've hit a problem when trying to remove the milling machine. once placed it cannot be removed no matter what i use, ive looked in debug.txt and found the following error messagenode_dig
not diggable
I'm on Minetest 0.4.4-d1 ubuntu 12.10 Daily build
Did you check if you emptied the milling machine?
noncubic.register_slope_edge_etc("kpomod:white_brick",
{cracky=3},
{"kpomod_white_brick.png"},
"White Brick Slope",
"White Brick Slope Lying",
"White Brick Slope Upside Down",
"White Brick Slope Edge",
"White Brick Slope Inner Edge",
"White Brick Slope Upside Down Edge",
"White Brick Slope Upside Down Inner Edge",
"White Brick Pyramid",
"White Brick Spike",
"White Brick One Curved Edge Block",
"White Brick Two Curved Edge Block",
"White Brick Cylinder",
"White Brick Cylinder Horizontal",
"White Brick Sphere",
"White Brick Element Straight",
"White Brick Element Edge",
"White Brick Element T",
"White Brick Element Cross",
"White Brick Element End")
noncubic.register_stick_etc("kpomod:white_brick",
{cracky=3},
{"kpomod_white_brick.png"},
"White Brick Stick")
noncubic.register_elements("kpomod:white_brick",
{cracky=3},
{"kpomod_white_brick.png"},
"White Brick Straight Double",
"White Brick Edge Double",
"White Brick T Double",
"White Brick Cross Double",
"White Brick End Double")
-- NonCubic Blocks MOD v1.4
------------by yves_de_beck
----------- modified by kpo to allow registering more materials
-- HERE YOU CAN CHANGE THE DETAIL-LEVEL:
----------------------------------------
detail_level = 16
-- HERE YOU CAN DE/ACTIVATE BACKGROUND FOR MILLING MENU:
--------------------------------------------------------
allow_menu_background = false
-- Includes:
------------
dofile(minetest.get_modpath("noncubic").."/mill.lua")
-- VAR DECLARATION:
-------------------
noncubic = {}
-- REGISTER NONCUBIC FORMS, CREATE MODELS AND RECIPES:
------------------------------------------------------
-- SLOPE
--------
function noncubic.register_slope(recipeitem, groups, images, description)
local slopebox = {}
local detail = detail_level
for i = 0, detail-1 do
slopebox[i+1]={-0.5, (i/detail)-0.5, (i/detail)-0.5, 0.5, (i/detail)-0.5+(1/detail), 0.5}
end
minetest.register_node(":" .. recipeitem .. "_noncubic_slope", {
description = description,
drawtype = "nodebox",
tiles = images,
paramtype = "light",
paramtype2 = "facedir",
walkable = true,
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
},
node_box = {
type = "fixed",
fixed = slopebox,
},
groups = groups,
})
end
-- SLOPE Lying
----------------
function noncubic.register_slope_lying(recipeitem, groups, images, description)
local slopeboxlying = {}
local detail = detail_level
for i = 0, detail-1 do
slopeboxlying[i+1]={(i/detail)-0.5, -0.5, (i/detail)-0.5, (i/detail)-0.5+(1/detail), 0.5 , 0.5}
end
minetest.register_node(":" .. recipeitem .. "_noncubic_slope_lying", {
description = description,
drawtype = "nodebox",
tiles = images,
paramtype = "light",
paramtype2 = "facedir",
walkable = true,
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
},
node_box = {
type = "fixed",
fixed = slopeboxlying,
},
groups = groups,
})
minetest.register_craft({
output = recipeitem .. "_noncubic_slope_lying 1",
recipe = {
{"", "", ""},
{"", recipeitem .. "_noncubic_slope", ""},
{"", "", ""},
},
})
end
-- SLOPE UPSIDE DOWN
--------------------
function noncubic.register_slope_upsdown(recipeitem, groups, images, description)
if subname == "dirt" then
return
end
local slopeupdwnbox = {}
local detail = detail_level
for i = 0, detail-1 do
slopeupdwnbox[i+1]={-0.5, (i/detail)-0.5, (-1*(i/detail))+0.5-(1/detail), 0.5, (i/detail)-0.5+(1/detail), 0.5}
end
minetest.register_node(":" .. recipeitem .. "_noncubic_slope_upsdown", {
description = description,
drawtype = "nodebox",
tiles = images,
paramtype = "light",
paramtype2 = "facedir",
walkable = true,
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
},
node_box = {
type = "fixed",
fixed = slopeupdwnbox,
},
groups = groups,
})
end
-- SLOPE EDGE
-------------
function noncubic.register_slope_edge(recipeitem, groups, images, description)
local slopeboxedge = {}
local detail = detail_level
for i = 0, detail-1 do
slopeboxedge[i+1]={(i/detail)-0.5, -0.5, (i/detail)-0.5, 0.5, (i/detail)-0.5+(1/detail), 0.5}
end
minetest.register_node(":" .. recipeitem .. "_noncubic_slope_edge", {
description = description,
drawtype = "nodebox",
tiles = images,
paramtype = "light",
paramtype2 = "facedir",
walkable = true,
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
},
node_box = {
type = "fixed",
fixed = slopeboxedge,
},
groups = groups,
})
end
-- SLOPE INNER EDGE
-------------------
function noncubic.register_slope_inner_edge(recipeitem, groups, images, description)
minetest.register_node(":" .. recipeitem .. "_noncubic_slope_inner_edge", {
description = description,
drawtype = "nodebox",
tiles = images,
paramtype = "light",
paramtype2 = "facedir",
walkable = true,
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
},
node_box = {
type = "fixed",
fixed = {
-- PART 1
{-0.5, -0.5, -0.5, 0.5, -0.45, 0.5},
{-0.45, -0.5, -0.5, 0.5, -0.4, 0.5},
{-0.4, -0.5, -0.5, 0.5, -0.35, 0.5},
{-0.35, -0.5, -0.5, 0.5, -0.3, 0.5},
{-0.3, -0.5, -0.5, 0.5, -0.25, 0.5},
{-0.25, -0.5, -0.5, 0.5, -0.2, 0.5},
{-0.2, -0.5, -0.5, 0.5, -0.15, 0.5},
{-0.15, -0.5, -0.5, 0.5, -0.1, 0.5},
{-0.1, -0.5, -0.5, 0.5, -0.05, 0.5},
{-0.05, -0.5, -0.5, 0.5, 0, 0.5},
{0, -0.5, -0.5, 0.5, 0.05, 0.5},
{0.05, -0.5, -0.5, 0.5, 0.1, 0.5},
{0.1, -0.5, -0.5, 0.5, 0.15, 0.5},
{0.15, -0.5, -0.5, 0.5, 0.2, 0.5},
{0.2, -0.5, -0.5, 0.5, 0.25, 0.5},
{0.25, -0.5, -0.5, 0.5, 0.3, 0.5},
{0.3, -0.5, -0.5, 0.5, 0.35, 0.5},
{0.35, -0.5, -0.5, 0.5, 0.4, 0.5},
{0.4, -0.5, -0.5, 0.5, 0.45, 0.5},
{0.45, -0.5, -0.5, 0.5, 0.5, 0.5},
-- PART 2
{-0.5, -0.5, -0.45, 0.5, -0.45, 0.5},
{-0.5, -0.5, -0.4, 0.5, -0.4, 0.5},
{-0.5, -0.5, -0.35, 0.5, -0.35, 0.5},
{-0.5, -0.5, -0.3, 0.5, -0.3, 0.5},
{-0.5, -0.5, -0.25, 0.5, -0.25, 0.5},
{-0.5, -0.5, -0.2, 0.5, -0.2, 0.5},
{-0.5, -0.5, -0.15, 0.5, -0.15, 0.5},
{-0.5, -0.5, -0.1, 0.5, -0.1, 0.5},
{-0.5, -0.5, -0.05, 0.5, -0.05, 0.5},
{-0.5, -0.5, 0, 0.5, 0, 0.5},
{-0.5, -0.5, 0.05, 0.5, 0.05, 0.5},
{-0.5, -0.5, 0.1, 0.5, 0.1, 0.5},
{-0.5, -0.5, 0.15, 0.5, 0.15, 0.5},
{-0.5, -0.5, 0.2, 0.5, 0.2, 0.5},
{-0.5, -0.5, .25, 0.5, 0.25, 0.5},
{-0.5, -0.5, 0.3, 0.5, 0.3, 0.5},
{-0.5, -0.5, 0.35, 0.5, 0.35, 0.5},
{-0.5, -0.5, 0.4, 0.5, 0.4, 0.5},
{-0.5, -0.5, 0.45, 0.5, 0.45, 0.5},
{-0.5, -0.5, 0.5, 0.5, 0.5, 0.5},
},
},
groups = groups,
})
end
-- SLOPE EDGE UPSIDE DOWN
-------------------------
function noncubic.register_slope_upsdown_edge(recipeitem, groups, images, description)
if recipeitem == "default:dirt" then
return
end
local slopeupdwnboxedge = {}
local detail = detail_level
for i = 0, detail-1 do
slopeupdwnboxedge[i+1]={(-1*(i/detail))+0.5-(1/detail), (i/detail)-0.5, (-1*(i/detail))+0.5-(1/detail), 0.5, (i/detail)-0.5+(1/detail), 0.5}
end
minetest.register_node(":" .. recipeitem .. "_noncubic_slope_upsdown_edge", {
description = description,
drawtype = "nodebox",
tiles = images,
paramtype = "light",
paramtype2 = "facedir",
walkable = true,
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
},
node_box = {
type = "fixed",
fixed = slopeupdwnboxedge,
},
groups = groups,
})
end
-- SLOPE INNER EDGE UPSIDE DOWN
-------------------------------
function noncubic.register_slope_upsdown_inner_edge(recipeitem, groups, images, description)
if recipename == "default:dirt" then
return
end
minetest.register_node(":" .. recipeitem .. "_noncubic_slope_upsdown_inner_edge", {
description = description,
drawtype = "nodebox",
tiles = images,
paramtype = "light",
paramtype2 = "facedir",
walkable = true,
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
},
node_box = {
type = "fixed",
fixed = {
{0.45, -0.5, -0.5, 0.5, -0.45, 0.5},
{0.4, -0.45, -0.5, 0.5, -0.4, 0.5},
{0.35, -0.4, -0.5, 0.5, -0.35, 0.5},
{0.3, -0.35, -0.5, 0.5, -0.3, 0.5},
{0.25, -0.3, -0.5, 0.5, -0.25, 0.5},
{0.2, -0.25, -0.5, 0.5, -0.2, 0.5},
{0.15, -0.2, -0.5, 0.5, -0.15, 0.5},
{0.1, -0.15, -0.5, 0.5, -0.1, 0.5},
{0.05, -0.1, -0.5, 0.5, -0.05, 0.5},
{0, -0.05, -0.5, 0.5, 0, 0.5},
{-0.05, 0, -0.5, 0.5, 0.05, 0.5},
{-0.1, 0.05, -0.5, 0.5, 0.1, 0.5},
{-0.15, 0.1, -0.5, 0.5, 0.15, 0.5},
{-0.2, 0.15, -0.5, 0.5, 0.2, 0.5},
{-0.25, 0.2, -0.5, 0.5, 0.25, 0.5},
{-0.3, 0.25, -0.5, 0.5, 0.3, 0.5},
{-0.35, 0.3, -0.5, 0.5, 0.35, 0.5},
{-0.4, 0.35, -0.5, 0.5, 0.4, 0.5},
{-0.45, 0.4, -0.5, 0.5, 0.45, 0.5},
{-0.5, 0.45, -0.5, 0.5, 0.5, 0.5},
{-0.5, -0.5, 0.45, 0.5, -0.45, 0.5},
{-0.5, -0.45, 0.4, 0.5, -0.4, 0.5},
{-0.5, -0.4, 0.35, 0.5, -0.35, 0.5},
{-0.5, -0.35, 0.3, 0.5, -0.3, 0.5},
{-0.5, -0.3, 0.25, 0.5, -0.25, 0.5},
{-0.5, -0.25, 0.2, 0.5, -0.2, 0.5},
{-0.5, -0.2, 0.15, 0.5, -0.15, 0.5},
{-0.5, -0.15, 0.1, 0.5, -0.1, 0.5},
{-0.5, -0.1, 0.05, 0.5, -0.05, 0.5},
{-0.5, -0.05, 0, 0.5, 0, 0.5},
{-0.5, 0, -0.05, 0.5, 0.05, 0.5},
{-0.5, 0.05, -0.1, 0.5, 0.1, 0.5},
{-0.5, 0.1, -0.15, 0.5, 0.15, 0.5},
{-0.5, 0.15, -0.2, 0.5, 0.2, 0.5},
{-0.5, 0.2, -0.25, 0.5, 0.25, 0.5},
{-0.5, 0.25, -0.3, 0.5, 0.3, 0.5},
{-0.5, 0.3, -0.35, 0.5, 0.35, 0.5},
{-0.5, 0.35, -0.4, 0.5, 0.4, 0.5},
{-0.5, 0.4, -0.45, 0.5, 0.45, 0.5},
{-0.5, 0.45, -0.5, 0.5, 0.5, 0.5},
},
},
groups = groups,
})
end
-- PYRAMID
----------
function noncubic.register_pyramid(recipeitem, groups, images, description)
local pyrabox = {}
local detail = detail_level/2
for i = 0, detail-1 do
pyrabox[i+1]={(i/detail/2)-0.5, (i/detail/2)-0.5, (i/detail/2)-0.5, 0.5-(i/detail/2), (i/detail/2)-0.5+(1/detail), 0.5-(i/detail/2)}
end
minetest.register_node(":" .. recipeitem .. "_noncubic_pyramid", {
description = description,
drawtype = "nodebox",
tiles = images,
paramtype = "light",
paramtype2 = "facedir",
walkable = true,
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
},
node_box = {
type = "fixed",
fixed = pyrabox,
},
groups = groups,
})
end
-- SPIKE
--------
function noncubic.register_spike(recipeitem, groups, images, description)
if recipename == "default:dirt" then
return
end
local spikebox = {}
local detail = detail_level
for i = 0, detail-1 do
spikebox[i+1]={(i/detail/2)-0.5, (i/detail/2)-0.5, (i/detail/2)-0.5, 0.5-(i/detail/2), (i/detail)-0.5+(1/detail), 0.5-(i/detail/2)}
end
minetest.register_node(":" .. recipeitem .. "_noncubic_spike", {
description = description,
drawtype = "nodebox",
tiles = images,
paramtype = "light",
paramtype2 = "facedir",
walkable = true,
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
},
node_box = {
type = "fixed",
fixed = spikebox,
},
groups = groups,
})
end
-- Block one curved edge
------------------------
function noncubic.register_onecurvededge(recipeitem, groups, images, description)
local quartercyclebox = {}
local detail = detail_level*2
local sehne
for i = (detail/2)-1, detail-1 do
sehne = math.sqrt(0.25 - (((i/detail)-0.5)^2))
quartercyclebox[i]={-0.5, -0.5, -sehne, 0.5, (i/detail)+(1/detail)-0.5, 0.5}
end
minetest.register_node(":" .. recipeitem .. "_noncubic_onecurvededge", {
description = description,
drawtype = "nodebox",
tiles = images,
paramtype = "light",
paramtype2 = "facedir",
walkable = true,
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
},
node_box = {
type = "fixed",
fixed = quartercyclebox,
},
groups = groups,
})
end
-- Block two curved edges
-------------------------
function noncubic.register_twocurvededge(recipeitem, groups, images, description)
local quartercyclebox2 = {}
local detail = detail_level*2
local sehne
for i = (detail/2)-1, detail-1 do
sehne = math.sqrt(0.25 - (((i/detail)-0.5)^2))
quartercyclebox2[i]={-sehne, -0.5, -sehne, 0.5, (i/detail)+(1/detail)-0.5, 0.5}
end
minetest.register_node(":" .. recipeitem .. "_noncubic_twocurvededge", {
description = description,
drawtype = "nodebox",
tiles = images,
paramtype = "light",
paramtype2 = "facedir",
walkable = true,
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
},
node_box = {
type = "fixed",
fixed = quartercyclebox2,
},
groups = groups,
})
minetest.register_craft({
output = recipeitem .. "_noncubic_twocurvededge 3",
recipe = {
{"", "", ""},
{recipeitem .. "_noncubic_onecurvededge", "", ""},
{recipeitem .. "_noncubic_onecurvededge", recipeitem .. "_noncubic_onecurvededge", ""},
},
})
end
-- Cylinder
-----------
function noncubic.register_cylinder(recipeitem, groups, images, description)
if recipename == "default:dirt" then
return
end
local cylbox = {}
local detail = detail_level
local sehne
for i = 1, detail-1 do
sehne = math.sqrt(0.25 - (((i/detail)-0.5)^2))
cylbox[i]={(i/detail)-0.5, -0.5, -sehne, (i/detail)+(1/detail)-0.5, 0.5, sehne}
end
minetest.register_node(":" .. recipeitem .. "_noncubic_cylinder", {
description = description,
drawtype = "nodebox",
tiles = images,
paramtype = "light",
paramtype2 = "facedir",
walkable = true,
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
},
node_box = {
type = "fixed",
fixed = cylbox,
},
groups = groups,
})
minetest.register_craft({
output = recipeitem .. "_noncubic_cylinder 1",
recipe = {
{"", "", ""},
{"", recipeitem .. "_noncubic_cylinder_horizontal", ""},
{"", "", ""},
},
})
end
-- Cylinder Horizontal
----------------------
function noncubic.register_cylinder_horizontal(recipeitem, groups, images, description)
if recipename == "default:dirt" then
return
end
local cylbox_horizontal = {}
local detail = detail_level
local sehne
for i = 1, detail-1 do
sehne = math.sqrt(0.25 - (((i/detail)-0.5)^2))
cylbox_horizontal[i]={-0.5, (i/detail)-0.5, -sehne, 0.5, (i/detail)+(1/detail)-0.5, sehne}
end
minetest.register_node(":" .. recipeitem .. "_noncubic_cylinder_horizontal", {
description = description,
drawtype = "nodebox",
tiles = images,
paramtype = "light",
paramtype2 = "facedir",
walkable = true,
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
},
node_box = {
type = "fixed",
fixed = cylbox_horizontal,
},
groups = groups,
})
minetest.register_craft({
output = recipeitem .. "_noncubic_cylinder_horizontal 1",
recipe = {
{"", "", ""},
{"", recipeitem .. "_noncubic_cylinder", ""},
{"", "", ""},
},
})
end
-- Sphere
---------
function noncubic.register_sphere(recipeitem, groups, images, description)
if recipename == "default:dirt" then
return
end
local spherebox = {}
local detail = detail_level
local sehne
for i = 1, detail-1 do
sehne = math.sqrt(0.25 - (((i/detail)-0.5)^2))
spherebox[i]={-sehne, (i/detail)-0.5, -sehne, sehne, (i/detail)+(1/detail)-0.5, sehne}
end
minetest.register_node(":" .. recipeitem .. "_noncubic_cylinder_sphere", {
description = description,
drawtype = "nodebox",
tiles = images,
paramtype = "light",
paramtype2 = "facedir",
walkable = true,
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
},
node_box = {
type = "fixed",
fixed = spherebox,
},
groups = groups,
})
end
-- Element straight
-------------------
function noncubic.register_element_straight(recipeitem, groups, images, description)
minetest.register_node(":" .. recipeitem .. "_noncubic_element_straight", {
description = description,
drawtype = "nodebox",
tiles = images,
paramtype = "light",
paramtype2 = "facedir",
walkable = true,
selection_box = {
type = "fixed",
fixed = {-0.3, -0.5, -0.5, 0.3, 0, 0.5},
},
node_box = {
type = "fixed",
fixed = {
{-0.3, -0.5, -0.5, 0.3, 0, 0.5},
},
},
groups = groups,
})
end
-- Element Edge
---------------
function noncubic.register_element_edge(recipeitem, groups, images, description)
minetest.register_node(":" .. recipeitem .. "_noncubic_element_edge", {
description = description,
drawtype = "nodebox",
tiles = images,
paramtype = "light",
paramtype2 = "facedir",
walkable = true,
selection_box = {
type = "fixed",
fixed = {
{-0.3, -0.5, -0.5, 0.3, 0, 0.3},
{-0.5, -0.5, -0.3, -0.3, 0, 0.3},
},
},
node_box = {
type = "fixed",
fixed = {
{-0.3, -0.5, -0.5, 0.3, 0, 0.3},
{-0.5, -0.5, -0.3, -0.3, 0, 0.3},
},
},
groups = groups,
})
end
-- Element T
------------
function noncubic.register_element_t(recipeitem, groups, images, description)
minetest.register_node(":" .. recipeitem .. "_noncubic_element_t", {
description = description,
drawtype = "nodebox",
tiles = images,
paramtype = "light",
paramtype2 = "facedir",
walkable = true,
selection_box = {
type = "fixed",
fixed = {
{-0.3, -0.5, -0.5, 0.3, 0, 0.3},
{-0.5, -0.5, -0.3, -0.3, 0, 0.3},
{0.3, -0.5, -0.3, 0.5, 0, 0.3},
},
},
node_box = {
type = "fixed",
fixed = {
{-0.3, -0.5, -0.5, 0.3, 0, 0.3},
{-0.5, -0.5, -0.3, -0.3, 0, 0.3},
{0.3, -0.5, -0.3, 0.5, 0, 0.3},
},
},
groups = groups,
})
end
-- Element Cross
----------------
function noncubic.register_element_cross(recipeitem, groups, images, description)
minetest.register_node(":" .. recipeitem .. "_noncubic_element_cross", {
description = description,
drawtype = "nodebox",
tiles = images,
paramtype = "light",
paramtype2 = "facedir",
walkable = true,
selection_box = {
type = "fixed",
fixed = {
{0.3, -0.5, -0.3, 0.5, 0, 0.3},
{-0.3, -0.5, -0.5, 0.3, 0, 0.5},
{-0.5, -0.5, -0.3, -0.3, 0, 0.3},
},
},
node_box = {
type = "fixed",
fixed = {
{0.3, -0.5, -0.3, 0.5, 0, 0.3},
{-0.3, -0.5, -0.5, 0.3, 0, 0.5},
{-0.5, -0.5, -0.3, -0.3, 0, 0.3},
},
},
groups = groups,
})
end
-- Element End
--------------
function noncubic.register_element_end(recipeitem, groups, images, description)
minetest.register_node(":" .. recipeitem .. "_noncubic_element_end", {
description = description,
drawtype = "nodebox",
tiles = images,
paramtype = "light",
paramtype2 = "facedir",
walkable = true,
selection_box = {
type = "fixed",
fixed = {-0.3, -0.5, -0.3, 0.3, 0, 0.5},
},
node_box = {
type = "fixed",
fixed = {-0.3, -0.5, -0.3, 0.3, 0, 0.5},
},
groups = groups,
})
end
-- Element straight DOUBLE
--------------------------
function noncubic.register_element_straight_double(recipeitem, groups, images, description)
minetest.register_node(":" .. recipeitem .. "_noncubic_element_straight_double", {
description = description,
drawtype = "nodebox",
tiles = images,
paramtype = "light",
paramtype2 = "facedir",
walkable = true,
selection_box = {
type = "fixed",
fixed = {-0.3, -0.5, -0.5, 0.3, 0.5, 0.5},
},
node_box = {
type = "fixed",
fixed = {
{-0.3, -0.5, -0.5, 0.3, 0.5, 0.5},
},
},
groups = groups,
})
minetest.register_craft({
output = recipeitem .. "_noncubic_element_straight_double 1",
recipe = {
{"", "", ""},
{"", recipeitem .. "_noncubic_element_straight", ""},
{"", recipeitem .. "_noncubic_element_straight", ""},
},
})
end
-- Element Edge DOUBLE
----------------------
function noncubic.register_element_edge_double(recipeitem, groups, images, description)
minetest.register_node(":" .. recipeitem .. "_noncubic_element_edge_double", {
description = description,
drawtype = "nodebox",
tiles = images,
paramtype = "light",
paramtype2 = "facedir",
walkable = true,
selection_box = {
type = "fixed",
fixed = {
{-0.3, -0.5, -0.5, 0.3, 0.5, 0.3},
{-0.5, -0.5, -0.3, -0.3, 0.5, 0.3},
},
},
node_box = {
type = "fixed",
fixed = {
{-0.3, -0.5, -0.5, 0.3, 0.5, 0.3},
{-0.5, -0.5, -0.3, -0.3, 0.5, 0.3},
},
},
groups = groups,
})
minetest.register_craft({
output = recipeitem .. "_noncubic_element_edge_double 1",
recipe = {
{"", "", ""},
{"", recipeitem .. "_noncubic_element_edge", ""},
{"", recipeitem .. "_noncubic_element_edge", ""},
},
})
end
-- Element T DOUBLE
-------------------
function noncubic.register_element_t_double(recipeitem, groups, images, description)
minetest.register_node(":" .. recipeitem .. "_noncubic_element_t_double", {
description = description,
drawtype = "nodebox",
tiles = images,
paramtype = "light",
paramtype2 = "facedir",
walkable = true,
selection_box = {
type = "fixed",
fixed = {
{-0.3, -0.5, -0.5, 0.3, 0.5, 0.3},
{-0.5, -0.5, -0.3, -0.3, 0.5, 0.3},
{0.3, -0.5, -0.3, 0.5, 0.5, 0.3},
},
},
node_box = {
type = "fixed",
fixed = {
{-0.3, -0.5, -0.5, 0.3, 0.5, 0.3},
{-0.5, -0.5, -0.3, -0.3, 0.5, 0.3},
{0.3, -0.5, -0.3, 0.5, 0.5, 0.3},
},
},
groups = groups,
})
minetest.register_craft({
output = recipeitem .. "_noncubic_element_t_double 1",
recipe = {
{"", "", ""},
{"", recipeitem .. "_noncubic_element_t", ""},
{"", recipeitem .. "_noncubic_element_t", ""},
},
})
end
-- Element Cross Double
-----------------------
function noncubic.register_element_cross_double(recipeitem, groups, images, description)
minetest.register_node(":" .. recipeitem .. "_noncubic_element_cross_double", {
description = description,
drawtype = "nodebox",
tiles = images,
paramtype = "light",
paramtype2 = "facedir",
walkable = true,
selection_box = {
type = "fixed",
fixed = {
{0.3, -0.5, -0.3, 0.5, 0.5, 0.3},
{-0.3, -0.5, -0.5, 0.3, 0.5, 0.5},
{-0.5, -0.5, -0.3, -0.3, 0.5, 0.3},
},
},
node_box = {
type = "fixed",
fixed = {
{0.3, -0.5, -0.3, 0.5, 0.5, 0.3},
{-0.3, -0.5, -0.5, 0.3, 0.5, 0.5},
{-0.5, -0.5, -0.3, -0.3, 0.5, 0.3},
},
},
groups = groups,
})
minetest.register_craft({
output = recipeitem .. "_noncubic_element_cross_double 1",
recipe = {
{"", "", ""},
{"", recipeitem .. "_noncubic_element_cross", ""},
{"", recipeitem .. "_noncubic_element_cross", ""},
},
})
end
-- Element End Double
---------------------
function noncubic.register_element_end_double(recipeitem, groups, images, description)
minetest.register_node(":" .. recipeitem .. "_noncubic_element_end_double", {
description = description,
drawtype = "nodebox",
tiles = images,
paramtype = "light",
paramtype2 = "facedir",
walkable = true,
selection_box = {
type = "fixed",
fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.5},
},
node_box = {
type = "fixed",
fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.5},
},
groups = groups,
})
minetest.register_craft({
output = recipeitem .. "_noncubic_element_end_double 1",
recipe = {
{"", "", ""},
{"", recipeitem .. "_noncubic_element_end", ""},
{"", recipeitem .. "_noncubic_element_end", ""},
},
})
end
-- STICK
--------
function noncubic.register_stick(recipeitem, groups, images, description)
minetest.register_node(":" .. recipeitem .. "_noncubic_stick", {
description = description,
drawtype = "nodebox",
tiles = images,
paramtype = "light",
paramtype2 = "facedir",
walkable = true,
selection_box = {
type = "fixed",
fixed = {-0.15, -0.5, -0.15, 0.15, 0.5, 0.15},
},
node_box = {
type = "fixed",
fixed = {-0.15, -0.5, -0.15, 0.15, 0.5, 0.15},
},
groups = groups,
})
minetest.register_craft({
output = recipeitem .. "_noncubic_stick 8",
recipe = {
{'default:stick', "", ""},
{"", "", ""},
{recipeitem, "", ""},
},
})
end
-- REGISTER NEW NONCUBIC's PART 2: noncubic.register_element_end(subname, recipeitem, groups, images, desc_element_xyz)
-----------------------------------------------------------------------------------------------------------------------
function noncubic.register_slope_edge_etc(recipeitem, groups, images, desc_slope, desc_slope_lying, desc_slope_upsdown, desc_slope_edge, desc_slope_inner_edge, desc_slope_upsdwn_edge, desc_slope_upsdwn_inner_edge, desc_pyramid, desc_spike, desc_onecurvededge, desc_twocurvededge, desc_cylinder, desc_cylinder_horizontal, desc_sphere, desc_element_straight, desc_element_edge, desc_element_t, desc_element_cross, desc_element_end)
noncubic.register_slope(recipeitem, groups, images, desc_slope)
noncubic.register_slope_lying(recipeitem, groups, images, desc_slope_lying)
noncubic.register_slope_upsdown(recipeitem, groups, images, desc_slope_upsdown)
noncubic.register_slope_edge(recipeitem, groups, images, desc_slope_edge)
noncubic.register_slope_inner_edge(recipeitem, groups, images, desc_slope_inner_edge)
noncubic.register_slope_upsdown_edge(recipeitem, groups, images, desc_slope_upsdwn_edge)
noncubic.register_slope_upsdown_inner_edge(recipeitem, groups, images, desc_slope_upsdwn_inner_edge)
noncubic.register_pyramid(recipeitem, groups, images, desc_pyramid)
noncubic.register_spike(recipeitem, groups, images, desc_spike)
noncubic.register_onecurvededge(recipeitem, groups, images, desc_onecurvededge)
noncubic.register_twocurvededge(recipeitem, groups, images, desc_twocurvededge)
noncubic.register_cylinder(recipeitem, groups, images, desc_cylinder)
noncubic.register_cylinder_horizontal(recipeitem, groups, images, desc_cylinder_horizontal)
noncubic.register_sphere(recipeitem, groups, images, desc_sphere)
noncubic.register_element_straight(recipeitem, groups, images, desc_element_straight)
noncubic.register_element_edge(recipeitem, groups, images, desc_element_edge)
noncubic.register_element_t(recipeitem, groups, images, desc_element_t)
noncubic.register_element_cross(recipeitem, groups, images, desc_element_cross)
noncubic.register_element_end(recipeitem, groups, images, desc_element_end)
end
-- REGISTER MATERIALS AND PROPERTIES FOR NONCUBIC ELEMENTS:
-----------------------------------------------------------
-- WOOD
-------
noncubic.register_slope_edge_etc("default:wood",
{snappy=2,choppy=2,oddly_breakable_by_hand=2},
{"default_wood.png"},
"Wooden Slope",
"Wooden Slope Lying",
"Wooden Slope Upside Down",
"Wooden Slope Edge",
"Wooden Slope Inner Edge",
"Wooden Slope Upside Down Edge",
"Wooden Slope Upside Down Inner Edge",
"Wooden Pyramid",
"Wooden Spike",
"Wooden One Curved Edge Block",
"Wooden Two Curved Edge Block",
"Wooden Cylinder",
"Wooden Cylinder Horizontal",
"Wooden Sphere",
"Wooden Element Straight",
"Wooden Element Edge",
"Wooden Element T",
"Wooden Element Cross",
"Wooden Element End")
-- STONE
--------
noncubic.register_slope_edge_etc("default:stone",
{cracky=3},
{"default_stone.png"},
"Stone Slope",
"Stone Slope Lying",
"Stone Slope Upside Down",
"Stone Slope Edge",
"Stone Slope Inner Edge",
"Stone Slope Upside Down Edge",
"Stone Slope Upside Down Inner Edge",
"Stone Pyramid",
"Stone Spike",
"Stone One Curved Edge Block",
"Stone Two Curved Edge Block",
"Stone Cylinder",
"Stote Cylinder Horizontal",
"Stone Sphere",
"Stone Element Straight",
"Stone Element Edge",
"Stone Element T",
"Stone Element Cross",
"Stone Element End")
-- COBBLE
---------
noncubic.register_slope_edge_etc("default:cobble",
{cracky=3},
{"default_cobble.png"},
"Cobble Slope",
"Cobble Slope Lying",
"Cobble Slope Upside Down",
"Cobble Slope Edge",
"Cobble Slope Inner Edge",
"Cobble Slope Upside Down Edge",
"Cobble Slope Upside Down Inner Edge",
"Cobble Pyramid",
"Cobble Spike",
"Cobble One Curved Edge Block",
"Cobble Two Curved Edge Block",
"Cobble Cylinder",
"Cobble Cylinder Horizontal",
"Cobble Sphere",
"Cobble Element Straight",
"Cobble Element Edge",
"Cobble Element T",
"Cobble Element Cross",
"Cobble Element End")
-- BRICK
--------
noncubic.register_slope_edge_etc("default:brick",
{cracky=3},
{"default_brick.png"},
"Brick Slope",
"Brick Slope Upside Down",
"Brick Slope Edge",
"Brick Slope Inner Edge",
"Brick Slope Upside Down Edge",
"Brick Slope Upside Down Inner Edge",
"Brick Pyramid",
"Brick Spike",
"Brick One Curved Edge Block",
"Brick Two Curved Edge Block",
"Brick Cylinder",
"Brick Cylinder Horizontal",
"Brick Sphere",
"Brick Element Straight",
"Brick Element Edge",
"Brick Element T",
"Brick Element Cross",
"Brick Element End")
-- SANDSTONE
------------
noncubic.register_slope_edge_etc("default:sandstone",
{crumbly=2,cracky=2},
{"default_sandstone.png"},
"Sandstone Slope",
"Sandstone Slope Lying",
"Sandstone Slope Upside Down",
"Sandstone Slope Edge",
"Sandstone Slope Inner Edge",
"Sandstone Slope Upside Down Edge",
"Sandstone Slope Upside Down Inner Edge",
"Sandstone Pyramid",
"Sandstone Spike",
"Sandstone One Curved Edge Block",
"Sandstone Two Curved Edge Block",
"Sandstone Cylinder",
"Sandstone Cylinder Horizontal",
"Sandstone Sphere",
"Sandstone Element Straight",
"Sandstone Element Edge",
"Sandstone Element T",
"Sandstone Element Cross",
"Sandstone Element End")
-- LEAVES
---------
noncubic.register_slope_edge_etc("default:leaves",
{snappy=2,choppy=2,oddly_breakable_by_hand=3},
{"bucharest_tree.png"},
"Leaves Slope",
"Leaves Slope Lying",
"Leaves Slope Upside Down",
"Leaves Slope Edge",
"Leaves Slope Inner Edge",
"Leaves Slope Upside Down Edge",
"Leaves Slope Upside Down Inner Edge",
"Leaves Pyramid",
"Leaves Spike",
"Leaves One Curved Edge Block",
"Leaves Two Curved Edge Block",
"Leaves Cylinder",
"Leaves Cylinder Horizontal",
"Leaves Sphere",
"Leaves Element Straight",
"Leaves Element Edge",
"Leaves Element T",
"Leaves Element Cross",
"Leaves Element End")
-- DIRT
-------
noncubic.register_slope_edge_etc("default:dirt",
{snappy=2,choppy=2,oddly_breakable_by_hand=3},
{"default_grass.png", "default_dirt.png", "default_grass.png"},
"Dirt Slope",
"Dirt Slope Lying",
"Dirt Slope Upside Down",
"Dirt Slope Edge",
"Dirt Slope Inner Edge",
"Dirt Slope Upside Down Edge",
"Dirt Slope Upside Down Inner Edge",
"Dirt Pyramid",
"Dirt Spike",
"Dirt One Curved Edge Block",
"Dirt Two Curved Edge Block",
"Dirt Cylinder",
"Dirt Cylinder Horizontal",
"Dirt Sphere",
"Dirt Element Straight",
"Dirt Element Edge",
"Dirt Element T",
"Dirt Element Cross",
"Dirt Element End")
-- TREE
-------
noncubic.register_slope_edge_etc("default:tree",
{snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3},
{"default_tree.png"},
"Tree Slope",
"Tree Slope Lying",
"Tree Slope Upside Down",
"Tree Slope Edge",
"Tree Slope Inner Edge",
"Tree Slope Upside Down Edge",
"Tree Slope Upside Down Inner Edge",
"Tree Pyramid",
"Tree Spike",
"Tree One Curved Edge Block",
"Tree Two Curved Edge Block",
"Tree Cylinder",
"Tree Cylinder Horizontal",
"Tree Sphere",
"Tree Element Straight",
"Tree Element Edge",
"Tree Element T",
"Tree Element Cross",
"Tree Element End")
-- STEEL
--------
noncubic.register_slope_edge_etc("default:steelblock",
{snappy=1,bendy=2,cracky=1,melty=2,level=2},
{"default_steel_block.png"},
"Steel Slope",
"Steel Slope Lying",
"Steel Slope Upside Down",
"Steel Slope Edge",
"Steel Slope Inner Edge",
"Steel Slope Upside Down Edge",
"Steel Slope Upside Down Inner Edge",
"Steel Pyramid",
"Steel Spike",
"Steel One Curved Edge Block",
"Steel Two Curved Edge Block",
"Steel Cylinder",
"Steel Cylinder Horizontal",
"Steel Sphere",
"Steel Element Straight",
"Steel Element Edge",
"Steel Element T",
"Steel Element Cross",
"Steel Element End")
-- REGISTER STICKS: noncubic.register_xyz(recipeitem, groups, images, desc_element_xyz)
------------------------------------------------------------------------------------------------------------
function noncubic.register_stick_etc(recipeitem, groups, images, desc_stick)
noncubic.register_stick(recipeitem, groups, images, desc_stick)
end
-- REGISTER MATERIALS AND PROPERTIES FOR STICKS:
------------------------------------------------
-- WOOD
-------
noncubic.register_stick_etc("default:wood",
{snappy=2,choppy=2,oddly_breakable_by_hand=2},
{"default_wood.png"},
"Wooden Stick")
-- STONE
--------
noncubic.register_stick_etc("default:stone",
{cracky=3},
{"default_stone.png"},
"Stone Stick")
-- COBBLE
---------
noncubic.register_stick_etc("default:cobble",
{cracky=3},
{"default_cobble.png"},
"Cobble Stick")
-- BRICK
--------
noncubic.register_stick_etc("default:brick",
{cracky=3},
{"default_brick.png"},
"Brick Stick")
-- SANDSTONE
------------
noncubic.register_stick_etc("default:sandstone",
{crumbly=2,cracky=2},
{"default_sandstone.png"},
"Sandstone Stick")
-- LEAVES
---------
noncubic.register_stick_etc("default:leaves",
{snappy=2,choppy=2,oddly_breakable_by_hand=3},
{"bucharest_tree.png"},
"Leaves Stick")
-- TREE
-------
noncubic.register_stick_etc("default:tree",
{snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3,wood=1},
{"default_tree.png"},
"Tree Stick")
-- STEEL
--------
noncubic.register_stick_etc("default:steelblock",
{snappy=1,bendy=2,cracky=1,melty=2,level=2},
{"default_steel_block.png"},
"Steel Stick")
-- REGISTER DOUBLE ELEMNTS: noncubic.register_xyz(recipeitem, groups, images, desc_element_xyz)
----------------------------------------------------------------------------------------------------
function noncubic.register_elements(recipeitem, groups, images, desc_element_straight_double, desc_element_edge_double, desc_element_t_double, desc_element_cross_double, desc_element_end_double)
noncubic.register_element_straight_double(recipeitem, groups, images, desc_element_straight_double)
noncubic.register_element_edge_double(recipeitem, groups, images, desc_element_edge_double)
noncubic.register_element_t_double(recipeitem, groups, images, desc_element_t_double)
noncubic.register_element_cross_double(recipeitem, groups, images, desc_element_cross_double)
noncubic.register_element_end_double(recipeitem, groups, images, desc_element_end_double)
end
-- REGISTER MATERIALS AND PROPERTIES FOR HALF AND NORMAL HEIGHT ELEMENTS:
-------------------------------------------------------------------------
-- WOOD
-------
noncubic.register_elements("default:wood",
{snappy=2,choppy=2,oddly_breakable_by_hand=2},
{"default_wood.png"},
"Wooden Element Straight Double",
"Wooden Element Edge Double",
"Wooden Element T Double",
"Wooden Element Cross Double",
"Wooden Element End Double")
-- STONE
--------
noncubic.register_elements("default:stone",
{cracky=3},
{"default_stone.png"},
"Stone Element Straight Double",
"Stone Element Edge Double",
"Stone Element T Double",
"Stone Element Cross Double",
"Stone Element End Double")
-- COBBLE
---------
noncubic.register_elements("default:cobble",
{cracky=3},
{"default_cobble.png"},
"Cobble Element Straight Double",
"Cobble Element Edge Double",
"Cobble Element T Double",
"Cobble Element Cross Double",
"Cobble Element End Double")
-- BRICK
--------
noncubic.register_elements("default:brick",
{cracky=3},
{"default_brick.png"},
"Brick Element Straight Double",
"Brick Element Edge Double",
"Brick Element T Double",
"Brick Element Cross Double",
"Brick Element End Double")
-- SANDSTONE
------------
noncubic.register_elements("default:sandstone",
{crumbly=2,cracky=2},
{"default_sandstone.png"},
"Sandstone Element Straight Double",
"Sandstone Element Edge Double",
"Sandstone Element T Double",
"Sandstone Element Cross Double",
"Sandstone Element End Double")
-- LEAVES
---------
noncubic.register_elements("default:leaves",
{snappy=2,choppy=2,oddly_breakable_by_hand=3},
{"bucharest_tree.png"},
"Leaves Element Straight Double",
"Leaves Element Edge Double",
"Leaves Element T Double",
"Leaves Element Cross Double",
"Leaves Element End Double")
-- TREE
-------
noncubic.register_elements("default:tree",
{snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3,wood=1},
{"default_tree.png"},
"Tree Element Straight Double",
"Tree Element Edge Double",
"Tree Element T Double",
"Tree Element Cross Double",
"Tree Element End Double")
-- STEEL
--------
noncubic.register_elements("default:steel",
{snappy=1,bendy=2,cracky=1,melty=2,level=2},
{"default_steel_block.png"},
"Steel Element Straight Double",
"Steel Element Edge Double",
"Steel Element T Double",
"Steel Element Cross Double",
"Steel Element End Double")
-- NonCubic Blocks MOD v1.4
------------by yves_de_beck
----------- modified by kpo to allow registering more materials
----------- also optimized a lot of code away in te process.
shape = {}
size = "0"
produces = {}
showbackground = "--"
showlabelin = "label[0,5.5;In:]"
showlabelout = "label[4.5,5.5;Out:]"
minetest.register_node("noncubic:mill", {
description = "Milling Machine",
tiles = {"cnc_top.png", "cnc_bottom.png", "cnc_side.png",
"cnc_side.png", "cnc_side.png", "cnc_front.png"},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
},
},
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
},
groups = {oddly_breakable_by_hand=2, cracky=3, dig_immediate=1},
can_dig = function(pos,player)
local meta = minetest.env:get_meta(pos);
local inv = meta:get_inventory()
if not inv:is_empty("ingot") then
return false
elseif not inv:is_empty("res") then
return false
end
return true
end,
on_construct = function(pos)
local meta = minetest.env:get_meta(pos)
if allow_menu_background == true or allow_menu_background == 1 then
showbackground = "background[-0.15,-0.25;8.40,11.75;milling_background.png]"
end
meta:set_string("formspec", "invsize[8,11;]"..
showlabelin..
"list[current_name;ingot;1,5.5;1,1;]"..
showlabelout..
"list[current_name;res;6,5.5;1,1;]"..
"label[0,0;Choose Milling Program:]"..
"image_button[0,0.5;1,1;slope.png;slope; ]"..
"image_button[1,0.5;1,1;slope_edge.png;slope_edge; ]"..
"image_button[2,0.5;1,1;slope_inner_edge.png;slope_inner_edge; ]"..
"image_button[3,0.5;1,1;pyramid.png;pyramid; ]"..
"image_button[4,0.5;1,1;spike.png;spike; ]"..
"image_button[5,0.5;1,1;cylinder.png;cylinder; ]"..
"image_button[6,0.5;1,1;sphere.png;sphere; ]"..
"image_button[0,1.5;1,1;slope_upsdwn.png;slope_upsdwn; ]"..
"image_button[1,1.5;1,1;slope_edge_upsdwn.png;slope_edge_upsdwn; ]"..
"image_button[2,1.5;1,1;slope_inner_edge_upsdwn.png;slope_inner_edge_upsdwn; ]"..
"image_button[5,1.5;1,1;cylinder_horizontal.png;cylinder_hor; ]"..
"image_button[0,2.5;1,1;slope_lying.png;slope_lying; ]"..
"image_button[1,2.5;1,1;onecurvededge.png;onecurvededge; ]"..
"image_button[2,2.5;1,1;twocurvededge.png;twocurvededge; ]"..
"label[0,3.5;Slim Elements half / normal height:]"..
"image_button[0,4;1,0.5;full.png;full; ]"..
"image_button[0,4.5;1,0.5;half.png;half; ]"..
"image_button[1,4;1,1;element_straight.png;element_straight; ]"..
"image_button[2,4;1,1;element_end.png;element_end; ]"..
"image_button[3,4;1,1;element_cross.png;element_cross; ]"..
"image_button[4,4;1,1;element_t.png;element_t; ]"..
"image_button[5,4;1,1;element_edge.png;element_edge; ]"..
"image_button[7,0.5;1,1;stick.png;stick; ]"..
"list[current_player;main;0,7;8,4;]"..
showbackground)
meta:set_string("infotext", "Milling Machine")
local inv = meta:get_inventory()
inv:set_size("ingot", 1)
inv:set_size("res", 1)
end,
on_receive_fields = function(pos, formname, fields, sender)
-- REGISTER MILLING PROGRAMMS AND OUTPUTS:
------------------------------------------
-- Program for half/full size
if fields["full"] then
size = "1"
return
end
if fields["half"] then
size = "0"
return
end
local meta = minetest.env:get_meta(pos)
local inv = meta:get_inventory()
-- Do nothing if the machine is empty
if inv:is_empty("ingot") then
return
end
-- Select program
if fields["slope"] then
produces = "2"
shape = "_noncubic_slope"
end
if fields["slope_edge"] then
produces = "2"
shape = "_noncubic_slope_edge"
end
if fields["slope_inner_edge"] then
produces = "1"
shape = "_noncubic_slope_inner_edge"
end
if fields["pyramid"] then
produces = "2"
shape = "_noncubic_pyramid"
end
if fields["spike"] then
produces = "1"
shape = "_noncubic_spike"
end
if fields["cylinder"] then
produces = "1"
shape = "_noncubic_cylinder"
end
if fields["cylinder_hor"] then
produces = "1"
shape = "_noncubic_cylinder_horizontal"
end
if fields["sphere"] then
produces = "1"
shape = "_noncubic_cylinder_sphere"
end
if fields["slope_upsdwn"] then
produces = "2"
shape = "_noncubic_slope_upsdown"
end
if fields["slope_edge_upsdwn"] then
produces = "2"
shape = "_noncubic_slope_upsdown_edge"
end
if fields["slope_inner_edge_upsdwn"] then
produces = "1"
shape = "_noncubic_slope_upsdown_inner_edge"
end
if fields["slope_lying"] then
produces = "1"
shape = "_noncubic_slope_lying"
end
if fields["onecurvededge"] then
produces = "1"
shape = "_noncubic_onecurvededge"
end
if fields["twocurvededge"] then
produces = "1"
shape = "_noncubic_twocurvededge"
end
if fields["element_straight"] then
produces = "4"
shape = "_noncubic_element_straight"
if size == "1" then
produces = "2"
shape = "_noncubic_element_straight_double"
end
end
if fields["element_end"] then
produces = "4"
shape = "_noncubic_element_end"
if size == "1" then
produces = "2"
shape = "_noncubic_element_end_double"
end
end
if fields["element_cross"] then
produces = "2"
shape = "_noncubic_element_cross"
if size == "1" then
produces = "1"
shape = "_noncubic_element_cross_double"
end
end
if fields["element_t"] then
produces = "2"
shape = "_noncubic_element_t"
if size == "1" then
produces = "1"
shape = "_noncubic_element_t_double"
end
end
if fields["element_edge"] then
produces = "2"
shape = "_noncubic_element_edge"
if size == "1" then
produces = "1"
shape = "_noncubic_element_edge_double"
end
end
if fields["stick"] then
produces = "8"
shape = "_noncubic_stick"
end
-----------------------------
-----------------------------------------------------
-- Milling
----------
local ingotstack = inv:get_stack("ingot", 1)
local ingotname = ingotstack:get_name()
if minetest.registered_nodes[ingotname .. shape] ~= nil then
inv:add_item("res",ingotname .. shape .. " " .. produces)
ingotstack:take_item()
inv:set_stack("ingot",1,ingotstack)
end
end, -- callback function
})
----------
-- Milling Machine Recipe
-------------------------
minetest.register_craft({
output = 'noncubic:mill',
recipe = {
{'default:cobble', 'default:stick', 'default:cobble'},
{'default:wood', 'default:wood', 'default:wood'},
{'default:stick', "", 'default:stick'},
},
})
-------------------------
I'm continuing the development of this mod. The git is at https://github.com/bas080/noncubic.
Sokomine wrote:The texture was done by VanessaE and is based on the non-cubic block mod. Perhaps you ought to write some praise there as well :-) Here's the thread.
LazyJ wrote:Bas080 wrote:I'm continuing the development of this mod. The git is at https://github.com/bas080/noncubic.
I tried the link but it is broken.
It would be nice if this mod could adapt it's shapes to any block type.
Bas080 wrote:LazyJ wrote:Bas080 wrote:I'm continuing the development of this mod. The git is at https://github.com/bas080/noncubic.
I tried the link but it is broken.
It would be nice if this mod could adapt it's shapes to any block type.
sorry i didn't reply sooner. It's in my simple modpack too together with stairsplus.
Users browsing this forum: No registered users and 17 guests