Random drop from blocks (help please)

Post Reply
Gunlexify
Member
Posts: 30
Joined: Mon Apr 01, 2013 13:11
Location: Lithuania

Random drop from blocks (help please)

by Gunlexify » Post

Lets say I want my block to drop from 1 to 4 of something, how do I do that?
Sorry for my BAD english!

Just discovered that I realy SHOULD look at the doc/lua_api.txt file...

User avatar
Evergreen
Member
Posts: 2135
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen
Location: A forest in the midwest
Contact:

by Evergreen » Post

Gunlexify wrote:Lets say I want my block to drop from 1 to 4 of something, how do I do that?
Please put this in the modding questions topic. Here is the link.
Back from the dead!

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

by PilzAdam » Post

https://github.com/PilzAdam/farming/blo ... at.lua#L72
Here is how I handle the drops of wheat in my farming mod.
Last edited by PilzAdam on Thu May 16, 2013 18:37, edited 1 time in total.

Gunlexify
Member
Posts: 30
Joined: Mon Apr 01, 2013 13:11
Location: Lithuania

by Gunlexify » Post

PilzAdam wrote:https://github.com/PilzAdam/farming/blo ... at.lua#L72
Here is how I handle the drops of wheat in my farming mod.
Thank you
Sorry for my BAD english!

Just discovered that I realy SHOULD look at the doc/lua_api.txt file...

tinoesroho
Member
Posts: 570
Joined: Fri Feb 17, 2012 21:55
Location: Canada

by tinoesroho » Post

... the alternative is to use the sapling drop code from default.lua. Copied, modded it, used it for a block.
We are what we create.

I tinker and occasionally make (lousy) mods. Currently building an MMO subgame and updating mods. Pirate Party of Canada member. Sporadic author. 21 years old.

My github:
https://github.com/tinoesroho/

dannydanger
Member
Posts: 40
Joined: Mon May 06, 2013 23:55

by dannydanger » Post

shouldn't this be in modeling general

Post Reply

Who is online

Users browsing this forum: apercy and 15 guests