New BlockTracer classes
#8
It seems that the basic line tracing works now. I'd like to export it to Lua for the plugins to use, but am still not sure on the interface.
The best candidate so far is the approach taken by LuaExpat: the Trace() function would take the callbacks wrapped as a table of named functions, so it would look something like this:
local Callbacks = {
  OnNextBlock = function(a_BlockX, a_BlockY, a_BlockZ, a_BlockType, a_BlockMeta)
    -- handle the block
    return false;
  end
  OnNoMoreHits = function()
    -- handle the end of tracing
  end
  OnNoChunk = function()
    -- handle out-of-loaded-chunks
  end
} ;
cLineBlockTracer.Trace(World, Callbacks, StartX, StartY, StartZ, EndX, EndY, EndZ);
What do you think?
Reply
Thanks given by:


Messages In This Thread
New BlockTracer classes - by xoft - 07-22-2013, 06:33 AM
RE: New BlockTracer classes - by NiLSPACE - 07-27-2013, 09:03 PM
RE: New BlockTracer classes - by xoft - 07-27-2013, 09:18 PM
RE: New BlockTracer classes - by NiLSPACE - 07-27-2013, 09:19 PM
RE: New BlockTracer classes - by xoft - 08-04-2013, 02:18 AM
RE: New BlockTracer classes - by bearbin - 08-04-2013, 02:19 AM
RE: New BlockTracer classes - by xoft - 08-04-2013, 02:49 AM
RE: New BlockTracer classes - by xoft - 08-05-2013, 12:30 AM
RE: New BlockTracer classes - by NiLSPACE - 08-05-2013, 04:02 AM
RE: New BlockTracer classes - by bearbin - 08-05-2013, 05:13 AM
RE: New BlockTracer classes - by NiLSPACE - 08-07-2013, 10:23 PM
RE: New BlockTracer classes - by xoft - 08-07-2013, 10:44 PM
RE: New BlockTracer classes - by NiLSPACE - 08-07-2013, 11:06 PM
RE: New BlockTracer classes - by ThuGie - 08-08-2013, 03:57 AM
RE: New BlockTracer classes - by NiLSPACE - 08-08-2013, 04:09 AM
RE: New BlockTracer classes - by tonibm19 - 08-08-2013, 04:35 AM
RE: New BlockTracer classes - by xoft - 08-08-2013, 05:57 AM
RE: New BlockTracer classes - by ThuGie - 08-08-2013, 06:09 AM
RE: New BlockTracer classes - by NiLSPACE - 08-09-2013, 02:11 AM
RE: New BlockTracer classes - by xoft - 08-09-2013, 03:38 AM



Users browsing this thread: 5 Guest(s)