Can someone point me in the direction on how to use the map generator to register orange trees.
I am making a server-safe, low cpu food mod.
Generating Apple like fruit
- rubenwardy
- Moderator
- Posts: 6978
- Joined: Tue Jun 12, 2012 18:11
- GitHub: rubenwardy
- IRC: rubenwardy
- In-game: rubenwardy
- Location: Bristol, United Kingdom
- Contact:
-
- Member
- Posts: 844
- Joined: Wed Jul 11, 2012 15:02
- rubenwardy
- Moderator
- Posts: 6978
- Joined: Tue Jun 12, 2012 18:11
- GitHub: rubenwardy
- IRC: rubenwardy
- In-game: rubenwardy
- Location: Bristol, United Kingdom
- Contact:
This almost looks like it, but it is on drop
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(),
})
Last edited by rubenwardy on Mon Aug 13, 2012 17:08, edited 1 time in total.
-
- Member
- Posts: 844
- Joined: Wed Jul 11, 2012 15:02
-
- Member
- Posts: 844
- Joined: Wed Jul 11, 2012 15:02
-
- New member
- Posts: 2
- Joined: Fri May 15, 2020 20:43
- GitHub: PixetBits
- IRC: PixetBits
- In-game: PixetBits
- v-rob
- Developer
- Posts: 971
- Joined: Thu Mar 24, 2016 03:19
- GitHub: v-rob
- IRC: v-rob
- Location: Right behind you.
Re: Generating Apple like fruit
Erm, this post is from waaaaay back in 2012. Check the post date before posting anything because the problem is either solved or moot at this point.
Who is online
Users browsing this forum: No registered users and 10 guests