Cobblestone Generator problem

princessjinifer
Member
 
Posts: 14
Joined: Sun Jun 10, 2012 21:06

Cobblestone Generator problem

by princessjinifer » Sun Sep 16, 2012 18:47

I built a cobblestone generator, from this video:

http://www.youtube.com/watch?v=fsYNNyvBiUg

and it turned out like this:
Image

and it doesn't produce any cobblestone. The thing in the middle is a piston, to push the cobble out after it is generated, but it isn't generating any.. so.

Was the feature removed? Or is there a bug preventing it from working? Or did they change the way it works?

Thanks in advance! :)

Princessjinifer.
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

by sfan5 » Sun Sep 16, 2012 18:48

You can't generate Cobblestone in Minetest
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

User avatar
Casimir
Member
 
Posts: 1101
Joined: Fri Aug 03, 2012 16:59

by Casimir » Sun Sep 16, 2012 18:52

Read the info of the video. You need the obsidian mod.
 

princessjinifer
Member
 
Posts: 14
Joined: Sun Jun 10, 2012 21:06

by princessjinifer » Sun Sep 16, 2012 20:06

Thanks guys! Right after sfan5 responded, I did read the description, and saw that it was a mod.. After searching around, I found it on github, and took this code:

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
minetest.register_abm(
{nodenames = {"default:lava_source"},
interval = 5,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
    for i=-1,1 do
        for j=-1,1 do
            for k=-1,1 do
                p = {x=pos.x+i, y=pos.y+j, z=pos.z+k}
                n = minetest.env:get_node(p)
                if (n.name=="default:water_flowing") or (n.name == "default:water_source") then
                    minetest.env:add_node(pos, {name="default:cobble"})
                end
            end
        end
    end
end
})

minetest.register_abm(
{nodenames = {"default:lava_flowing"},
interval = 5,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
    for i=-1,1 do
        for j=-1,1 do
            for k=-1,1 do
                p = {x=pos.x+i, y=pos.y+j, z=pos.z+k}
                n = minetest.env:get_node(p)
                if (n.name=="default:water_flowing") or (n.name == "default:water_source") then
                    if (j==-1) then
                        minetest.env:add_node({x=pos.x, y=pos.y-1, z=pos.z}, {name="default:cobble"})
                    else
                        minetest.env:add_node(pos, {name="default:cobble"})
                    end
                end
            end
        end
    end
end
})

print("[Obsidian] Loaded!")


but changed one slight thing. A place where it would change flowing lave to a custom block (that cannot be removed) and I changed that to default:cobble. Then after a little trial and error, I realized that I needed to switch the sides of the lava and water, and it worked :)

So in the end result, I used a blinky plant, a switch, a microcontroller and a piston to push the blocks out after they are generated, but since it can only push 16, after the 16th, the circuit still goes, but the piston does not move at all. This is just the start of a self repairing bridge, or self repairing anything if implemented correctly :)
Last edited by princessjinifer on Sun Sep 16, 2012 20:08, edited 1 time in total.
 

cornernote
Member
 
Posts: 844
Joined: Wed Jul 11, 2012 15:02

by cornernote » Mon Sep 17, 2012 01:21

I did it like this in my skyblock game:
https://github.com/cornernote/minetest-skyblock/blob/master/register_abm.lua#L191

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
-- lava_source next to water_flowing will turn the water_flowing to stone
-- lava_source next to water_source will turn the lava_source to stone
minetest.register_abm({
    nodenames = {"default:lava_source"},
    neighbors = {"default:water_source", "default:water_flowing"},
    interval = 2,
    chance = 1,
    action = function(pos)
        local waterpos = minetest.env:find_node_near(pos,1,{"default:water_flowing"})
        if waterpos==nil then
            minetest.env:add_node(pos, {name="default:stone"})
        else
            while waterpos ~=nil do
                minetest.env:add_node(waterpos, {name="default:stone"})
                waterpos = minetest.env:find_node_near(pos,1,{"default:water_flowing"})
            end
        end
    end,
})
 

User avatar
jordan4ibanez
Member
 
Posts: 1865
Joined: Tue Sep 27, 2011 18:44
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez

by jordan4ibanez » Mon Sep 17, 2012 02:49

that was months ago, and i don't even know if the mod still exists
If you can think it, you can make it.
 


Return to Minetest Problems

Who is online

Users browsing this forum: No registered users and 5 guests

cron