Пример #1
0
 // Try filling the passed tile with water and return whether we're successful
 protected bool DoFlow(World world, int x, int y, int z, int metaData)
 {
     var type = world.GetBlockType(x, y, z);
     if (type == SourceType || type == FlowingType)
         return true;
     if (type == (int)BlockType.Air) {
         if (metaData == 7)
             return false;
         world.SetBlock(x, y, z, FlowingType, metaData);
         ActivateNeighbors(world, x, y, z);
         return true;
     }
     return false;
 }