12 m_FluidBlock(a_Fluid),
13 m_StationaryFluidBlock(a_StationaryFluid)
108 if ((a_Meta1 & 0x08) != 0)
119 if ((a_Meta2 & 0x08) != 0)
126 return (a_Meta1 < a_Meta2);
148 return ((a_BlockMeta & 0x08) != 0) ? 0 : a_BlockMeta;
152 NIBBLETYPE CentralPoint = HeightFromMeta(BlockMeta);
156 std::array<Vector3i, 4> Offsets
166 for (
size_t i = 0; i < Offsets.size(); i++)
174 LevelPoint[i] = CentralPoint;
182 Direction.x = (LevelPoint[0] - LevelPoint[2]) / 2.0f;
183 Direction.z = (LevelPoint[1] - LevelPoint[3]) / 2.0f;
185 if ((BlockMeta & 0x08) != 0)
@ E_BLOCK_REDSTONE_TORCH_ON
@ E_BLOCK_REDSTONE_REPEATER_ON
@ E_BLOCK_INACTIVE_COMPARATOR
@ E_BLOCK_ACTIVE_COMPARATOR
@ E_BLOCK_REDSTONE_TORCH_OFF
@ E_BLOCK_REDSTONE_REPEATER_OFF
unsigned char NIBBLETYPE
The datatype used by nibbledata (meta, light, skylight)
unsigned char BLOCKTYPE
The datatype used by blockdata.
static bool IsValidHeight(Vector3i a_BlockPosition)
Validates a height-coordinate.
bool IsHigherMeta(NIBBLETYPE a_Meta1, NIBBLETYPE a_Meta2)
Returns true if a_Meta1 is a higher fluid than a_Meta2.
bool IsSolidBlock(BLOCKTYPE a_BlockType)
BLOCKTYPE m_StationaryFluidBlock
static bool CanWashAway(BLOCKTYPE a_BlockType)
bool IsAllowedBlock(BLOCKTYPE a_BlockType)
cFluidSimulator(cWorld &a_World, BLOCKTYPE a_Fluid, BLOCKTYPE a_StationaryFluid)
virtual Vector3f GetFlowingDirection(Vector3i a_Pos)
Returns a unit vector in the direction the fluid is flowing or a zero-vector if not flowing.
bool IsPassableForFluid(BLOCKTYPE a_BlockType)
Base class for all block-based physics simulators (such as fluid, fire, falling blocks etc....
BLOCKTYPE GetBlock(Vector3i a_BlockPos) const
Returns the block type at the specified position.
NIBBLETYPE GetBlockMeta(Vector3i a_BlockPos) const
Returns the block meta at the specified position.