Skip to content

Commit 9795aba

Browse files
Wuzzy2SmallJoker
authored andcommitted
Document core.EMERGE_* symbols
1 parent 7829007 commit 9795aba

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

doc/lua_api.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6772,14 +6772,18 @@ Environment access
67726772
emerged.
67736773
* The function signature of callback is:
67746774
`function EmergeAreaCallback(blockpos, action, calls_remaining, param)`
6775-
* `blockpos` is the *block* coordinates of the block that had been
6776-
emerged.
6777-
* `action` could be one of the following constant values:
6778-
* `core.EMERGE_CANCELLED`
6779-
* `core.EMERGE_ERRORED`
6780-
* `core.EMERGE_FROM_MEMORY`
6781-
* `core.EMERGE_FROM_DISK`
6782-
* `core.EMERGE_GENERATED`
6775+
* `blockpos` are the *block* coordinates of the block in question.
6776+
* `action` can be one of the following constant values:
6777+
* `core.EMERGE_GENERATED`: The block has been freshly generated.
6778+
* `core.EMERGE_FROM_MEMORY`: The block did not need to be loaded
6779+
because it was already in memory.
6780+
* `core.EMERGE_FROM_DISK`: The block was generated before and has been
6781+
loaded from the map database.
6782+
* `core.EMERGE_CANCELLED`: The block was not loaded for some reason.
6783+
Possible reasons include: Server shutdown, it was already being
6784+
emerged, outside of mapgen limits.
6785+
This event is not an error, but does *not* mean that the block is now present.
6786+
* `core.EMERGE_ERRORED`: Emerging the block has failed due to an error.
67836787
* `calls_remaining` is the number of callbacks to be expected after
67846788
this one.
67856789
* `param` is the user-defined parameter passed to emerge_area (or

0 commit comments

Comments
 (0)