-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a register_on_punch_entity() #14752
Labels
Comments
Bebibio
added
the
Feature request
Issues that request the addition or enhancement of a feature
label
Jun 13, 2024
You can. It's not the prettiest, but simply depending on said mod and "hooking" their entity definition to override the local def = minetest.registered_entities["their_mod:their_entity"]
local old_on_death = def.on_death
function def:on_death(killer, ...)
-- do something
return old_on_death(self, killer, ...)
end This reduces this feature request to a lower priority matter of convenience. |
Duplicate of #14577 (which was closed by the author) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Problem
Currently there is no possibility to track when an entity is dead in a mod (which doesn't add this entity).
There is already a function for player but not for entity.
Exemple: I want to know when an entity from an other mod is killed. But I can't!
Solutions
I'm don't really know how to add this in minetest's files but it will be a function that allows you to know when an entity is punch: minetest.register_on_punch_entity
Alternatives
No idea
Additional context
No response
The text was updated successfully, but these errors were encountered: