Page 1 of 1
Random drop
Posted: Sun Jan 17, 2016 9:32 am
by SPolygon
Is there a way to make some entity (for example tree) drop random items from predefined selection? Like, idk, random amount of wood, leaves etc.
I mean, if you destroy that tree, there is like 50% chance that it will drop some special item.
Re: Random drop
Posted: Sun Jan 17, 2016 10:03 am
by Natha
You can declare a on_preplayer_mined_item event and give the player a random amount of items
Re: Random drop
Posted: Tue Jan 19, 2016 7:20 pm
by Rseding91
SPolygon wrote:Is there a way to make some entity (for example tree) drop random items from predefined selection? Like, idk, random amount of wood, leaves etc.
I mean, if you destroy that tree, there is like 50% chance that it will drop some special item.
Yes, you can define the "loot" as a percent chance to drop for any entity. You can also define the mining results as a percent chance to give any item.