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

User avatar
Likwid H-Craft
Member
 
Posts: 1113
Joined: Sun Jan 06, 2013 14:20

by Likwid H-Craft » Sat Jan 19, 2013 13:06

Well how I make them huge? that what I was kind of asking how one, make a Huge placeable block?

It not like you can edit the Texture size make it, bigger helps, so How I make it work? then I wll start making it.

Plus I like Big Blocks to be use for huge house addi, like for maybe a Game called Rattest were you are, tiny and Everything around, you is huge.
My Domain's/others:
http://likwidtest.hj.cx/ (Not Done)
 

User avatar
yves_de_beck
Member
 
Posts: 65
Joined: Wed Jan 02, 2013 10:45

by yves_de_beck » Sat Jan 19, 2013 13:40

i make i small mod to show you how it works to make big blocks.
 

User avatar
Likwid H-Craft
Member
 
Posts: 1113
Joined: Sun Jan 06, 2013 14:20

by Likwid H-Craft » Sat Jan 19, 2013 14:04

ok. anyway, when I was testing this the glass block growed upside down, is that a bug? or is it a system mistake.
My Domain's/others:
http://likwidtest.hj.cx/ (Not Done)
 

User avatar
yves_de_beck
Member
 
Posts: 65
Joined: Wed Jan 02, 2013 10:45

by yves_de_beck » Sat Jan 19, 2013 14:31

Hmm.. Can you post a screenshot? Or your code? At best you ask in the modding general threat too. There are more coders who can help you to modding =)

For me it was a good help to take a look in the default game init.lua. In minetest/games/minetest/default/init.lua
Last edited by yves_de_beck on Sat Jan 19, 2013 14:37, edited 1 time in total.
 

User avatar
yves_de_beck
Member
 
Posts: 65
Joined: Wed Jan 02, 2013 10:45

by yves_de_beck » Wed Jan 23, 2013 09:23

Hello everyone,


Any ideas for new noncubic shapes??? (Shapes that make sense)

=)

Post it!
 

User avatar
Likwid H-Craft
Member
 
Posts: 1113
Joined: Sun Jan 06, 2013 14:20

by Likwid H-Craft » Wed Jan 23, 2013 18:16

Star?
My Domain's/others:
http://likwidtest.hj.cx/ (Not Done)
 

User avatar
Mito551
Member
 
Posts: 1271
Joined: Sat Jun 16, 2012 15:03

by Mito551 » Tue Jan 29, 2013 14:06

that's quite amazing. i'm suprised i haven't came across this topic.
keep up the good work!
 

Jalo
Member
 
Posts: 15
Joined: Sun Jan 27, 2013 22:46

by Jalo » Tue Jan 29, 2013 15:11

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.
Image
 

User avatar
yves_de_beck
Member
 
Posts: 65
Joined: Wed Jan 02, 2013 10:45

by yves_de_beck » Tue Jan 29, 2013 15:33

Likwid H-Craft wrote:Star?


I think it's possible. But seems not easy to create. I try it out. =)
 

User avatar
yves_de_beck
Member
 
Posts: 65
Joined: Wed Jan 02, 2013 10:45

by yves_de_beck » Tue Jan 29, 2013 15:34

Mito551 wrote:that's quite amazing. i'm suprised i haven't came across this topic.
keep up the good work!


Thank you!!! =)
 

User avatar
yves_de_beck
Member
 
Posts: 65
Joined: Wed Jan 02, 2013 10:45

by yves_de_beck » Tue Jan 29, 2013 15:37

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.
Image



Hello Jalo,

If I have undestand you right you mean a block like in the screen: (The slim stair upstairs, but standing on ground)
Image

Right?
Last edited by yves_de_beck on Thu Feb 28, 2013 13:31, edited 1 time in total.
 

Jalo
Member
 
Posts: 15
Joined: Sun Jan 27, 2013 22:46

by Jalo » Tue Jan 29, 2013 16:38

Yes have a block like that, and it can be stacked on, top of it to make a wall or something, I don't know since I really have never seen it, done before not even Minecraft what a Shame. But if you can make it then if, Notch add it then Minetest had it first.

Edit:Oh and For more NonCubic Blocks, why not a Ball? then we can have maybe, ores work for that.
Last edited by Jalo on Tue Jan 29, 2013 16:41, edited 1 time in total.
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Tue Jan 29, 2013 17:01

Calinou's Stairs Plus mod already has these quarter-sized blocks. Panels, they're called:

http://forum.minetest.net/viewtopic.php?id=2092
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

dsalt
Member
 
Posts: 12
Joined: Wed Feb 20, 2013 13:13

by dsalt » Thu Feb 21, 2013 16:40

My wishlist for this mod…

  • Have some blocks properly invertable, as can be done with standard step/staircase blocks.
  • Update the buttons to show example blocks for whatever block type is dragged to the mill. (Where a type is missing, the corresponding button should show the default icon and be disabled.)
  • In some cases, two output blocks, one being the inverse of the other, e.g. outer corners with the corresponding inner corners…?
  • Quarter-cylinder blocks.
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Thu Feb 21, 2013 18:50

Properly inverted blocks will be possible very soon thanks to that "6d" facedir code that RealBadAngel is working on. 24 possible orientations, all from a single node and a facedir parameter.
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

LazyJ
Member
 
Posts: 479
Joined: Wed Sep 12, 2012 12:29

by LazyJ » Fri Feb 22, 2013 14:15

Suggestion for, somewhat, new shapes: quarter, half, and three-quarter versions to compliment Calinou's moreblocks and stairsplus mods.

I built a diagonal bridge using the noncubic mod to make the edges of the bridge straight instead of jagged. However, I would have liked to use a quarter slab for the bridge instead of using a full-sized block but the noncubic shapes are currently suited for full-sized blocks.

Thanks for a great mod!
.: Minetest 0.4.14 ~ Linux Mint ~ A moka pot, a French press, a dirty coffee cup, and a spoiled-rotten kitty :.
Visit our Minetest server at: LinuxGaming2.com, port 30000
Screenshots, overview maps, and server info at: http://forum.minetest.net/viewtopic.php?f=10&t=5684
My blog: http://lazyjminetest.blogspot.com/
 

User avatar
shadowwraith
Member
 
Posts: 63
Joined: Fri Feb 15, 2013 23:27

by shadowwraith » Wed Feb 27, 2013 21:34

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 message

node_dig
not diggable


I'm on Minetest 0.4.4-d1 ubuntu 12.10 Daily build
"Spill some blood for me dear Brother" Vicente Valtiare, Oblivion

Currently using Minetest 0.4.7 Ubuntu Daily Build on Ubuntustudio 13.10 Saucy Salamander 64bit (based on Ubuntu 13:10)
Trolls will be shot on sight!!!
 

User avatar
Topywo
Member
 
Posts: 1718
Joined: Fri May 18, 2012 20:27

by Topywo » Wed Feb 27, 2013 22:26

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 message

node_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?
 

User avatar
shadowwraith
Member
 
Posts: 63
Joined: Fri Feb 15, 2013 23:27

by shadowwraith » Wed Feb 27, 2013 23:39

Did you check if you emptied the milling machine?


*facepalm*

Sorry, my mistake, there was a block of clear glass in the machine that i didn't see.
"Spill some blood for me dear Brother" Vicente Valtiare, Oblivion

Currently using Minetest 0.4.7 Ubuntu Daily Build on Ubuntustudio 13.10 Saucy Salamander 64bit (based on Ubuntu 13:10)
Trolls will be shot on sight!!!
 

LazyJ
Member
 
Posts: 479
Joined: Wed Sep 12, 2012 12:29

by LazyJ » Tue Mar 19, 2013 23:18

Another suggestion: different posistions of shapes.... sideways and upside down.

I recently tried to mak a rounded edge along the bottom but the current rounded edges and corners only work for the top. Perhaps looking at Calinou's moreblocks (now with stairs+ merged into it) code will help with the different orientation of shapes.

Thanks for a great mod!
.: Minetest 0.4.14 ~ Linux Mint ~ A moka pot, a French press, a dirty coffee cup, and a spoiled-rotten kitty :.
Visit our Minetest server at: LinuxGaming2.com, port 30000
Screenshots, overview maps, and server info at: http://forum.minetest.net/viewtopic.php?f=10&t=5684
My blog: http://lazyjminetest.blogspot.com/
 

User avatar
12Me21
Member
 
Posts: 826
Joined: Tue Mar 05, 2013 00:36

by 12Me21 » Fri Mar 22, 2013 20:55

could you give me the code for the corner slope by it's self, in only one material?
This is a signature virus. Add me to your signature so that I can multiply.
Don't ever save anything as a JPEG.
 

kpo
Member
 
Posts: 38
Joined: Sun Mar 31, 2013 19:01

by kpo » Fri Apr 26, 2013 00:29

Hi yves_de_beck

I took the liberty to "adjust" your code a little (quite a lot) ...
I did the following:
Allow other mods to register themselves for milling purposes.
Example my personal version of white bricks from the industrial mod:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
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")


Also I optimised a lot of code away and made use of better functions in the milling process.
I removed all the recipes for manual creation as it goes against the purpose of the machine.
The recipes turning blocks I kept.

The code is here. Just replace the existing files in the mod with these and start registering your own materials:

init.lua:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
-- 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")


mill.lua:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
-- 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'},         
                },
})
-------------------------
 

User avatar
Bas080
Member
 
Posts: 398
Joined: Mon May 21, 2012 15:54
GitHub: bas080
IRC: bas080
In-game: bas080

by Bas080 » Sun Apr 28, 2013 16:21

I'm continuing the development of this mod. The git is at https://github.com/bas080/noncubic.

I have already made several changes.:
- Less lines of code/definitions and renamed functions and restructured code.
- Has API capability. Other mods can make their own noncubic nodes
- Inner slope now also obeys the detail_level
- Added new materials including steel, tree and junglewood.

I am wondering if anyone knows how to implement 6 face direction nodeboxes? N E S W and Up and Down.

EDIT:
I know mesecons piston has this... Will check that out.

Screenshot of new nodes
Image
Last edited by Bas080 on Sun Apr 28, 2013 16:43, edited 1 time in total.
 

LazyJ
Member
 
Posts: 479
Joined: Wed Sep 12, 2012 12:29

by LazyJ » Tue May 07, 2013 16:08

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.
.: Minetest 0.4.14 ~ Linux Mint ~ A moka pot, a French press, a dirty coffee cup, and a spoiled-rotten kitty :.
Visit our Minetest server at: LinuxGaming2.com, port 30000
Screenshots, overview maps, and server info at: http://forum.minetest.net/viewtopic.php?f=10&t=5684
My blog: http://lazyjminetest.blogspot.com/
 

kpo
Member
 
Posts: 38
Joined: Sun Mar 31, 2013 19:01

by kpo » Tue May 07, 2013 21:28

The technic mod now has a CNC machine implementing the functions of this mod.
It has an API where you supply the node to allow being shaped and the new shapes will be added in the same name space of the node.
For instance default:wood would get nodes like default:wood_technic_cnc_slope.
You need the "indev" branch on github until further.
 

User avatar
webdesigner97
Member
 
Posts: 1307
Joined: Mon Jul 30, 2012 19:16
GitHub: webD97
IRC: webdesigner97
In-game: webdesigner97

by webdesigner97 » Wed Jul 24, 2013 06:24

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.

see this post

==> Awsome textures for the milling machine!!!! :D
 

User avatar
Bas080
Member
 
Posts: 398
Joined: Mon May 21, 2012 15:54
GitHub: bas080
IRC: bas080
In-game: bas080

by Bas080 » Wed Jul 24, 2013 08:16

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.
 

User avatar
qwrwed
Member
 
Posts: 323
Joined: Sun Jul 22, 2012 20:56
In-game: qwrwed or Nitro

by qwrwed » Wed Jul 24, 2013 09:36

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.

I think the problem with the link is that there is a "." at the end.
https://github.com/bas080/noncubic This works.
Last edited by qwrwed on Wed Jul 24, 2013 09:36, edited 1 time in total.
 

User avatar
mimilus
Member
 
Posts: 75
Joined: Thu Mar 06, 2014 09:08
GitHub: mimilus
IRC: Mimilus

by mimilus » Thu Mar 06, 2014 09:49

Is there a newer version

This version give me an error in init.lua, with minetest 0.4.9
Last edited by mimilus on Thu Mar 06, 2014 09:55, edited 1 time in total.
minetest 0.4.9
Ubuntu 12.04
 

lordpyridine
New member
 
Posts: 9
Joined: Mon Mar 17, 2014 14:02

by lordpyridine » Thu Mar 20, 2014 22:47

The machine makes blocks when nothing is in the input square. Every time I exit the milling menu and go back in there's another block waiting for me.
 

PreviousNext

Return to Mod Releases

Who is online

Users browsing this forum: No registered users and 57 guests

cron