1 local modname = core.get_current_modname() or "??"
3 -- This is an example function to ensure it's working properly, should be removed before merge
4 core.register_on_shutdown(function()
5 print("[PREVIEW] shutdown client")
8 -- This is an example function to ensure it's working properly, should be removed before merge
9 core.register_on_receiving_chat_messages(function(message)
10 print("[PREVIEW] Received message " .. message)
14 -- This is an example function to ensure it's working properly, should be removed before merge
15 core.register_on_sending_chat_messages(function(message)
16 print("[PREVIEW] Sending message " .. message)
20 -- This is an example function to ensure it's working properly, should be removed before merge
21 core.register_on_hp_modification(function(hp)
22 print("[PREVIEW] HP modified " .. hp)
25 -- This is an example function to ensure it's working properly, should be removed before merge
26 core.register_on_damage_taken(function(hp)
27 print("[PREVIEW] Damage taken " .. hp)
30 -- This is an example function to ensure it's working properly, should be removed before merge
31 core.register_globalstep(function(dtime)
32 -- print("[PREVIEW] globalstep " .. dtime)
35 -- This is an example function to ensure it's working properly, should be removed before merge
36 core.register_chatcommand("dump", {
37 func = function(param)
42 core.register_chatcommand("test_node", {
43 func = function(param)
44 core.display_chat_message(dump(core.get_node({x=0, y=0, z=0})))
45 core.display_chat_message(dump(core.get_node_or_nil({x=0, y=0, z=0})))
50 core.after(2, function()
51 print("[PREVIEW] loaded " .. modname .. " mod")
54 core.register_on_dignode(function(pos, node)
55 print("pos:" .. dump(pos))
56 print("node:" .. dump(node))