Page 1 of 1

can i edit default in a way to drop multiple things

PostPosted: Sat Nov 03, 2012 18:52
by sky
i want to drop two thing but not like this :
example drop = default cobble 10000000000
i want to it to drop like this
example drop = default cobble , default stone
they are examples i dont want to do them i am working on another thing

PostPosted: Sat Nov 03, 2012 19:32
by PilzAdam

PostPosted: Sat Nov 03, 2012 20:51
by GloopMaster

PostPosted: Sun Nov 04, 2012 05:25
by sky
PilzAdam wrote:I already answered to that question: http://minetest.net/forum/viewtopic.php?pid=50388#p50388

yeah but you answered to first one i want to make it drop cobble,stone with this example

PostPosted: Sun Nov 04, 2012 05:54
by InfinityProject
PilzAdam wants you to figure it out.
Look at this:
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_node("default:leaves", {
    description = "Leaves",
    drawtype = "allfaces_optional",
    visual_scale = 1.3,
    tiles = {"default_leaves.png"},
    paramtype = "light",
    groups = {snappy=3, leafdecay=3, flammable=2},
    drop = {
        max_items = 1,
        items = {
            {
                -- player will get sapling with 1/20 chance
                items = {'default:sapling'},
                rarity = 20,
            },
            {
                -- player will get leaves only if he get no saplings,
                -- this is because max_items is 1
                items = {'default:leaves'},
            }
        }
    },
    sounds = default.node_sound_leaves_defaults(),
})


Tell me what you think you need to do.
Hint: max_items = 1, hmmmm