mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
[CSM] add on_item_use
(#5544)
This commit is contained in:
parent
6658ad3d94
commit
5ebf8f9450
6 changed files with 34 additions and 1 deletions
|
@ -22,6 +22,13 @@ core.register_on_placenode(function(pointed_thing, node)
|
|||
return false
|
||||
end)
|
||||
|
||||
core.register_on_item_use(function(itemstack, pointed_thing)
|
||||
print("The local player used an item!")
|
||||
print("pointed_thing :" .. dump(pointed_thing))
|
||||
print("item = " .. itemstack:get_name())
|
||||
return false
|
||||
end)
|
||||
|
||||
-- This is an example function to ensure it's working properly, should be removed before merge
|
||||
core.register_on_receiving_chat_messages(function(message)
|
||||
print("[PREVIEW] Received message " .. message)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue