[Mod] NonCubic Blocks Mod [1.4] [noncubic]

User avatar
Don
Member
 
Posts: 1643
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: [Mod] NonCubic Blocks Mod [1.4] [noncubic]

by Don » Fri Oct 09, 2015 19:57

Nodeboxes help keep the cubic look so in a way they are good. They are also easier to learn how to make. The nodebox editor makes it really easy. The nodebox editor also gives the option to export to mesh. This makes it easier to make mesh nodes without learning to use blender.
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here
 

User avatar
Nathan.S
Member
 
Posts: 913
Joined: Wed Sep 24, 2014 17:47
Location: Bigsby Texas
GitHub: NathanSalapat
IRC: NathanS21
In-game: NathanS21

Re: [Mod] NonCubic Blocks Mod [1.4] [noncubic]

by Nathan.S » Fri Oct 09, 2015 20:05

Correct, a box has a top, bottom, left, right, front, and back so yes, six faces, each face is two triangles so yes you get twelve polys for every nodebox.
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website, and brand new Minetest Modding Course
 

User avatar
jp
Member
 
Posts: 754
Joined: Wed Dec 18, 2013 09:03
Location: France
GitHub: kilbith

Re: [Mod] NonCubic Blocks Mod [1.4] [noncubic]

by jp » Sat Oct 10, 2015 09:20

HulkSmashRocks wrote:Nodeboxes are 6 faces, not 4 though?

Oops, indeed - was tired. Corrected ;) And yes, a nodebox is a mesh with 12 triangles and 8 vertices. Now make the total with 50 nodeboxes in a model, which have been placed thousands of times in a map... Rather scary, isn't it ?

So to sum it up : if you're making a primitive shape, a nodebox model is OK. But if you're trying to make a realistic shape and you autistically stick with the nodeboxes, you should feel ashamed to offer such inefficient and vulgar turd to your users just for avoiding a couple of hours of learning Blender and reaching the excellence. No pain, no gain.
 

Not My Real Account
New member
 
Posts: 2
Joined: Sat Aug 13, 2016 00:29

Re: [Mod] NonCubic Blocks Mod [1.4] [noncubic]

by Not My Real Account » Sat Aug 13, 2016 00:35

I'm unable to craft the milling machine. Has the recipe changed? I'm attempting to craft in in my inventory with (from left to right) a stone brick block, stick, and stone brick block on the top row, three wood planks in the middle row, and a stick, an empty space, and a stick on the bottom row.
 

KCoombes
Member
 
Posts: 412
Joined: Thu Jun 11, 2015 23:19
Location: SW Florida, USA
In-game: Knatt

Re: [Mod] NonCubic Blocks Mod [1.4] [noncubic]

by KCoombes » Sat Aug 13, 2016 01:03

Try this:

output = 'noncubic:mill',
recipe = {
{'default:cobble', 'default:stick', 'default:cobble'},
{'default:wood', 'default:wood', 'default:wood'},
{'default:stick', "", 'default:stick'},
 

User avatar
MineYoshi
Member
 
Posts: 5371
Joined: Wed Jul 08, 2015 13:20

Re: [Mod] NonCubic Blocks Mod [1.4] [noncubic]

by MineYoshi » Sat Aug 13, 2016 18:42

KCoombes wrote:Try this:

output = 'noncubic:mill',
recipe = {
{'default:cobble', 'default:stick', 'default:cobble'},
{'default:wood', 'default:wood', 'default:wood'},
{'default:stick', "", 'default:stick'},


Exactly This:

CobbleStone - Stick - CobbleStone
Wood - Wood - Wood
Stick - Empty - Stick
 

Not My Real Account
New member
 
Posts: 2
Joined: Sat Aug 13, 2016 00:29

Re: [Mod] NonCubic Blocks Mod [1.4] [noncubic]

by Not My Real Account » Sun Aug 14, 2016 03:44

MineYoshi wrote:
KCoombes wrote:Try this:

output = 'noncubic:mill',
recipe = {
{'default:cobble', 'default:stick', 'default:cobble'},
{'default:wood', 'default:wood', 'default:wood'},
{'default:stick', "", 'default:stick'},


Exactly This:

CobbleStone - Stick - CobbleStone
Wood - Wood - Wood
Stick - Empty - Stick

I have tried the recipe that was suggested here, using both planks and "tree" in place of "wood," and still have not succeeded in crafting the milling machine. Does this have something to do with the version of Minetest I am running (0.4.14), or perhaps I have not installed the correct version of the mod? Also, how do I craft doors with this mod?
 

KCoombes
Member
 
Posts: 412
Joined: Thu Jun 11, 2015 23:19
Location: SW Florida, USA
In-game: Knatt

Re: [Mod] NonCubic Blocks Mod [1.4] [noncubic]

by KCoombes » Sun Aug 14, 2016 11:24

Not My Real Account wrote:-snip-
I have tried the recipe that was suggested here, using both planks and "tree" in place of "wood," and still have not succeeded in crafting the milling machine. Does this have something to do with the version of Minetest I am running (0.4.14), or perhaps I have not installed the correct version of the mod? Also, how do I craft doors with this mod?


I have no problems running this mod with 0.4.14. There are no doors in this mod.
 

User avatar
Drachenbauer32
Member
 
Posts: 62
Joined: Wed Aug 28, 2019 18:11

Re: [Mod] NonCubic Blocks Mod [1.4] [noncubic]

by Drachenbauer32 » Wed Oct 09, 2019 22:06

Hello

you made the inner edge slopes different than the rest:
You have a long list of fixed values in the "node_box"-property.

so they do not react.to the detail_level.

I found a way to calculate them like the others:

for the upright one:
Code: Select all
    local detail = detail_level

    local slopebox_1 = {}
    for i = 0, detail - 1 do
        slopebox_1[i + 1] = { -0.5, ( i / detail ) - 0.5, ( i / detail ) - 0.5, 0.5, ( ( i + 1 ) / detail ) - 0.5, 0.5 }
    end

    local slopebox_2 = {}
    for i = 0, detail - 1 do
        slopebox_2[i + 1] = { ( i / detail ) - 0.5, ( i / detail ) - 0.5, -0.5, 0.5, ( ( i + 1 ) / detail ) - 0.5, 0.5 }
    end

    local slopeinneredgebox = {}
    for i = 0, #slopebox_1 do
        slopeinneredgebox_1[i + 1] = slopebox_1[i + 1]
    end
    for i = 0, #slopebox_2 do
        slopeinneredgebox_2[i + 1 + #slopebox_1] = slopebox_2[i + 1]
    end


and for the upside down one:
Code: Select all
    local detail = detail_level

    local slopeupdwnbox_1 = {}
    for i = 0, detail - 1 do
        slopeupdwnbox[i + 1] = { -0.5, -1 * ( ( ( i + 1 ) / detail ) - 0.5 ), ( i / detail ) - 0.5, 0.5, -1 * ( ( i / detail ) - 0.5 ), 0.5 }
    end

    local slopeupdwnbox_2 = {}
    for i = 0, detail - 1 do
        slopeupdwnbox[i + 1] = { ( i / detail ) - 0.5, -1 * ( ( ( i + 1 ) / detail ) - 0.5 ), -0.5, 0.5, -1 * ( ( i / detail ) - 0.5 ), 0.5 }
    end

    local slopeupdwninneredgebox = {}
    for i = 0, #slopeupdwnbox_1 do
        slopeupdwninneredgebox[i + 1] = slopeupdwnbox_1[i + 1]
    end
    for i = 0, #slopeupdwnbox_2 do
        slopeupdwninneredgebox[i + 1 + #slopeupdwnbox_1] = slopeupdwnbox_2[i + 1]
    end


at first it calculates a nodebox list identical to the normal (or upside down) slope.
then it calculates a seccond list, rotated 90° arounf the vertical axis and than it fills both lists into a third list, that goes into the "node_box" property.

another tip:
you have 10 wall elements (name : "element" with the name of it´s shape)
in their "node_box" properties change 0.3 to 0.3125 and -0.3 to -0.3125 to make the walls exact 10 texture-pixels thick.
For the "stick" change 0.15 to 0.125 and -0.15 to -0.125 and it´s base-square fit´s exact 4x4 texture-pixels.

And i´m looking for a way to fix a little issue with the cylinders and sphere:
the last nodebox for them is invisible, because it´s size in one direction is 0.
So they don´t touch the neighbor-node on this side (for the horizontal clynder and the sphere it´s below them and for the upright cylinder it´s one side).

They need one more layer of the maximum whide
Last edited by Drachenbauer32 on Sun Oct 13, 2019 15:38, edited 7 times in total.
 

User avatar
Drachenbauer32
Member
 
Posts: 62
Joined: Wed Aug 28, 2019 18:11

Re: [Mod] NonCubic Blocks Mod [1.4] [noncubic]

by Drachenbauer32 » Fri Oct 11, 2019 12:44

Now i found the solution for the cylinders and the sphere:
Code: Select all
    local detail = detail_level
    local sehne

    local cylbox = {}
    for i = 1, detail do
        if i <= detail / 2 then
            sehne = math.sqrt( 0.25 - ( ( ( i / detail ) - 0.5 ) ^ 2 ) )
        elseif i == detail / 2 + 0.5 then
            sehne = 0.5                   -- For uneven numbers at detail_level
        else
            sehne = math.sqrt( 0.25 - ( ( ( ( i - 1 ) / detail ) - 0.5 ) ^ 2 ) )
        end
        cylbox[i] = { ( ( i - 1 ) / detail ) - 0.5, -0.5, -sehne, ( i / detail ) - 0.5, 0.5, sehne }
    end


this is for the upright cylinder.

And for the other two it looks similar, just with their different nodebox-adding-line at the end of the code-snippet.

With this code they touch all sides of the surrounding node-cube.

For the pyramid (the half block high one) i made this:
Code: Select all
    local detail = detail_level
    local number
    if (detail % 2 == 0) then
        number = 1
    else
        number = 0.5
    end

    local pyrabox = {}
    for i = 0, ( detail / 2 ) - number do
        pyrabox[i + 1] = { ( i / detail ) - 0.5, ( i / detail ) - 0.5, ( i / detail ) - 0.5, 0.5 - ( i / detail ), ( ( i + 1 ) / detail ) - 0.5, 0.5 - ( i / detail ) }
    end


and for the curved edges i make this
Code: Select all
    local detail = detail_level
    local sehne

    local quartercyclebox = {}
    for i = 1, detail do
        if i >= detail / 2 then
            sehne = math.sqrt(0.25 - ( ( ( ( i - 1 ) / detail ) - 0.5 ) ^ 2 ) )
        else
            sehne = 0.5                   -- For uneven numbers at detail_level
        end
        quartercyclebox[i] = { -0.5, ( ( i - 1 ) / detail ) - 0.5, -sehne, 0.5, ( i / detail ) - 0.5, 0.5 }
    end

So their box-layers have the same hight as at all other detail_level-sensitive nodes.
they are now all made from a stack of flat rectangle layers.
the thicknes of a layer is: full node size / deteil_level.

all code snippets in this post can use an uneven number as the detail_level, too.

a tip for all detail_level-sensitive nodes:
use the calculated list as the selection-box too and the player can move along the shape of the node and see the highlight-frames fitting the shape, if pointing it. .

I also found a way to write some calculations (wich use the detail-value 2x) simpler (that they now use the detail-value only 1x)
I turned "(i / detail) - 0.5 + (1 / detail)" into "( ( i + 1 ) / detail ) - 0.5",
"(i / detail) - 0.5 - (1 / detail)" into "( ( i - 1 ) / detail ) - 0.5" and
"(-1 * (i / detail)) + 0.5 - (1 / detail)" into "( -1 * ( ( i + 1 ) / detail ) ) + 0.5".
For each of theese three lines both variants have the same result, but the seccond variant looks simpler.

i norw placed them into the code-snippets, i placed in my two posts here.
Last edited by Drachenbauer32 on Sat Oct 12, 2019 17:24, edited 1 time in total.
 

User avatar
Drachenbauer32
Member
 
Posts: 62
Joined: Wed Aug 28, 2019 18:11

Re: [Mod] NonCubic Blocks Mod [1.4] [noncubic]

by Drachenbauer32 » Sat Oct 12, 2019 11:25

Here is now the whoole code with all my modifications on the existing nodes.:

Code: Select all
-- NonCubic Blocks MOD v1.4
------------ by yves_de_beck




-- 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(subname, recipeitem, groups, images, description)

    local detail = detail_level

    local slopebox = {}
    for i = 0, detail - 1 do
        slopebox[i + 1] = { -0.5, ( i / detail ) - 0.5, ( i / detail ) - 0.5, 0.5, ( ( i + 1 ) / detail ) - 0.5, 0.5 }
    end

    minetest.register_node("noncubic:slope_" .. subname, {
        description = description,
        drawtype = "nodebox",
        tiles = images,
        paramtype = "light",
        paramtype2 = "facedir",
        walkable = true,
        selection_box = {
            type = "fixed",
            fixed = slopebox,
        },
        node_box = {
            type = "fixed",
            fixed = slopebox,
        },
        groups = groups,
    })
    minetest.register_craft({
        output = 'noncubic:slope_' .. subname .. ' 6',
        recipe = {
            { recipeitem, "", "" },
            { recipeitem, recipeitem, "" },
            { recipeitem, recipeitem, recipeitem },
        },
    })
    minetest.register_craft({
        output = 'noncubic:slope_' .. subname .. ' 6',
        recipe = {
            { "", "", recipeitem },
            { "", recipeitem, recipeitem },
            { recipeitem, recipeitem, recipeitem },
        },
    })
end


-- SLOPE Lying
----------------
function noncubic.register_slope_lying(subname, recipeitem, groups, images, description)

    local detail = detail_level

    local slopeboxlying = {}
    for i = 0, detail - 1 do
        slopeboxlying[i + 1] = { ( i / detail ) - 0.5, -0.5, ( i / detail ) - 0.5, ( ( i + 1 ) / detail ) - 0.5, 0.5, 0.5 }
    end

    minetest.register_node("noncubic:slope_lying_" .. subname, {
        description = description,
        drawtype = "nodebox",
        tiles = images,
        paramtype = "light",
        paramtype2 = "facedir",
        walkable = true,
        selection_box = {
            type = "fixed",
            fixed = slopeboxlying,
        },
        node_box = {
            type = "fixed",
            fixed = slopeboxlying,
        },
        groups = groups,
    })
    minetest.register_craft({
        output = 'noncubic:slope_lying_' .. subname .. ' 1',
        recipe = {
            { "", "", "" },
            { "", 'noncubic:slope_' .. subname, "" },
            { "", "", "" },
        },
    })
end

-- SLOPE EDGE
-------------
function noncubic.register_slope_edge(subname, recipeitem, groups, images, description)

    local detail = detail_level

    local slopeboxedge = {}
    for i = 0, detail - 1 do
        slopeboxedge[i + 1] = { ( i / detail ) - 0.5, ( i / detail ) - 0.5, ( i / detail ) - 0.5, 0.5, ( ( i + 1 ) / detail ) - 0.5, 0.5 }
    end

    minetest.register_node("noncubic:slope_edge_" .. subname, {
        description = description,
        drawtype = "nodebox",
        tiles = images,
        paramtype = "light",
        paramtype2 = "facedir",
        walkable = true,
        selection_box = {
            type = "fixed",
            fixed = slopeboxedge,
        },
        node_box = {
            type = "fixed",
            fixed = slopeboxedge,
        },
        groups = groups,
    })
    minetest.register_craft({
        output = 'noncubic:slope_edge_' .. subname .. ' 3',
        recipe = {
            { "", "", "" },
            { recipeitem, "", "" },
            { recipeitem, recipeitem, "" },
        },
    })
    minetest.register_craft({
        output = 'noncubic:slope_edge_' .. subname .. ' 3',
        recipe = {
            { "", "", "" },
            { "", "", recipeitem },
            { "", recipeitem, recipeitem },
        },
    })
end

-- SLOPE INNER EDGE
-------------------
function noncubic.register_slope_inner_edge(subname, recipeitem, groups, images, description)

    local detail = detail_level

    local slopebox_1 = {}
    for i = 0, detail - 1 do
        slopebox_1[i + 1] = { -0.5, ( i / detail ) - 0.5, ( i / detail ) - 0.5, 0.5, ( ( i + 1 ) / detail ) - 0.5, 0.5 }
    end

    local slopebox_2 = {}
    for i = 0, detail - 1 do
        slopebox_2[i + 1] = { ( i / detail ) - 0.5, ( i / detail ) - 0.5, -0.5, 0.5, ( ( i + 1 ) / detail ) - 0.5, 0.5 }
    end

    local slopeinneredgebox = {}
    for i = 0, #slopebox_1 do
        slopeinneredgebox[i + 1] = slopebox_1[i + 1]
    end
    for i = 0, #slopebox_2 do
        slopeinneredgebox[i + 1 + detail] = slopebox_2[i + 1]
    end

    minetest.register_node("noncubic:slope_inner_edge_" .. subname, {
        description = description,
        drawtype = "nodebox",
        tiles = images,
        paramtype = "light",
        paramtype2 = "facedir",
        walkable = true,
        selection_box = {
            type = "fixed",
            fixed = slopeinneredgebox,
        },
        node_box = {
            type = "fixed",
            fixed = slopeinneredgebox,
        },
        groups = groups,
    })
    minetest.register_craft({
        output = 'noncubic:slope_inner_edge_' .. subname .. ' 3',
        recipe = {
            { "", "", recipeitem },
            { recipeitem, "", "" },
            { recipeitem, recipeitem, "" },
        },
    })
    minetest.register_craft({
        output = 'noncubic:slope_inner_edge_' .. subname .. ' 3',
        recipe = {
            { recipeitem, "", "" },
            { "", "", recipeitem },
            { "", recipeitem, recipeitem },
        },
    })
end

-- SLOPE UPSIDE DOWN
--------------------
function noncubic.register_slope_upsdown(subname, recipeitem, groups, images, description)

    if subname == "dirt" then
        return
    end

    local detail = detail_level

    local slopeupdwnbox = {}
    for i = 0, detail - 1 do
        slopeupdwnbox[i + 1] = { -0.5, -1 * ( ( ( i + 1 ) / detail ) - 0.5 ), ( i / detail ) - 0.5, 0.5, -1 * ( ( i / detail ) - 0.5 ), 0.5 }
    end

    minetest.register_node("noncubic:slope_upsdown_" .. subname, {
        description = description,
        drawtype = "nodebox",
        tiles = images,
        paramtype = "light",
        paramtype2 = "facedir",
        walkable = true,
        selection_box = {
            type = "fixed",
            fixed = slopeupdwnbox,
        },
        node_box = {
            type = "fixed",
            fixed = slopeupdwnbox,
        },
        groups = groups,
    })
    minetest.register_craft({
        output = 'noncubic:slope_upsdown_' .. subname .. ' 6',
        recipe = {
            { recipeitem, recipeitem, recipeitem },
            { "", recipeitem, recipeitem },
            { "", "", recipeitem },
        },
    })
    minetest.register_craft({
        output = 'noncubic:slope_upsdown_' .. subname .. ' 6',
        recipe = {
            { recipeitem, recipeitem, recipeitem },
            { recipeitem, recipeitem, "" },
            { recipeitem, "", "" },
        },
    })
end

-- SLOPE EDGE UPSIDE DOWN
-------------------------
function noncubic.register_slope_upsdown_edge(subname, recipeitem, groups, images, description)

    if subname == "dirt" then
        return
    end

    local detail = detail_level

    local slopeupdwnboxedge = {}
    for i = 0, detail - 1 do
        slopeupdwnboxedge[i + 1] = { ( i / detail ) - 0.5, -1 * ( ( ( i + 1 ) / detail ) - 0.5 ), ( i / detail ) - 0.5, 0.5, -1 * ( ( i / detail ) - 0.5 ), 0.5 }
    end

    minetest.register_node("noncubic:slope_upsdown_edge_" .. subname, {
        description = description,
        drawtype = "nodebox",
        tiles = images,
        paramtype = "light",
        paramtype2 = "facedir",
        walkable = true,
        selection_box = {
            type = "fixed",
            fixed = slopeupdwnboxedge,
        },
        node_box = {
            type = "fixed",
            fixed = slopeupdwnboxedge,
        },
        groups = groups,
    })
    minetest.register_craft({
        output = 'noncubic:slope_upsdown_edge_' .. subname .. ' 3',
        recipe = {
            { "", recipeitem, recipeitem },
            { "", "", recipeitem },
            { "", "", "" },
        },
    })
    minetest.register_craft({
        output = 'noncubic:slope_upsdown_edge_' .. subname .. ' 3',
        recipe = {
            { recipeitem, recipeitem, "" },
            { recipeitem, "", "" },
            { "", "", "" },
        },
    })
end

-- SLOPE INNER EDGE UPSIDE DOWN
-------------------------------
function noncubic.register_slope_upsdown_inner_edge(subname, recipeitem, groups, images, description)

    if subname == "dirt" then
        return
    end

    local detail = detail_level

    local slopeupdwnbox_1 = {}
    for i = 0, detail - 1 do
        slopeupdwnbox_1[i + 1] = { -0.5, -1 * ( ( ( i + 1 ) / detail ) - 0.5 ), ( i / detail ) - 0.5, 0.5, -1 * ( ( i / detail ) - 0.5 ), 0.5 }
    end

    local slopeupdwnbox_2 = {}
    for i = 0, detail - 1 do
        slopeupdwnbox_2[i + 1] = { ( i / detail ) - 0.5, -1 * ( ( ( i + 1 ) / detail ) - 0.5 ), -0.5, 0.5, -1 * ( ( i / detail ) - 0.5 ), 0.5 }
    end

    local slopeupdwninneredgebox = {}
    for i = 0, #slopeupdwnbox_1 do
        slopeupdwninneredgebox[i + 1] = slopeupdwnbox_1[i + 1]
    end
    for i = 0, #slopeupdwnbox_2 do
        slopeupdwninneredgebox[i + 1 + detail] = slopeupdwnbox_2[i + 1]
    end

    minetest.register_node("noncubic:slope_upsdown_inner_edge_" .. subname, {
        description = description,
        drawtype = "nodebox",
        tiles = images,
        paramtype = "light",
        paramtype2 = "facedir",
        walkable = true,
        selection_box = {
            type = "fixed",
            fixed = slopeupdwninneredgebox,
        },
        node_box = {
            type = "fixed",
            fixed = slopeupdwninneredgebox,
        },
        groups = groups,
    })
    minetest.register_craft({
        output = 'noncubic:slope_upsdown_inner_edge_' .. subname .. ' 3',
        recipe = {
            { "", recipeitem, recipeitem },
            { "", "", recipeitem },
            { recipeitem, "", "" },
        },
    })
    minetest.register_craft({
        output = 'noncubic:slope_upsdown_inner_edge_' .. subname .. ' 3',
        recipe = {
            { recipeitem, recipeitem, "" },
            { recipeitem, "", "" },
            { "", "", recipeitem },
        },
    })
end

-- PYRAMID
----------
function noncubic.register_pyramid(subname, recipeitem, groups, images, description)

    local detail = detail_level
    local number
    if (detail % 2 == 0) then
        number = 1
    else
        number = 0.5
    end

    local pyrabox = {}
    for i = 0, ( detail / 2 ) - number do
        pyrabox[i + 1] = { ( i / detail ) - 0.5, ( i / detail ) - 0.5, ( i / detail ) - 0.5, 0.5 - ( i / detail ), ( ( i + 1 ) / detail ) - 0.5, 0.5 - ( i / detail ) }
    end

    minetest.register_node("noncubic:pyramid_" .. subname, {
        description = description,
        drawtype = "nodebox",
        tiles = images,
        paramtype = "light",
        paramtype2 = "facedir",
        walkable = true,
        selection_box = {
            type = "fixed",
            fixed = pyrabox,
        },
        node_box = {
            type = "fixed",
            fixed = pyrabox,
        },
        groups = groups,
    })
    minetest.register_craft({
        output = 'noncubic:pyramid_' .. subname .. ' 3',
        recipe = {
            { "", "", "" },
            { "", recipeitem, "" },
            { recipeitem, "", recipeitem },
        },
    })
end

-- SPIKE
--------
function noncubic.register_spike(subname, recipeitem, groups, images, description)

    if subname == "dirt" then
        return
    end

    local detail = detail_level

    local spikebox = {}
    for i = 0, detail - 1 do
        spikebox[i + 1] = { ( i / detail / 2 ) - 0.5, (i / detail) - 0.5, ( i / detail / 2 ) - 0.5, 0.5 - ( i / detail / 2 ), ( ( i + 1 ) / detail ) - 0.5, 0.5 - ( i / detail / 2 ) }
    end

    minetest.register_node("noncubic:spike_" .. subname, {
        description = description,
        drawtype = "nodebox",
        tiles = images,
        paramtype = "light",
        paramtype2 = "facedir",
        walkable = true,
        selection_box = {
            type = "fixed",
            fixed = spikebox,
        },
        node_box = {
            type = "fixed",
            fixed = spikebox,
        },
        groups = groups,
    })
    minetest.register_craft({
        output = 'noncubic:spike_' .. subname .. ' 5',
        recipe = {
            { "", recipeitem, "" },
            { recipeitem, "", recipeitem },
            { recipeitem, "", recipeitem },
        },
    })
end

-- Block one curved edge
------------------------
function noncubic.register_onecurvededge(subname, recipeitem, groups, images, description)

    local detail = detail_level
    local sehne

    local quartercyclebox = {}
    for i = 1, detail do
        if i >= detail / 2 then
            sehne = math.sqrt(0.25 - ( ( ( ( i - 1 ) / detail ) - 0.5 ) ^ 2 ) )
        else
            sehne = 0.5                   -- For uneven numbers at detail_level
        end
        quartercyclebox[i] = { -0.5, ( ( i - 1 ) / detail ) - 0.5, -sehne, 0.5, ( i / detail ) - 0.5, 0.5 }
    end

    minetest.register_node("noncubic:onecurvededge_" .. subname, {
        description = description,
        drawtype = "nodebox",
        tiles = images,
        paramtype = "light",
        paramtype2 = "facedir",
        walkable = true,
        selection_box = {
            type = "fixed",
            fixed = quartercyclebox,
        },
        node_box = {
            type = "fixed",
            fixed = quartercyclebox,
        },
        groups = groups,
    })
    minetest.register_craft({
        output = 'noncubic:onecurvededge_' .. subname .. ' 8',
        recipe = {
            { "", recipeitem, recipeitem },
            { recipeitem, recipeitem, recipeitem },
            { recipeitem, recipeitem, recipeitem },
        },
    })
end

-- Block two curved edges
-------------------------
function noncubic.register_twocurvededge(subname, recipeitem, groups, images, description)

    local detail = detail_level
    local sehne

    local quartercyclebox2 = {}
    for i = 1, detail do
        if i >= detail / 2 then
            sehne = math.sqrt( 0.25 - ( ( ( ( i - 1 ) / detail ) - 0.5 ) ^ 2 ) )
        else
            sehne = 0.5                   -- For uneven numbers at detail_level
        end
        quartercyclebox2[i] = { -sehne, ( ( i - 1 ) / detail ) - 0.5, -sehne, 0.5, ( i / detail ) - 0.5, 0.5 }
    end

    minetest.register_node("noncubic:twocurvededge_" .. subname, {
        description = description,
        drawtype = "nodebox",
        tiles = images,
        paramtype = "light",
        paramtype2 = "facedir",
        walkable = true,
        selection_box = {
            type = "fixed",
            fixed = quartercyclebox2,
        },
        node_box = {
            type = "fixed",
            fixed = quartercyclebox2,
        },
        groups = groups,
    })
    minetest.register_craft({
        output = 'noncubic:twocurvededge_' .. subname .. ' 3',
        recipe = {
            { "", "", "" },
            { 'noncubic:onecurvededge_' .. subname, "", "" },
            { 'noncubic:onecurvededge_' .. subname, 'noncubic:onecurvededge_' .. subname, "" },
        },
    })
end

-- Cylinder
-----------
function noncubic.register_cylinder(subname, recipeitem, groups, images, description)

    if subname == "dirt" then
        return
    end

    local detail = detail_level
    local sehne

    local cylbox = {}
    for i = 1, detail do
        if i <= detail / 2 then
            sehne = math.sqrt( 0.25 - ( ( ( i / detail ) - 0.5 ) ^ 2 ) )
        elseif i == detail / 2 + 0.5 then
            sehne = 0.5                   -- For uneven numbers at detail_level
        else
            sehne = math.sqrt( 0.25 - ( ( ( ( i - 1 ) / detail ) - 0.5 ) ^ 2 ) )
        end
        cylbox[i] = { ( ( i - 1 ) / detail ) - 0.5, -0.5, -sehne, (i / detail) - 0.5, 0.5, sehne }
    end

    minetest.register_node("noncubic:cylinder_" .. subname, {
        description = description,
        drawtype = "nodebox",
        tiles = images,
        paramtype = "light",
        paramtype2 = "facedir",
        walkable = true,
        selection_box = {
            type = "fixed",
            fixed = cylbox,
        },
        node_box = {
            type = "fixed",
            fixed = cylbox,
        },
        groups = groups,
    })
    minetest.register_craft({
        output = 'noncubic:cylinder_' .. subname .. ' 6',
        recipe = {
            { recipeitem, recipeitem, "" },
            { recipeitem, recipeitem, "" },
            { recipeitem, recipeitem, "" },
        },
    })
    minetest.register_craft({
        output = 'noncubic:cylinder_' .. subname .. ' 1',
        recipe = {
            { "", "", "" },
            { "", 'noncubic:cylinder_horizontal_' .. subname, "" },
            { "", "", "" },
        },
    })
end

-- Cylinder Horizontal
----------------------
function noncubic.register_cylinder_horizontal(subname, recipeitem, groups, images, description)

    if subname == "dirt" then
        return
    end

    local detail = detail_level
    local sehne

    local cylbox_horizontal = {}
    for i = 1, detail do
        if i <= detail / 2 then
            sehne = math.sqrt( 0.25 - ( ( ( i / detail ) - 0.5 ) ^ 2 ) )
        elseif i == detail / 2 + 0.5 then
            sehne = 0.5                   -- For uneven numbers at detail_level
        else
            sehne = math.sqrt( 0.25 - ( ( ( ( i - 1 ) / detail) - 0.5 ) ^ 2 ) )
        end
        cylbox_horizontal[i] = { -0.5, ( ( i - 1 ) / detail ) - 0.5, -sehne, 0.5, ( i / detail ) - 0.5, sehne }
    end

    minetest.register_node("noncubic:cylinder_horizontal_" .. subname, {
        description = description,
        drawtype = "nodebox",
        tiles = images,
        paramtype = "light",
        paramtype2 = "facedir",
        walkable = true,
        selection_box = {
            type = "fixed",
            fixed = cylbox_horizontal,
        },
        node_box = {
            type = "fixed",
            fixed = cylbox_horizontal,
        },
        groups = groups,
    })
    minetest.register_craft({
        output = 'noncubic:cylinder_horizontal_' .. subname .. ' 6',
        recipe = {
            { "", "", "" },
            { recipeitem, recipeitem, recipeitem },
            { recipeitem, recipeitem, recipeitem },
        },
    })
    minetest.register_craft({
        output = 'noncubic:cylinder_horizontal_' .. subname .. ' 1',
        recipe = {
            { "", "", "" },
            { "", 'noncubic:cylinder_' .. subname, "" },
            { "", "", "" },
        },
    })
end

-- Sphere
---------
function noncubic.register_sphere(subname, recipeitem, groups, images, description)

    if subname == "dirt" then
        return
    end

    local detail = detail_level
    local sehne

    local spherebox = {}
    for i = 1, detail do
        if i <= detail / 2 then
            sehne = math.sqrt( 0.25 - ( ( ( i / detail ) - 0.5 ) ^ 2 ) )
        elseif i == detail / 2 + 0.5 then
            sehne = 0.5                   -- For uneven numbers at detail_level
        else
            sehne = math.sqrt( 0.25 - ( ( ( ( i - 1 ) / detail ) - 0.5 ) ^ 2 ) )
        end
        spherebox[i] = { -sehne, ( ( i - 1 ) / detail ) - 0.5, -sehne, sehne, ( i / detail ) - 0.5, sehne }
    end

    minetest.register_node("noncubic:cylinder_sphere_" .. subname, {
        description = description,
        drawtype = "nodebox",
        tiles = images,
        paramtype = "light",
        paramtype2 = "facedir",
        walkable = true,
        selection_box = {
            type = "fixed",
            fixed = spherebox,
        },
        node_box = {
            type = "fixed",
            fixed = spherebox,
        },
        groups = groups,
    })
    minetest.register_craft({
        output = 'noncubic:cylinder_sphere_' .. subname .. ' 4',
        recipe = {
            { "", recipeitem, "" },
            { recipeitem, "", recipeitem },
            { "", recipeitem, "" },
        },
    })
end

-- Element straight
-------------------
function noncubic.register_element_straight(subname, recipeitem, groups, images, description)

    minetest.register_node("noncubic:element_straight_" .. subname, {
        description = description,
        drawtype = "nodebox",
        tiles = images,
        paramtype = "light",
        paramtype2 = "facedir",
        walkable = true,
        selection_box = {
            type = "fixed",
            fixed = { -0.3125, -0.5, -0.5, 0.3125, 0, 0.5 },
        },
        node_box = {
            type = "fixed",
            fixed = { -0.3125, -0.5, -0.5, 0.3125, 0, 0.5 },
        },
        groups = groups,
    })
    minetest.register_craft({
        output = 'noncubic:element_straight_' .. subname .. ' 12',
        recipe = {
            { "", recipeitem, "" },
            { "", recipeitem, "" },
            { "", recipeitem, "" },
        },
    })
end

-- Element Edge
---------------
function noncubic.register_element_edge(subname, recipeitem, groups, images, description)

    minetest.register_node("noncubic:element_edge_" .. subname, {
        description = description,
        drawtype = "nodebox",
        tiles = images,
        paramtype = "light",
        paramtype2 = "facedir",
        walkable = true,
        selection_box = {
            type = "fixed",
            fixed = {
                { -0.3125, -0.5, -0.5, 0.3125, 0, 0.3125 },
                { -0.5, -0.5, -0.3125, -0.3125, 0, 0.3125 },
            },
        },
        node_box = {
            type = "fixed",
            fixed = {
                { -0.3125, -0.5, -0.5, 0.3125, 0, 0.3125 },
                { -0.5, -0.5, -0.3125, -0.3125, 0, 0.3125 },
            },
        },
        groups = groups,
    })
    minetest.register_craft({
        output = 'noncubic:element_edge_' .. subname .. ' 10',
        recipe = {
            { recipeitem, recipeitem, recipeitem },
            { "", "", recipeitem },
            { "", "", recipeitem },
        },
    })
end

-- Element T
------------
function noncubic.register_element_t(subname, recipeitem, groups, images, description)

    minetest.register_node("noncubic:element_t_" .. subname, {
        description = description,
        drawtype = "nodebox",
        tiles = images,
        paramtype = "light",
        paramtype2 = "facedir",
        walkable = true,
        selection_box = {
            type = "fixed",
            fixed = {
                { 0.3125, -0.5, -0.3125, 0.5, 0, 0.3125 },
                { -0.3125, -0.5, -0.5, 0.3125, 0, 0.5 },
            },
        },
        node_box = {
            type = "fixed",
            fixed = {
                { 0.3125, -0.5, -0.3125, 0.5, 0, 0.3125 },
                { -0.3125, -0.5, -0.5, 0.3125, 0, 0.5 },
            },
        },
        groups = groups,
    })
    minetest.register_craft({
        output = 'noncubic:element_t_' .. subname .. ' 8',
        recipe = {
            { "", "", "" },
            { recipeitem, recipeitem, recipeitem },
            { "", recipeitem, "" },
        },
    })
end

-- Element Cross
----------------
function noncubic.register_element_cross(subname, recipeitem, groups, images, description)

    minetest.register_node("noncubic:element_cross_" .. subname, {
        description = description,
        drawtype = "nodebox",
        tiles = images,
        paramtype = "light",
        paramtype2 = "facedir",
        walkable = true,
        selection_box = {
            type = "fixed",
            fixed = {
                { 0.3125, -0.5, -0.3125, 0.5, 0, 0.3125 },
                { -0.3125, -0.5, -0.5, 0.3125, 0, 0.5 },
                { -0.5, -0.5, -0.3125, -0.3125, 0, 0.3125 },
            },
        },
        node_box = {
            type = "fixed",
            fixed = {
                { 0.3125, -0.5, -0.3125, 0.5, 0, 0.3125 },
                { -0.3125, -0.5, -0.5, 0.3125, 0, 0.5 },
                { -0.5, -0.5, -0.3125, -0.3125, 0, 0.3125 },
            },
        },
        groups = groups,
    })
    minetest.register_craft({
        output = 'noncubic:element_cross_' .. subname .. ' 10',
        recipe = {
            { "", recipeitem, "" },
            { recipeitem, recipeitem, recipeitem },
            { "", recipeitem, "" },
        },
    })
end

-- Element End
--------------
function noncubic.register_element_end(subname, recipeitem, groups, images, description)

    minetest.register_node("noncubic:element_end_" .. subname, {
        description = description,
        drawtype = "nodebox",
        tiles = images,
        paramtype = "light",
        paramtype2 = "facedir",
        walkable = true,
        selection_box = {
            type = "fixed",
            fixed = { -0.3125, -0.5, -0.3125, 0.3125, 0, 0.5 },
        },
        node_box = {
            type = "fixed",
            fixed = { -0.3125, -0.5, -0.3125, 0.3125, 0, 0.5 },
        },
        groups = groups,
    })
    minetest.register_craft({
        output = 'noncubic:element_end_' .. subname .. ' 8',
        recipe = {
            { "", "", "" },
            { "", recipeitem, "" },
            { "", recipeitem, "" },
        },
    })
end

-- Element straight DOUBLE
--------------------------
function noncubic.register_element_straight_double(subname3, recipeitem3, groups3, images3, description3)

    minetest.register_node("noncubic:element_straight_double_" .. subname3, {
        description = description3,
        drawtype = "nodebox",
        tiles = images3,
        paramtype = "light",
        paramtype2 = "facedir",
        walkable = true,
        selection_box = {
            type = "fixed",
            fixed = { -0.3125, -0.5, -0.5, 0.3125, 0.5, 0.5 },
        },
        node_box = {
            type = "fixed",
            fixed = { -0.3125, -0.5, -0.5, 0.3125, 0.5, 0.5 },
        },
        groups = groups3,
    })
    minetest.register_craft({
        output = 'noncubic:element_straight_double_' .. subname3 .. ' 1',
        recipe = {
            { "", "", "" },
            { "", 'noncubic:element_straight_' .. recipeitem3, "" },
            { "", 'noncubic:element_straight_' .. recipeitem3, "" },
        },
    })
end

-- Element Edge DOUBLE
----------------------
function noncubic.register_element_edge_double(subname3, recipeitem3, groups3, images3, description3)

    minetest.register_node("noncubic:element_edge_double_" .. subname3, {
        description = description3,
        drawtype = "nodebox",
        tiles = images3,
        paramtype = "light",
        paramtype2 = "facedir",
        walkable = true,
        selection_box = {
            type = "fixed",
            fixed = {
                { -0.3125, -0.5, -0.5, 0.3125, 0.5, 0.3125 },
                { -0.5, -0.5, -0.3125, -0.3125, 0.5, 0.3125 },
            },
        },
        node_box = {
            type = "fixed",
            fixed = {
                { -0.3125, -0.5, -0.5, 0.3125, 0.5, 0.3125 },
                { -0.5, -0.5, -0.3125, -0.3125, 0.5, 0.3125 },
            },
        },
        groups = groups3,
    })
    minetest.register_craft({
        output = 'noncubic:element_edge_double_' .. subname3 .. ' 1',
        recipe = {
            { "", "", "" },
            { "", 'noncubic:element_edge_' .. recipeitem3, "" },
            { "", 'noncubic:element_edge_' .. recipeitem3, "" },
        },
    })
end

-- Element T DOUBLE
-------------------
function noncubic.register_element_t_double(subname3, recipeitem3, groups3, images3, description3)

    minetest.register_node("noncubic:element_t_double_" .. subname3, {
        description = description3,
        drawtype = "nodebox",
        tiles = images3,
        paramtype = "light",
        paramtype2 = "facedir",
        walkable = true,
        selection_box = {
            type = "fixed",
            fixed = {
                { 0.3125, -0.5, -0.3125, 0.5, 0.5, 0.3125 },
                { -0.3125, -0.5, -0.5, 0.3125, 0.5, 0.5 },
            },
        },
        node_box = {
            type = "fixed",
            fixed = {
                { 0.3125, -0.5, -0.3125, 0.5, 0.5, 0.3125 },
                { -0.3125, -0.5, -0.5, 0.3125, 0.5, 0.5 },
            },
        },
        groups = groups3,
    })
    minetest.register_craft({
        output = 'noncubic:element_t_double_' .. subname3 .. ' 1',
        recipe = {
            { "", "", "" },
            { "", 'noncubic:element_t_' .. recipeitem3, "" },
            { "", 'noncubic:element_t_' .. recipeitem3, "" },
        },
    })
end

-- Element Cross Double
-----------------------
function noncubic.register_element_cross_double(subname3, recipeitem3, groups3, images3, description3)

    minetest.register_node("noncubic:element_cross_double_" .. subname3, {
        description = description3,
        drawtype = "nodebox",
        tiles = images3,
        paramtype = "light",
        paramtype2 = "facedir",
        walkable = true,
        selection_box = {
            type = "fixed",
            fixed = {
                { 0.3125, -0.5, -0.3125, 0.5, 0.5, 0.3125 },
                { -0.3125, -0.5, -0.5, 0.3125, 0.5, 0.5 },
                { -0.5, -0.5, -0.3125, -0.3125, 0.5, 0.3125 },
            },
        },
        node_box = {
            type = "fixed",
            fixed = {
                { 0.3125, -0.5, -0.3125, 0.5, 0.5, 0.3125 },
                { -0.3125, -0.5, -0.5, 0.3125, 0.5, 0.5 },
                { -0.5, -0.5, -0.3125, -0.3125, 0.5, 0.3125 },
            },
        },
        groups = groups3,
    })
    minetest.register_craft({
        output = 'noncubic:element_cross_double_' .. subname3 .. ' 1',
        recipe = {
            { "", "", "" },
            { "", 'noncubic:element_cross_' .. recipeitem3, "" },
            { "", 'noncubic:element_cross_' .. recipeitem3, "" },
        },
    })
end

-- Element End Double
---------------------
function noncubic.register_element_end_double(subname3, recipeitem3, groups3, images3, description3)

    minetest.register_node("noncubic:element_end_double_" .. subname3, {
        description = description3,
        drawtype = "nodebox",
        tiles = images3,
        paramtype = "light",
        paramtype2 = "facedir",
        walkable = true,
        selection_box = {
            type = "fixed",
            fixed = { -0.3125, -0.5, -0.3125, 0.3125, 0.5, 0.5 },
        },
        node_box = {
            type = "fixed",
            fixed = { -0.3125, -0.5, -0.3125, 0.3125, 0.5, 0.5 },
        },
        groups = groups3,
    })
    minetest.register_craft({
        output = 'noncubic:element_end_double_' .. subname3 .. ' 1',
        recipe = {
            { "", "", "" },
            { "", 'noncubic:element_end_' .. recipeitem3, "" },
            { "", 'noncubic:element_end_' .. recipeitem3, "" },
        },
    })
end

-- STICK
--------
function noncubic.register_stick(subname2, recipeitem2, groups2, images2, description2)

    minetest.register_node("noncubic:stick_" .. subname2, {
        description = description2,
        drawtype = "nodebox",
        tiles = images2,
        paramtype = "light",
        paramtype2 = "facedir",
        walkable = true,
        selection_box = {
            type = "fixed",
            fixed = { -0.125, -0.5, -0.125, 0.125, 0.5, 0.125 },
        },
        node_box = {
            type = "fixed",
            fixed = { -0.125, -0.5, -0.125, 0.125, 0.5, 0.125 },
        },
        groups = groups2,
    })
    minetest.register_craft({
        output = 'noncubic:stick_' .. subname2 .. ' 8',
        recipe = {
            { 'default:stick', "", "" },
            { "", "", "" },
            { recipeitem2, "", "" },
        },
    })
end

-- REGISTER NEW NONCUBIC's PART 2: noncubic.register_element_end(subname, recipeitem, groups, images, desc_element_xyz)
-----------------------------------------------------------------------------------------------------------------------
function noncubic.register_slope_edge_etc(subname, 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(subname, recipeitem, groups, images, desc_slope)
    noncubic.register_slope_lying(subname, recipeitem, groups, images, desc_slope_lying)
    noncubic.register_slope_edge(subname, recipeitem, groups, images, desc_slope_edge)
    noncubic.register_slope_inner_edge(subname, recipeitem, groups, images, desc_slope_inner_edge)
    noncubic.register_slope_upsdown(subname, recipeitem, groups, images, desc_slope_upsdown)
    noncubic.register_slope_upsdown_edge(subname, recipeitem, groups, images, desc_slope_upsdwn_edge)
    noncubic.register_slope_upsdown_inner_edge(subname, recipeitem, groups, images, desc_slope_upsdwn_inner_edge)
    noncubic.register_pyramid(subname, recipeitem, groups, images, desc_pyramid)
    noncubic.register_spike(subname, recipeitem, groups, images, desc_spike)
    noncubic.register_onecurvededge(subname, recipeitem, groups, images, desc_onecurvededge)
    noncubic.register_twocurvededge(subname, recipeitem, groups, images, desc_twocurvededge)
    noncubic.register_cylinder(subname, recipeitem, groups, images, desc_cylinder)
    noncubic.register_cylinder_horizontal(subname, recipeitem, groups, images, desc_cylinder_horizontal)
    noncubic.register_sphere(subname, recipeitem, groups, images, desc_sphere)
    noncubic.register_element_straight(subname, recipeitem, groups, images, desc_element_straight)
    noncubic.register_element_edge(subname, recipeitem, groups, images, desc_element_edge)
    noncubic.register_element_t(subname, recipeitem, groups, images, desc_element_t)
    noncubic.register_element_cross(subname, recipeitem, groups, images, desc_element_cross)
    noncubic.register_element_end(subname, recipeitem, groups, images, desc_element_end)
end


-- REGISTER MATERIALS AND PROPERTIES FOR NONCUBIC ELEMENTS:
-----------------------------------------------------------

-- WOOD
-------
noncubic.register_slope_edge_etc("wood", "stairs:stair_wood",
    { snappy = 2, choppy = 2, oddly_breakable_by_hand = 2 },
    { "default_wood.png" },
    "Wooden Slope",
    "Wooden Slope Lying",
    "Wooden Slope Edge",
    "Wooden Slope Inner Edge",
    "Wooden Slope Upside Down",
    "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("stone", "stairs:stair_stone",
    { cracky = 3 },
    { "default_stone.png" },
    "Stone Slope",
    "Stone Slope Lying",
    "Stone Slope Edge",
    "Stone Slope Inner Edge",
    "Stone Slope Upside Down",
    "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",
    "Stone 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("cobble", "stairs:stair_cobble",
    { cracky = 3 },
    { "default_cobble.png" },
    "Cobble Slope",
    "Cobble Slope Lying",
    "Cobble Slope Edge",
    "Cobble Slope Inner Edge",
    "Cobble Slope Upside Down",
    "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("brick", "stairs:stair_brick",
    { cracky = 3 },
    { "default_brick.png" },
    "Brick Slope",
    "Brick Slope Edge",
    "Brick Slope Inner Edge",
    "Brick Slope Upside Down",
    "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("sandstone", "stairs:stair_sandstone",
    { crumbly = 2, cracky = 2 },
    { "default_sandstone.png" },
    "Sandstone Slope",
    "Sandstone Slope Lying",
    "Sandstone Slope Edge",
    "Sandstone Slope Inner Edge",
    "Sandstone Slope Upside Down",
    "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("leaves", "default:leaves",
    { snappy = 2, choppy = 2, oddly_breakable_by_hand = 3 },
    { "default_leaves.png" },
    "Leaves Slope",
    "Leaves Slope Lying",
    "Leaves Slope Edge",
    "Leaves Slope Inner Edge",
    "Leaves Slope Upside Down",
    "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("dirt", "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 Edge",
    "Dirt Slope Inner Edge",
    "Dirt Slope Upside Down",
    "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("tree", "default:tree",
    { snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3 },
    { "default_tree.png" },
    "Tree Slope",
    "Tree Slope Lying",
    "Tree Slope Edge",
    "Tree Slope Inner Edge",
    "Tree Slope Upside Down",
    "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("steel", "default:steelblock",
    { snappy = 1, bendy = 2, cracky = 1, melty = 2, level = 2 },
    { "default_steel_block.png" },
    "Steel Slope",
    "Steel Slope Lying",
    "Steel Slope Edge",
    "Steel Slope Inner Edge",
    "Steel Slope Upside Down",
    "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(subname2, recipeitem2, groups2, images2, desc_element_xyz)
------------------------------------------------------------------------------------------------------------
function noncubic.register_stick_etc(subname2, recipeitem2, groups2, images2, desc_stick)
    noncubic.register_stick(subname2, recipeitem2, groups2, images2, desc_stick)
end

-- REGISTER MATERIALS AND PROPERTIES FOR STICKS:
------------------------------------------------

-- WOOD
-------
noncubic.register_stick_etc("wood", "default:wood",
    { snappy = 2, choppy = 2, oddly_breakable_by_hand = 2 },
    { "default_wood.png" },
    "Wooden Stick")

-- STONE
--------
noncubic.register_stick_etc("stone", "default:stone",
    { cracky = 3 },
    { "default_stone.png" },
    "Stone Stick")

-- COBBLE
---------
noncubic.register_stick_etc("cobble", "default:cobble",
    { cracky = 3 },
    { "default_cobble.png" },
    "Cobble Stick")

-- BRICK
--------
noncubic.register_stick_etc("brick", "default:brick",
    { cracky = 3 },
    { "default_brick.png" },
    "Brick Stick")

-- SANDSTONE
------------
noncubic.register_stick_etc("sandstone", "default:sandstone",
    { crumbly = 2, cracky = 2 },
    { "default_sandstone.png" },
    "Sandstone Stick")

-- LEAVES
---------
noncubic.register_stick_etc("leaves", "default:leaves",
    { snappy = 2, choppy = 2, oddly_breakable_by_hand = 3 },
    { "default_leaves.png" },
    "Leaves Stick")

-- TREE
-------
noncubic.register_stick_etc("tree", "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("steel", "default:steelblock",
    { snappy = 1, bendy = 2, cracky = 1, melty = 2, level = 2 },
    { "default_steel_block.png" },
    "Steel Stick")

-- REGISTER DOUBLE ELEMNTS: noncubic.register_xyz(subname3, recipeitem3, groups3, images3, desc_element_xyz)
----------------------------------------------------------------------------------------------------
function noncubic.register_elements(subname3, recipeitem3, groups3, images3, 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(subname3, recipeitem3, groups3, images3, desc_element_straight_double)
    noncubic.register_element_edge_double(subname3, recipeitem3, groups3, images3, desc_element_edge_double)
    noncubic.register_element_t_double(subname3, recipeitem3, groups3, images3, desc_element_t_double)
    noncubic.register_element_cross_double(subname3, recipeitem3, groups3, images3, desc_element_cross_double)
    noncubic.register_element_end_double(subname3, recipeitem3, groups3, images3, desc_element_end_double)
end

-- REGISTER MATERIALS AND PROPERTIES FOR HALF AND NORMAL HEIGHT ELEMENTS:
-------------------------------------------------------------------------

-- WOOD
-------
noncubic.register_elements("wood", "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("stone", "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("cobble", "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("brick", "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("sandstone", "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("leaves", "leaves",
    { snappy = 2, choppy = 2, oddly_breakable_by_hand = 3 },
    { "default_leaves.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("tree", "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("steel", "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")

Last edited by Drachenbauer32 on Sun Oct 13, 2019 15:40, edited 6 times in total.
 

User avatar
Drachenbauer32
Member
 
Posts: 62
Joined: Wed Aug 28, 2019 18:11

Re: [Mod] NonCubic Blocks Mod [1.4] [noncubic]

by Drachenbauer32 » Sat Oct 12, 2019 16:41

Not My Real Account wrote:-snip-
I have tried the recipe that was suggested here, using both planks and "tree" in place of "wood," and still have not succeeded in crafting the milling machine. Does this have something to do with the version of Minetest I am running (0.4.14), or perhaps I have not installed the correct version of the mod? Also, how do I craft doors with this mod?


For me it worked with 3 "apple wood planks".

an other tip:
For upside down nodes, you just can use the same calculations for the horizontal directions.
For the vertical direction change "( i / detail ) - 0.5" into "-1 * ( ( ( i + 1 ) / detail ) - 0.5 )" and
"( ( i + 1 ) / detail ) - 0.5" into "-1 * ( ( i / detail ) - 0.5 )".
That inverts the order of the different sized flat layers on the stack.

I also have ideas for some more nodes:

based on the pyramid and spike (good as rooftops or on top of garden-walls):
-edge top straight (looks like a common house-roof)
-edge top edge (looks like the roof of a L-shaped house)
-edge top T (looks like the roof of a T-shaped house)
-edge cross (looks like the roof of a cross-shaped house)
-tall edge top end (looks like one half of a hipped roof)
-tall edge top straight (looks like a common house-roof)
-tall edge top edge (looks like the roof of a L-shaped house)
-tall edge top T (looks like the roof of a T-shaped house)
-tall edge cross (looks like the roof of a cross-shaped house)
-tall edge top end (looks like one half of a hipped roof)
-and all (also the pyramids) as upside down

for the curved edge blocks:
-lying (the curved edge is vertical, the same direction like the upright cylinder)
-inner corner
-and all exept "lying" as upside down
= all types from the slopes as curved edge

also based on the curved edges (can make cool top for 1 node thick garden-walls):
-half circle top straight
-half circle top edge
-half circle top T
-half circle top cross
-half circle top end
-and all as upside down

for the horizontal cylinder (good for a pipeline-system):
-the existing horizontal cylinder = pipe straight
-pipe edge
-pipe T
-pipe cross
-pipe end (this one looks like the middle between the horizontal cylinder and the sphere)

For the narrow wall elements:
-square
-square double (both narrow from all four sides, can be used as a pillar)
 

Previous

Return to Mod Releases



Who is online

Users browsing this forum: Odracir and 7 guests