Tnt: Various optimisations
Pass nodename to tnt.burn function where possible to reduce use of 'get_node'. Change 'ipairs' to 'pairs'. Use 'nodeupdate_single(pos)' instead of 'nodeupdate(pos)' to avoid every node triggering recursion, the loop itself takes the place of recursion and works upwards through horizontal planes as required.
This commit is contained in:
parent
53179b8d10
commit
6fdfd2554c
3 changed files with 19 additions and 16 deletions
|
@ -290,9 +290,9 @@ TNT API
|
|||
* `position` The center of explosion.
|
||||
* `definition` The TNT definion as passed to `tnt.register`
|
||||
|
||||
`tnt.burn(position)`
|
||||
`tnt.burn(position, [nodename])`
|
||||
|
||||
^ Ignite TNT at position
|
||||
^ Ignite TNT at position, nodename isn't required unless already known.
|
||||
|
||||
|
||||
To make dropping items from node inventories easier, you can use the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue