can i edit default in a way to drop multiple things

sky
Member
 
Posts: 152
Joined: Tue Oct 16, 2012 11:59

can i edit default in a way to drop multiple things

by sky » Sat Nov 03, 2012 18:52

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
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Sat Nov 03, 2012 19:32

 

User avatar
GloopMaster
Member
 
Posts: 213
Joined: Wed Aug 01, 2012 18:03

by GloopMaster » Sat Nov 03, 2012 20:51

Meow.

That is all.
 

sky
Member
 
Posts: 152
Joined: Tue Oct 16, 2012 11:59

by sky » Sun Nov 04, 2012 05:25

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
 

User avatar
InfinityProject
Member
 
Posts: 1009
Joined: Sat Mar 17, 2012 00:52

by InfinityProject » Sun Nov 04, 2012 05:54

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
Last edited by InfinityProject on Sun Nov 04, 2012 06:10, edited 1 time in total.
 


Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 18 guests

cron