cBlocksToTick
#3
You're right, after all, those two should be separate. At first I thought that the checking should be a part of the ticking, but now it makes sense to have both ticking without checking and checking without checking.
An example why it shouldn't be combined: placing a torch next to crops would make the crops grow every time Wink

But we definitely need to change the names. m_BlocksToTick actually has blocks to check. cBlockHandler::OnUpdate() actually does blockticks. And the block checking using three virtual functions could be reduced to one virtual function - OnCheck().

With this, blockticks don't need to be stored at all, they can still be random (except for the beginnning, so that the debugging plugin sTick works). but the blocks to check still need storage, so I'll rename cBlocksToTick to cBlocksToCheck Smile

There's one more thing to this: scheduled blockticks ( http://www.minecraftwiki.net/wiki/Tick#Block_ticks , 2nd paragraph). These might be needed later on if we want our redstone implementation to be complete and compatible. These will need storage, but I won't be implementing them yet.
Reply
Thanks given by:


Messages In This Thread
cBlocksToTick - by xoft - 10-08-2012, 05:45 AM
RE: cBlocksToTick - by FakeTruth - 10-08-2012, 06:14 AM
RE: cBlocksToTick - by xoft - 10-08-2012, 05:45 PM
RE: cBlocksToTick - by FakeTruth - 10-08-2012, 07:55 PM



Users browsing this thread: 1 Guest(s)