2014-03-05 13:54:38 +00:00
|
|
|
|
|
|
|
// VanillaFluidSimulator.h
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "FloodyFluidSimulator.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-04-13 16:38:06 +00:00
|
|
|
class cVanillaFluidSimulator:
|
2014-03-05 13:54:38 +00:00
|
|
|
public cFloodyFluidSimulator
|
|
|
|
{
|
2020-04-13 16:38:06 +00:00
|
|
|
using Super = cFloodyFluidSimulator;
|
2016-02-05 21:45:45 +00:00
|
|
|
|
2014-03-05 13:54:38 +00:00
|
|
|
public:
|
2020-04-13 16:38:06 +00:00
|
|
|
|
|
|
|
cVanillaFluidSimulator(
|
|
|
|
cWorld & a_World,
|
|
|
|
BLOCKTYPE a_Fluid,
|
|
|
|
BLOCKTYPE a_StationaryFluid,
|
|
|
|
NIBBLETYPE a_Falloff,
|
|
|
|
int a_TickDelay,
|
|
|
|
int a_NumNeighborsForSource
|
|
|
|
);
|
2016-02-05 21:45:45 +00:00
|
|
|
|
2014-03-05 13:54:38 +00:00
|
|
|
protected:
|
|
|
|
// cFloodyFluidSimulator overrides:
|
2014-05-02 20:07:30 +00:00
|
|
|
virtual void SpreadXZ(cChunk * a_Chunk, int a_RelX, int a_RelY, int a_RelZ, NIBBLETYPE a_NewMeta) override;
|
2014-03-05 13:54:38 +00:00
|
|
|
|
|
|
|
/** Recursively calculates the minimum number of blocks needed to descend a level. */
|
|
|
|
int CalculateFlowCost(cChunk * a_Chunk, int a_RelX, int a_RelY, int a_RelZ, Direction a_Dir, unsigned a_Iteration = 0);
|
|
|
|
|
|
|
|
} ;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|