06-18-2012, 04:30 AM
(06-18-2012, 03:20 AM)xoft Wrote: There are actually many blocks that need more placement checks than is currently done. Why not make a class that works with a world and checks placed blocks on demand:Great idea!
Code:class cBlockPlacement { public: cBlockPlacement(cWorld * a_World); bool CanPlaceBlock(int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta); } ; ... class cWorld { ... cBlockPlacement m_BlockPlacement; ... } ;
Also, the checker class should be Lua-exported


