06-11-2012, 03:29 PM
06-17-2012, 10:18 PM
you can place sugar cane on the ground when there is no water next to it. and you can also place it on every block.
06-18-2012, 12:36 AM
(06-17-2012, 10:18 PM)STR_Warrior Wrote: [ -> ]you can place sugar cane on the ground when there is no water next to it. and you can also place it on every block.
That's right

Do other blocks follow the same pattern?
06-18-2012, 01:14 AM
not that i know. but maybe if someone is working on it he can also fix the torch, flowers, muchroom towers.
06-18-2012, 03:20 AM
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:
Also, the checker class should be Lua-exported
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
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

06-18-2012, 08:50 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:
...
Also, the checker class should be Lua-exported
Are you working on this? I don't want to duplicate effort needlessly.
06-18-2012, 02:49 PM
No, I'm not. Feel free to do this.
I think there's already some code in cClientHandle::HandlePlaceBlock() that ought to be moved into the checker, so that's a nice start.
I think there's already some code in cClientHandle::HandlePlaceBlock() that ought to be moved into the checker, so that's a nice start.
06-20-2012, 12:57 AM
can you also make vines growable with bonemeal?
06-20-2012, 01:28 AM
How do you propose they should grow when bonemealed? As far as I know, vines attached to a wall can grow in 4 directions (up, down, 2x sideways) so there's no "indisputable" way of growing. Or perhaps we could do something like tall grass - the vines would spread to a few random neighboring blocks? Or should they only grow downwards all the way till they touch the ground? What if already at ground level, should bonemeal be consumed?