08-08-2013, 08:43 PM
No, but we could make a new hook for this packet, I guess.
Hook Question
|
08-08-2013, 08:43 PM
No, but we could make a new hook for this packet, I guess.
Thanks given by: NiLSPACE
08-08-2013, 08:44 PM
That would be realy usefull
08-08-2013, 11:43 PM
Should I put it in the bugtracker?
08-09-2013, 12:21 AM
yea, why not. Why, you can even implement it
Here is my first try:
OnPlayerSwingLeftArm.patch (Size: 5.25 KB / Downloads: 242) . Github just doesn't seem to like me very much ;( All I need now is that the hook only gets called when the left arm is swinging.
08-10-2013, 04:25 AM
Almost. The hook is called for actions other than arm-swinging as well. Either the cClientHandle::HandleAnimation() should check the param, and call the hook only for arm swinging, or the hook should be renamed to OnPlayerAnimation and it should get the parameter as well.
As for GitHub, what git client are you using? If commandline git, then just execute "git checkout -b SwingArmHook", this will create a new branch and switch to it; then you commit normally, and finally after you push to the server (preferably using "git gui"), the GitHub web will provide you with the link to create a pull request.
08-11-2013, 08:26 PM
I adapted your patch and committed it to master.
11-22-2013, 06:29 AM
Maybe an OnRandomBlockTick hook could be usefull for some people. It gets called when a block gets randomy updated (for example with crops growth)
Parameters:
11-22-2013, 07:18 AM
I fear that such a hook would seriously affect the server performance - it would be called several thousand times per tick (there are about 50 ticked blocks per loaded chunk per tick; a player normally loads 19*19 chunks -> 18k hook calls per player). We might have to accept that *some* kinds of plugins are just unreachable with current architecture.
Thanks given by: NiLSPACE
|
« Next Oldest | Next Newest »
|