Page 1 of 1

Glowstone mod {WIP}

PostPosted: Sat Mar 17, 2012 22:39
by stormrider2
I am making a Glowstone mod for Minetest and it is almost done. This is my first mod.

PostPosted: Sun Mar 18, 2012 07:39
by LorenzoVulcan
Ehm...Some...Screens...Descriptions???

PostPosted: Sun Mar 18, 2012 07:42
by sfan5
He's not done

PostPosted: Sun Mar 18, 2012 12:36
by LolManKuba
I hope this works better than the Magic Lantern.

PostPosted: Sun Mar 18, 2012 13:14
by radg
There is too many glowstone mods.

PostPosted: Sun Mar 18, 2012 13:31
by LorenzoVulcan
radg wrote:There is too many glowstone mods.

Where?LOL

I've never seen them.

PostPosted: Sun Mar 18, 2012 16:17
by sdzen
moreblocks has glowglass never seen a glowstone though

PostPosted: Sun Mar 18, 2012 19:00
by stormrider2
I need to finish the generation coding before I test it and I need help with it.

PostPosted: Sun Mar 18, 2012 19:39
by LorenzoVulcan
stormrider2 wrote:I need to finish the generation coding before I test it and I need help with it.

You can get an example in mods like "moreores"

PostPosted: Sun Mar 18, 2012 20:18
by IPushButton2653
Stormrider, I made a lightstone mod not too long ago. If you like, you can take it and use what I already have(I discontinued it). You're welcome in advance

PostPosted: Sun Mar 18, 2012 20:56
by stormrider2
Can you find these errors:
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
--[[
****
Glowstone
by stormrider2
Version 0.0.1
****
--]]

--Blocks

minetest.register.node( "glowstone:glowstone_block", {
    description = "Glowstone",
    tile_images = "glowstone_glowstone_block.png" ],
    light_source = LIGHT_MAX - 2,
    inventory_inventory_image = minetest.inventorycube( "glowstone_glowstone_block.png" ),
    is_ground_content = true,
    material = minetest.digprop.stonelike(5.0),
    drop = 'glowstone:glowstone_block',
})


--Generation

local gstone = {
    "glowstone:glowstone_block"
}

local glowstone_gen = function( minp, maxp )
    if maxp.y > -2 then return; end
    for c, glowstone in ipairs(gstone) do
        local amount = math.random( 0, 2 )
        for a = 0, amount do
            local pos = {
                x = math.random( minp.x, maxp.x ),
                y = math.random( minp.y, maxp.y ),
                z = math.random( minp.z, maxp.z ),
            }
            for i = -1, 1 do
                for j = -1, 1 do
                    for k = -1, 1 do
                        if math.random() > 0.2 then
                        else
                            local p = { x=pos.x+i, y=pos.y+j, z=pos.z+k }
                            local n = minetest.env:get_node( p )
                            if n.name == "default_stone" then
                                minetest.env:add_node( p, { name = glowstone } )
                            end
                        end
                    end
                end
            end
        end
    end
end

minetest.register_on_generated( glowstone_gen )

PostPosted: Mon Mar 19, 2012 15:45
by faraway
You missed a left bracket on the 'tile_images' line.

PostPosted: Mon Mar 19, 2012 20:26
by stormrider2
Screenshots
Image

PostPosted: Mon Mar 19, 2012 20:38
by Calinou
It needs a better texture. :P

PostPosted: Mon Mar 19, 2012 20:39
by sdzen
yes it does

PostPosted: Mon Mar 19, 2012 20:51
by dogeye
what texture pack is that please?
Also what mods are you using for the "diamond" effect?

PostPosted: Mon Mar 19, 2012 20:56
by sdzen
looks like hes using gemstone mod and has minecraft texture pack

PostPosted: Mon Mar 19, 2012 21:06
by Jordach
sdzen wrote:looks like hes using gemstone mod and has minecraft texture pack

gemstones? my mc pack uses moreores.

PostPosted: Mon Mar 19, 2012 21:53
by sdzen
i was saying that because of the diamond tools made me think of gemstone mod XD