Simulator rewrite
#21
(03-03-2013, 06:31 AM)xoft Wrote: Sand simulator has been converted.

Also, I finally implemented that blocks falling on torches / rails etc. break into pickups. I even noticed that some blocks get overwritten by the falling block (sand falling on top of tall grass will remove the tall grass block), so that is implemented as well. Some blocks, such as half-slabs, cause all sand falling through them to convert into pickups, so I made sure that works, too.

It only needs some volunteer testers to test out all the possible combinations and if I forgot a combination, update the cSandSimulator functions:
Code:
/// Returns true if a falling-able block can start falling through the specified block type
static bool CanStartFallingThrough(BLOCKTYPE a_BlockType);
    
/// Returns true if an already-falling block can pass through the specified block type (e. g. torch)
static bool CanContinueFallThrough(BLOCKTYPE a_BlockType);
    
/// Returns true if the falling block rematerializing will replace the specified block type (e. g. tall grass)
static bool IsReplacedOnRematerialization(BLOCKTYPE a_BlockType);
    
/// Returns true if the specified block breaks falling blocks while they fall through it (e. g. halfslabs)
static bool DoesBreakFallingThrough(BLOCKTYPE a_BlockType);

And wait, there's more! I even added an "InstantFall" mode, in which the simulator doesn't create the falling entities, but instead makes the sand fall immediately (just like it was in the old versions of MCServer). The point of this mode is to have less strain on a server if it is too burdened.

Now I've gotta document all the new parameters in the wiki...

Done.

That means I've run out of simulators to rewriteTongue I'm not rewriting the ClassicFluidSimulator, that one's gonna go very soon, so there's only redstone left. Since Keyboard seems to have started working on mob AI, I guess I'll try converting the redstone simulator.

Oh ok, cool. Yeah, I'm working on the mob AI Smile
Reply
Thanks given by:
#22
Fixed most of STR_Warrior's findings in rev 1242, but I really don't understand the thing about cobblestone walls and anvils.
Reply
Thanks given by:
#23
place a cobblestone wall. relog and the walls are gone. same is for anvils
Reply
Thanks given by:
#24
Oh. I thought it was simulator-related. I'll check that out, then.
Reply
Thanks given by: NiLSPACE
#25
Walls and anvil fixed.

Also, redstone simulator is too complicated to rewrite completely, but I think I managed to cut down what needed cutting down - when a block changes that has nothing to do with redstone (none of its neighbors are redstone), it is not added to the simulator. So now triggerring even vast amounts of water still don't overload the redstone simulator, as they did. Hence I was able to reach my final goal - waking up simulators upon each chunk's load.

What this means, in short, is that water starts flowing wherever it is generated. So caves on ocean floor fill up with water, and we can finally implement water and lava springs.
Reply
Thanks given by: NiLSPACE
#26
I think the update where lava generates fire also works for water:
[Image: 5ERdA.png] Wink

And now I"m certain:
[Image: 5ERhl.png]
Reply
Thanks given by:
#27
that's weird. Totally awesome, but weird.
Reply
Thanks given by:
#28
STR, this may have been why saplings were everywhere - trees were burning and dropping saplings. At least it was for me.

Fixed it:

case E_BLOCK_STATIONARY_WATER:      return new cBlockLavaHandler            (a_BlockType);
Reply
Thanks given by:
#29
No it isn't the reason why there were so many saplings because some saplings just spawned instead of some grass blocks.
Reply
Thanks given by:
#30
Hm :/
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)