mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
Add PseudoRandom in Lua API
This commit is contained in:
parent
2c56a9f588
commit
04172e3dd0
3 changed files with 127 additions and 0 deletions
|
@ -599,6 +599,7 @@ methods:
|
|||
returns the items that were actually removed (as an ItemStack)
|
||||
|
||||
ItemStack: A stack of items.
|
||||
- Can be created via ItemStack(itemstack or itemstring or table or nil)
|
||||
methods:
|
||||
- is_empty(): return true if stack is empty
|
||||
- get_name(): returns item name (e.g. "default:stone")
|
||||
|
@ -627,6 +628,11 @@ methods:
|
|||
^ returns copied ItemStack
|
||||
^ if n is omitted, n=1 is used
|
||||
|
||||
PseudoRandom: A pseudorandom number generator
|
||||
- Can be created via PseudoRandom(seed)
|
||||
methods:
|
||||
- next(): return next random number [0...32767]
|
||||
|
||||
Registered entities
|
||||
--------------------
|
||||
- Functions receive a "luaentity" as self:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue