@@ -177,8 +177,6 @@ The file is a key-value store of modpack details.
177177* ` textdomain ` : Textdomain used to translate title and description. Defaults to modpack name.
178178 See [ Translating content meta] ( #translating-content-meta ) .
179179
180- Note: to support 0.4.x, please also create an empty modpack.txt file.
181-
182180Mod directory structure
183181-----------------------
184182
@@ -5841,13 +5839,16 @@ Utilities
58415839 httpfetch_additional_methods = true ,
58425840 -- objects have get_guid method (5.13.0)
58435841 object_guids = true ,
5842+ -- The NodeTimer `on_timer` callback is passed additional `node` and `timeout` args (5.14.0)
5843+ on_timer_four_args = true ,
58445844 }
58455845 ```
58465846
58475847* ` core.has_feature(arg) ` : returns ` boolean, missing_features `
58485848 * checks for * server-side* feature availability
58495849 * ` arg ` : string or table in format ` {foo=true, bar=true} `
58505850 * ` missing_features ` : ` {foo=true, bar=true} `
5851+
58515852* ` core.get_player_information(player_name) ` : Table containing information
58525853 about a player. Example return value:
58535854
@@ -10472,19 +10473,19 @@ Used by `core.register_node`.
1047210473 -- itemstack will hold clicker's wielded item.
1047310474 -- Shall return the leftover itemstack.
1047410475 -- Note: pointed_thing can be nil, if a mod calls this function.
10475- -- This function does not get triggered by clients <=0.4.16 if the
10476- -- "formspec" node metadata field is set.
1047710476
1047810477 on_dig = function (pos , node , digger ),
1047910478 -- default: core.node_dig
1048010479 -- By default checks privileges, wears out item (if tool) and removes node.
1048110480 -- return true if the node was dug successfully, false otherwise.
1048210481 -- Deprecated: returning nil is the same as returning true.
1048310482
10484- on_timer = function (pos , elapsed ),
10483+ on_timer = function (pos , elapsed , node , timeout ),
1048510484 -- default: nil
1048610485 -- called by NodeTimers, see core.get_node_timer and NodeTimerRef.
10487- -- elapsed is the total time passed since the timer was started.
10486+ -- `elapsed`: total time passed since the timer was started.
10487+ -- `node`: node table (since 5.14)
10488+ -- `timeout`: timeout value of the just ended timer (since 5.14)
1048810489 -- return true to run the timer for another cycle with the same timeout
1048910490 -- value.
1049010491
0 commit comments