Cuberite Forum
Lua hooks needed! - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html)
+--- Forum: Development (https://forum.cuberite.org/forum-13.html)
+--- Thread: Lua hooks needed! (/thread-464.html)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13


RE: Lua hooks needed! - NiLSPACE - 04-08-2013

but it would be like OnPlayerPlacedBlock and OnPlayerPlacingBlock.
OnTakingDamage would be called before the Entity would actualy take damage.


RE: Lua hooks needed! - xoft - 04-09-2013

OnTakeDamage() is called before the entity takes any damage, so it works as if it was an OnTakingDamage(). So actually it's OnTakenDamage() that's missing.


RE: Lua hooks needed! - NiLSPACE - 05-25-2013

I was thinking if the hook OnChat returns a string that it will use that string as the message.


RE: Lua hooks needed! - xoft - 05-25-2013

Well, it's not exactly needed, you can already stop the chat message and broadcast another one. But it's a good idea, yes. Maybe put it into the flyspray as a suggestion, so that it doesn't get forgotten. Or if you're brave enough, do the change yourself Wink cPlugin_NewLua.cpp is the place.


RE: Lua hooks needed! - NiLSPACE - 05-25-2013

So, i looked into cPluginNewLua.cpp and i have no clue what is going on so i'll just put it in Flyspray Wink


RE: Lua hooks needed! - NiLSPACE - 07-04-2013

I think MCServer needs some more hooks like:
  • OnHopperPullingItem
  • OnHopperTransferringItem
  • OnExplosion



RE: Lua hooks needed! - xoft - 07-05-2013

Hoppers don't have a concept of "transfering", they pull items in and push items out, nothing more. Later on they should also pull pickups in, that's not implemented yet.
Put it in the flyspray tracker, preferably into two separate issues (hopper vs explosion), suggest parameters, return values and behavior.